Reputation: 325
I have been using OpenCV for Android for a long time. It works fine, so far. But now I want to improve the performance and I want to go native. However, even native development itself is a little complicated for me in Android. Now I got the point of it and I can build simple applications by myself.
The point that I am stuck is how to add those libraries and include files in "native" folder of OpenCV Android package.
NOTE:I do not intent to create native application, but use only OpenCV as native. Other parts will still be java
Long story short, I just don't want to call native OpenCV methods with Java wrapper, but instead do everything related to OpenCV in native and then get the result to Java part.
Thanks for any efford in advance.
Upvotes: 1
Views: 3354
Reputation: 2340
If you are not using OpenCV from Java at all, the best option is to include the libraries by linking statically with them, and then removing dead code, symbols, etc, to keep the native library size under control. Having to download an additional package is something many users don't like.
Just include
OPENCV_LIB_TYPE:=STATIC
OPENCV_CAMERA_MODULES:=off
include path/to/opencv/sdk/native/jni/OpenCV.mk
in your Android.mk.
Have a look at the OpenCV Android documentation here.
Upvotes: 4