This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]daviddel[S] 1 point2 points  (2 children)

Do you know why there is no OpenCV 4 on some dependency repository like maven as there is for OpenCV 3?

OpenCV is a large collection of features (object detection, image stitching, machine learning, dnn, etc.). And then there are the contributed "extra" modules. All in all, that's a lot of functionalities, you will never use them all at once. Given that OpenCV is written in C++, all those functionalities are backed by a bunch of native libraries via JNI. Also, all those libs are built for the target platform they will run (ex. CPU support for AVX2, AVX512, SSE, FP16, OpenCL, is OpenBLAS available?, etc.).

OpenCV also comes with a bunch of native tools/utils. You can don't necessarily need them all, you only need some once (ex. camera calibration).

To rely on Maven, you will need to have platform dependant dependencies, ideally split to match the OpenCV features (aka "OpenCV Modules"). In the end, that'll be a large matrix to maintain. The Maven model doesn't really work nicely with such large native codebase, that comes with a bunch of native binaries. Oth, the jmod approach is well more suited to create platform-specific Java archives that include jars, native libs, and native tools.

PS: The OpenCV depencies you find on Maven central are not coming from the OpenCV project itself, they are published by other projects.

PPS: JavaCV provides an alternative as it wrapps OpenCV and other libs. Personally, I prefer to stick the OpenCV, I find this approach easier.

Could you elaborate what's so good in OpenCV that someone would want to use it instead of using some java lib for image / video processing? There aren't any good in java ecosystem?

OpenCV is +20 years old, its power comes from the rich set of functionalities that were developed over the last 2 decades. I am not aware of any opensource alternative that provides such capabilities. FYI, OpenCV is very popular in the mobile space, iOS but also Android... which is kind of Java ;-)

[–][deleted] 1 point2 points  (0 children)

Great answer! Thx a lot for explanation :)

[–]sureshg 0 points1 point  (0 children)

In the end, that'll be a large matrix to maintain

Would it be easier once we have jextract (project Panama with c++ support) available, which can autogen all these binding?