Ask Your Question

Revision history [back]

OpenCv Android only native

Hi,

I am using the Android opencv sdk in my project, and everything is good but size. I know there are ways to build for diferent platforms, shrink size and so on, but my question is of different nature.

There is a thing I don't understand, when I build the library in Android Studio using cmake I link it to libraries provided from environment variable in cmake which opencv exposes (version 3.2) , for this I downloaded opencv native sdk for android and made a separate project in Android Studio, now the size is big because the libopencv_java3.so is somehow linked to my library so, but as I think of it libopencv_java comes for the java code which comes with opencv sdk, and I don't usye any of the sdk java code, I do everything in C/C++, and have defined my own JNI code to interact with that c/c++ methods. Now the question, can I, in my case reduce all the size to maybe 2-3 modules ( core, imageproc and one more maybe), because I need only those.

I know a bit of c/c++ syntax but the linking static, shared and so one all this things a bit in the fog for me.

Can you please help?

Thanks,