Ask Your Question
3

OpenCV 3.0 for Android - static initialization not loading new modules

asked 2015-06-14 13:33:31 -0600

Potass gravatar image

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.

edit retag flag offensive close merge delete

Comments

1

ah nice find. both the new imgcodecs and videoio modules are also absent from the android docs

berak gravatar imageberak ( 2015-06-15 10:16:40 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-10-15 08:04:56 -0600

Potass gravatar image

Seems working now using the updated version from 23.6.2015.

edit flag offensive delete link more

Comments

Go ahead and accept your own answer! :)

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-16 03:52:10 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-14 13:33:31 -0600

Seen: 1,163 times

Last updated: Oct 15 '15