Java support for OpenCV 4.8.0

Since OpenCV is already available on Android, its a bit perplexing to find no official support for OpenCV Java. Is there a technical reason or lack of interest from community ?

I am aware of the OpenPnp port that supports 4.7.0. But after trying it for a few days, coming from python opencv usage, I find it a bit lacking. Is there any plan for release Official Java support ?

afaik, the windows binary releases do have java bindings,
and building opencv from src will produce those, too (if you have a jdk & ant installed)

not official

indeed, only few folks seem to use (desktop) java with opencv.

what would that be, exactly ?

Official support - ensure Java dependencies available on maven central for easy access for Java devs. More than desktop, I think server centric usage should be promoted/ supported.

Building it from source doesn’t feel easy or friendly in absence of good instructions… I managed to make 4.8.0 work with open pnp by loading the .so libs from python wheels. Since they are available for python to be installed through Pip why not support Java through Maven !!?

Yet to check how well the openpnp thing works… and a question - you mean building from source makes JAVA API available ? Are JNI bindings part of the build ?

please be aware, that it’s a c++ library, you need to finetune local optimizations like simd, threading, etc.
all of it non-portable, and java does not matter here at all

ppl tried this, it always died of missing maintenance effort

yes, exactly. and it’s the preferred way of getting opencv to your machine

1 Like

That I didn’t know… helps. Could you please point me to the source to look at ? I will get started right away. Also how does python make it available across all platforms through wheels ? Do they build on local machine during installation?

they have like a dozen versions, per os, arch, with gui or not, etc.

there are bots on the net for this, lookup pypi.

cmake will generate java sources, running python scripts here (output will go to build/modules/java, from where it’s compiled to a jar)