I build the opencv_contrib as the README told, but for the module xfeature2d there is somethings wrong.
I ran the "cmake" successfully, but when i input "make" in the console, there is error. And the error information are as follow:
home/zhang/opencv-3.3.0/opencv_contrib-master/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp:213:103: error: expected ‘;’ at end of member declaration
tArray image, std::vector
^
/home/zhang/opencv-3.3.0/opencv_contrib-master/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp:213:105: error: ‘CV_OVERRIDE’ does not name a type
rray image, std::vector
^
/home/zhang/opencv-3.3.0/opencv_contrib-master/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp:217:59: error: expected ‘;’ at end of member declaration
OutputArrayOfArrays descriptors ) CV_OVERRIDE;
^
/home/zhang/opencv-3.3.0/opencv_contrib-master/modules/xfeatures2d/include/opencv2/xfeatures2d.hpp:217:61: error: ‘CV_OVERRIDE’ does not name a type
OutputArrayOfArrays descriptors ) CV_OVERRIDE;
^
modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d_pch_dephelp.dir/build.make:62: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d_pch_dephelp.dir/opencv_test_xfeatures2d_pch_dephelp.cxx.o' failed
make[2]: * [modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d_pch_dephelp.dir/opencv_test_xfeatures2d_pch_dephelp.cxx.o] Error 1
CMakeFiles/Makefile2:7288: recipe for target 'modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d_pch_dephelp.dir/all' failed
make[1]: [modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d_pch_dephelp.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: ** [all] Error 2
What should I do ? I really need help
you're trying to mix latest code from opencv_contrib with an outdated 3.3.0 opencv main version, while you need exactly the same version/branch for both repositories.
sorry for my stupid fault. It worked! Thanks!
But then I am not able to compile facerec_fisherfaces.cpp and facerec_eigenfaces.cpp for the version 4.1.0. and when I tried to combine It with older contrib version I got above error. In 4.1.0 I get "error: ‘EigenFaceRecognizer’ was not declared in this scope" when I do g++-6 facerec_fisherfaces.cpp . Please let me know correct g++ statement for the compilation of 'facerec_fisherfaces.cpp" or " facerec_eigenfaces.cpp" thanks
same errors at : https://github.com/yjxiong/temporal-segment-networks/issues/276
Most helpful comment
you're trying to mix latest code from opencv_contrib with an outdated 3.3.0 opencv main version, while you need exactly the same version/branch for both repositories.