How to call face recognition contrib module in opencv 3 Android?
We have command this query in command line,
E:\AndroidStudioProjects\OpenCv\OpenCvCmake\OpenCvMakeTest>E:\AndroidStudioProjects\OpenCv\OpenCvCmake\android-ndk-r15c\ndk-build.cmd NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=E:\AndroidStudioProjects\OpenCv\OpenCvCmake\OpenCvMakeTest\app\src\main\jni\Android.mk NDK_APPLICATION_MK=E:\AndroidStudioProjects\OpenCv\OpenCvCmake\OpenCvMakeTest\app\src\main\jni\Application.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=E:/AndroidStudioProjects/OpenCv/OpenCvCmake/OpenCvMakeTest/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=E:\AndroidStudioProjects\OpenCv\OpenCvCmake\OpenCvMakeTest\app\build\intermediates\ndkBuild\debug\lib E:/AndroidStudioProjects/OpenCv/OpenCvCmake/OpenCvMakeTest/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libface_test.so
And we get following error,
info_at_opencv -fPIC -DANDROID -fsigned-char -- "E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include/opencv" "E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/include" -- -- Android NDK: OpenCV: You should ignore warning about 'non-system libraries in linker flags' and 'opencv_java' library. Android NDK: 'OPENCV_INSTALL_MODULES:=on' can be used to build APK with included OpenCV binaries Android NDK: WARNING:E:\AndroidStudioProjects\OpenCv\OpenCvCmake\OpenCvMakeTest\app\src\main\jni\Android.mk:face_test: non-system libraries in linker flags: -lopencv_java3 -lopencv_face Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the Android NDK: current module [armeabi] SharedLibrary : libface_test.so E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/../libs/armeabi/libopencv_face.a(face_basic.cpp.o):face_basic.cpp:function cv::face::BasicFaceRecognizer::write(cv::FileStorage&) const: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base const)' E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/../libs/armeabi/libopencv_face.a(face_basic.cpp.o):face_basic.cpp:function cv::face::BasicFaceRecognizer::read(cv::FileNode const&): error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base)' E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/../libs/armeabi/libopencv_face.a(face_basic.cpp.o):face_basic.cpp:function cv::face::BasicFaceRecognizer::read(cv::FileNode const&): error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base, std::_Rb_tree_node_base, std::_Rb_tree_node_base&)' E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/../libs/armeabi/libopencv_face.a(facerec.cpp.o):facerec.cpp:function cv::face::FaceRecognizer::getLabelsByString(cv::String const&) const: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base const)' E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/../libs/armeabi/libopencv_face.a(facerec.cpp.o):facerec.cpp:function cv::face::FaceRecognizer::getLabelsByString(cv::String const&) const: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base const)' E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/../libs/armeabi/libopencv_face.a(facerec.cpp.o):facerec.cpp:function std::_Rb_tree<int, std::pair<int="" const,="" cv::string="">, std::_Select1st<std::pair<int const,="" cv::string=""> >, std::less<int>, std::allocator<std::pair<int const,="" cv::string=""> > >::_M_get_insert_hint_unique_pos(std::_Rb_tree_const_iterator<std::pair<int const,="" cv::string=""> >, int const&): error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base)' E:/myfolder/opencv-3.3.0-android-sdk/OpenCV-android-sdk/sdk/native/jni/../libs/armeabi/libopencv_face.a(facerec.cpp.o):facerec.cpp:function std::_Rb_tree<int, std::pair<int="" const,="" cv::string="">, std::_Select1st<std::pair<int const,="" cv::string=""> >, std::less<int>, std::allocator<std::pair<int const,="" cv::string=""> > >::_M_get_insert_hint_unique_pos(std ...