Professional Image Processing in Julia is impossible without the OpenCV package.
But this package doesn’t seem properly supported, at least the Windows x64 version - basic functionality doesn’t work.
Is there any idea about the future of this very important package?
One could use the julia written https://github.com/JuliaImages/Images.jl ecossystem for most things, and if there are some specific openCV things you need a workaround for now is using pycall to call openCV via python. Tho you might have to do some simple conversion because openCV and julia store images in a different way
If you’re familiar with OpenCV from the C++ side, Julia’s storage is actually more similar than Python’s: we don’t use an array dimension to encode color because we, like OpenCV/C++, have real color types. It’s just the OpenCV Python wrapper that encodes color via an extra array dimension.
@vladimir, I agree the OpenCV package needs work. Since you care a lot about that, obviously it would be great if you’d help out. Alternatively, echoing @gbaraldi’s comment, what is JuliaImages missing? I know OpenCV has a lot of stuff JuliaImages doesn’t have, but the converse is also true: we’re actually much better for certain tasks than OpenCV. Consequently, a specific list of requirements would be more useful than “necessary for professional image processing.”
If you’re worried about performance, don’t be: we’re only now starting to put together benchmarks, but the preliminary results are quite encouraging . Do report any issues you discover, as most bottlenecks are fixable.
This sounds a bit too optimistic compared to Intel’s long-term development of OpenCV.
Why reinvent the wheel?
There are some advantages with a pure julia implementation.
Performance is probably not one of them since OpenCV is already very optimized.
This is a case of the 2 language problem, if one is using OpenCV in python, the package is very much a black box and C++ isn’t famous for it’s readability/ease of use.
With everything being julia, the user can probably read the code any function that he’s using and, more importantly, can hope to either modify or extend that code.
Another advantage is composability. The methods defined by images aren’t limited to using just images, and they might even work with a custom type if you define the correct methods, that would be impossible in python or C++.
In Julia 1.7, OpenCV cannot be precompiled…
To hijack this thread…
I know there is ImageSegmentation.jl, but is there any library to measure the labels in segmented images and get, e.g., area, diameter, centroid etc.? This is something I regularly use from OpenCV / scikit-image.
Why is it easier to wrap OpenCV in Python than in Julia?
Are there any Julia design limitations for wrapping C++ versus Python?
Using the Julia → Python → OpenCV bridge doesn’t seem like a good idea for production high performance code…
We probably need something like Cython in Python or managed C ++ in .NET…
The problem is not only with OpenCV, with using any large C ++ project inside Julia.
You can use ImageMorphology.component_boxes
find the bounding boxes of the SegmentedImage
object. Then use use a view
to isolate the segment_labels
on the bounding boxes and work on the Segment Matrix from there.
Hello. Are someone using opencv for julia in this days? If yes, it is able for production?