Call OpenCV functions from Julia

In this and this the author explaining how to call OpenCV functions from C#.

How can I do this from Julia? Here how to make OpenCV C++ project

1 Like

I’ve successfully called OpenCV functions through the Python interface via PyCall. It may take a bit of trial and error, but this should get you started:

using PyCall, Conda
cv2 = pyimport_conda("cv2", "opencv")

img = rand(UInt8, 256, 256)
cv2.GaussianBlur(img, (13, 13), 3)

We had the same challenge as you and thought we had to use the Python bindings, but it turns out that Julia bindings does exist. We followed this recipe to build a Julia OpenCV package locally: OpenCV: Introduction to Julia OpenCV Binding

Remember to build libcxxwrap-julia from scratch, and setup CxxWrap to use this. That was a step we initially ignored. Building OpenCV with Julia support will not work otherwise.