namespace SIFT error in making opencv and opencv_contrib 4.3.0 (under ubuntu)

744 views Asked by At

the error broke during the make period

this is the procedure before the error came out

1.download the source code from github of opencv and opencv_contrib 4.3.0

2.creat a dir under opencv source code dir name opencv_contrib

3.enter the build dir and enter the code

cmake -D CMAKE_INSTALL_PREFIX=/usr/local -D CMAKE_BUILD_TYPE=Release -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ..

some of the files to download while cmake didn't download but I manually download those and all of the fail-to-download files are copied to the required route

then begin to make

make -j7

error break while making

Scanning dependencies of target opencv_test_xfeatures2d
[ 90%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_detectors.cpp.o
[ 90%] Building CXX object modules/gapi/CMakeFiles/opencv_test_gapi.dir/test/internal/gapi_transactions_test.cpp.o
[ 90%] Building CXX object modules/gapi/CMakeFiles/opencv_test_gapi.dir/test/own/conc_queue_tests.cpp.o
[ 90%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_test_xfeatures2d.dir/test/test_features2d.cpp.o
[ 90%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_perf_xfeatures2d.dir/perf/perf_surf.ocl.cpp.o
/home/wang/Documents/opencv-4.3.0/opencv_contrib/modules/xfeatures2d/test/test_features2d.cpp: In member function ‘virtual void opencv_test::{anonymous}::Features2d_SIFTHomographyTest_regression_Test::Body()’:
/home/wang/Documents/opencv-4.3.0/opencv_contrib/modules/xfeatures2d/test/test_features2d.cpp:366:88: error: ‘SIFT’ has not been declared
 TEST(Features2d_SIFTHomographyTest, regression) { CV_DetectPlanarTest test("SIFT", 80, SIFT::create()); test.safe_run(); }
                                                                                        ^~~~
/home/wang/Documents/opencv-4.3.0/opencv_contrib/modules/xfeatures2d/test/test_features2d.cpp: In member function ‘virtual void opencv_test::{anonymous}::Features2d_SIFT_using_mask_regression_Test::Body()’:
/home/wang/Documents/opencv-4.3.0/opencv_contrib/modules/xfeatures2d/test/test_features2d.cpp:435:39: error: ‘SIFT’ has not been declared
     FeatureDetectorUsingMaskTest test(SIFT::create());

reference websites

https://www.cnblogs.com/fx-blog/p/8213704.html

https://blog.csdn.net/u011736771/article/details/85960300

1

There are 1 answers

0
user13764292 On

I had the same problem with the 4.3.0 release, SIFT was moved out of xfeatures2d but I dont think it was inserted in the main branch for the 4.3.0 release. Just download the master (development) branch and the problem is solved