OpenCV功能匹配器缺少一些东西

我正在使用openCV 3.0并试图进行功能匹配。 我从http://docs.opencv.org/2.4/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html复制了代码。 我没有

"opencv2/nonfree/features2d.hpp"

所以我在我的cpp文件中包含了https://github.com/itseez/opencv_contrib/中的features2d.hpp。 但现在我得到这个错误。

OneMoreMain.cpp(50) : error C2065: 'SurfFeatureDetector' : undeclared identifier
1>.OneMoreMain.cpp(50) : error C2146: syntax error : missing ';' before identifier 'detector'
1>.OneMoreMain.cpp(50) : error C3861: 'detector': identifier not found
1>.OneMoreMain.cpp(54) : error C2065: 'detector' : undeclared identifier
1>.OneMoreMain.cpp(54) : error C2228: left of '.detect' must have class/struct/union
1>        type is ''unknown-type''
1>.OneMoreMain.cpp(55) : error C2065: 'detector' : undeclared identifier
1>.OneMoreMain.cpp(55) : error C2228: left of '.detect' must have class/struct/union
1>        type is ''unknown-type''
1>.OneMoreMain.cpp(58) : error C2065: 'SurfDescriptorExtractor' : undeclared identifier
1>.OneMoreMain.cpp(58) : error C2146: syntax error : missing ';' before identifier 'extractor'
1>.OneMoreMain.cpp(58) : error C2065: 'extractor' : undeclared identifier
1>.OneMoreMain.cpp(62) : error C2065: 'extractor' : undeclared identifier
1>.OneMoreMain.cpp(62) : error C2228: left of '.compute' must have class/struct/union
1>        type is ''unknown-type''
1>.OneMoreMain.cpp(63) : error C2065: 'extractor' : undeclared identifier
1>.OneMoreMain.cpp(63) : error C2228: left of '.compute' must have class/struct/union
1>        type is ''unknown-type''
1>.OneMoreMain.cpp(97) : error C2065: 'vector' : undeclared identifier
1>.OneMoreMain.cpp(97) : error C2062: type 'char' unexpected

我看到,有一些东西缺失,但是什么?

链接地址: http://www.djcxy.com/p/89743.html

上一篇: OpenCV feature matcher something is missing

下一篇: How to get pixel coordinates from Feature Matching in OpenCV Python