1

I'm using openCV 3.0 and trying to make feature matcher. I copied code from http://docs.opencv.org/2.4/doc/tutorials/features2d/feature_flann_matcher/feature_flann_matcher.html. I didnt have

"opencv2/nonfree/features2d.hpp"

So I included features2d.hpp from https://github.com/itseez/opencv_contrib/ in my cpp file. But now I get this errors.

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

I see, that there is something missing, but what?

Sergei Podlipaev
  • 1,331
  • 1
  • 14
  • 34
  • probably "opencv2/nonfree/features2d.hpp" is missing? – Micka Feb 27 '16 at 15:17
  • before compiling opencv you can add the nonfree module in CMake afaik. – Micka Feb 27 '16 at 15:19
  • Possible duplicate of [Nonfree module is missing in OpenCV 3.0](http://stackoverflow.com/questions/27418668/nonfree-module-is-missing-in-opencv-3-0) – Miki Feb 27 '16 at 15:27

0 Answers0