一起做slam系列4中错误的修改办法

问题:编译过程报错##

'''

/RGB-D tutorial/part 4/src/slamBase.cpp: In function ‘void computeKeyPointsAndDesp(FRAME&, std::__cxx11::string, std::__cxx11::string)’:

/RGB-D tutorial/part 4/src/slamBase.cpp:63:17: error: ‘create’ is not a member of ‘cv::FeatureDetector {aka cv::Feature2D}’

_detector = cv::FeatureDetector::create( detector.c_str() );

^

/RGB-D tutorial/part 4/src/slamBase.cpp:64:19: error: ‘create’ is not a member of ‘cv::DescriptorExtractor {aka cv::Feature2D}’

_descriptor = cv::DescriptorExtractor::create( descriptor.c_str() );

^

src/CMakeFiles/slambase.dir/build.make:62: recipe for target 'src/CMakeFiles/slambase.dir/slamBase.cpp.o' failed

make[2]: *** [src/CMakeFiles/slambase.dir/slamBase.cpp.o] Error 1

CMakeFiles/Makefile2:167: recipe for target 'src/CMakeFiles/slambase.dir/all' failed

make[1]: *** [src/CMakeFiles/slambase.dir/all] Error 2

Makefile:83: recipe for target 'all' failed

make: *** [all] Error 2

'''

解决办法##

在src文件夹中的CmakeLists.txt文件中把FIND_PACKAGE( OpenCV REQUIRED )改为FIND_PACKAGE( OpenCV 2.4 REQUIRED )

你可能感兴趣的:(一起做slam系列4中错误的修改办法)