Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

openCV 3 extra modules in android

hi,

currently I am using the openCV 3 sdk for android. I am using the native files and with jni files. it is working so far.

now the problem: I want to implement FLANN (http://docs.opencv.org/3.0-beta/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html). But I get an error. It says that it cannot find "opencv2/xfeatures2d.hpp". I found out that xfeatures2d is not included in the sdk (some other extra modules are also not included in the sdk). Those extra modules I found here https://github.com/Itseez/opencv_contrib and downloaded it. Now I can see the module xfeatures2d with all its source files (.cpp) and header files (.hpp). I know that the opencv_contrib is coming from the nonfree part of openCV and has legal issues and can not work with the openCV manager for android. But this is not important right now.

So, can I somehow include xfeatures2d in my project that the FLANN example will work?

If yes, how? Unfortunately I am not familiar with cmake and the cmake process. (Right now I just include the "OpenCV.mk" file from the sdk/native/jni folder within my Android.mk file and it works. Can I modify the OpenCV.mk file to tell him to include the .cpp and .hpp files needed by xfeatures2d?)

Any help would be great! Thank you!