Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV 3.0 for Android - static initialization not loading new modules

I recently moved my Android project from OpenCV 2.4.10 to OpenCV 3.0.

I statically initialize OpenCV using this code:

OpenCVLoader.initDebug();

When I run my app, I get this exception:

java.lang.UnsatisfiedLinkError: Native method not found: org.opencv.imgcodecs.Imgcodecs.imread_1:(Ljava/lang/String;)J

Imgcodecs is a new module in OpenCV 3.0 which replaces Highgui from OpenCV 2.4.* if I am right.

I can see following output in logs from OpenCV when it initializes:

Version control:               2.4.10
...
To be built:                 core androidcamera flann imgproc highgui features2d calib3d ml objdetect video contrib photo java legacy ocl stitching superres ts videostab

From the information above I guess that the OpenCVLoader of OpenCV 3.0 initializes only the old modules from 2.4.10. You can see that it loads highgui module which should not be needed anymore.

Is this a bug of new OpenCV or am I missing something? Is there some workaround how to load also the new modules? Thanks.