Using Contrib modules with OpenCV4Android (OpenCV3.0.0)

asked 2015-08-18 23:55:56 -0600

henrywarhurst gravatar image

I'm trying to write JNI wrappers for the OpenCV3.0.0 FaceRecognizer modules but I'm having a bit of trouble because the "sdk/native/jni/include/opencv2" folder does not contain any reference to the contrib code. I realise that the contrib modules were separated from the rest of the modules with the OpenCV3.0.0 update. I have tried building the whole repository from source (opencv + contrib modules) and copying the opencv2 folder across from this build but when I do that I get the following error when I build my app in eclipse:

"error: undefined reference to 'cv::face::createFisherFaceRecognizer(int, double)'"

My basic question is: What is the correct procedure for accessing contrib modules through JNI in OpenCV4Android (OpenCV3.0.0)?

Any help is greatly appreciated!

Thanks!

edit retag flag offensive close merge delete

Comments

Try to build your own SDK using the build_sdk script. Probably you will need to add OPENCV_EXTRA_MODULES_PATH parameter to the cmake parameters list.

mshabunin gravatar imagemshabunin ( 2015-08-20 08:32:31 -0600 )edit

Hi, did you manage to include the contrib module? If yes, how? I already built the SDK using the script and all the .a files are generated fine, but how can I use them in my project?

BenT gravatar imageBenT ( 2015-11-07 09:44:15 -0600 )edit