Ask Your Question

Revision history [back]

I've encountered the same issue, and here's my solution:

Copy the folder xfeatures2d and file xfeatures2d.hpp from opencv_contrib/modules/xfeatures2d/include/opencv2 to the OpenCV master path : opencv/modules/features2d/include/opencv2.

And modify the features2d_manual.hpp file as you did.

Copy the brief.cpp file located at opencv_contrib/modules/xfeatures2d/src to your project's jni folder and add brief.cpp to LOCAL_SRC_FILES in your Android.mk.

Make sure you set include ... build/OpenCV-android-sdk/sdk/native/jni/OpenCV.mk path correctly in your Android.mk file.

When build is finished, make sure you re-install the new OpenCV Manager (at build/OpenCV-android-sdk/apk) to your device.