0

I have seen the documentation of OpenCV. In there, SurfFeatureDetector, SurfDescriptorExtractor and BruteForceMatcher are being used.

But when I try in my code, it is showing -

Error : identifier "SurfFeatureDetector" is unidentified.

Same case for other two.

After going through some threads and forums, I tried to include some header files like - #include <opencv2 nonfree="" features2d.hpp=""> and some others but those files don't exist. So shows another error saying -

Error : Cannot open source file "opencv2/nonfree/features2d.hpp"

Is there any alternative way to do these in OpenCV 3.0.0?

Omal Perera
  • 2,971
  • 3
  • 21
  • 26
sunnyhith
  • 3
  • 1
  • 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 Mar 06 '16 at 13:52

1 Answers1

0

I had similar problem and it got fixed when I built Opencv locally on my system instead of using pre-built libraries. You can refer to this thread for building Opencv on your system Where is the lib folder (or its replacement) in the current OpenCV?

In opencv3.0, SURF/SIFT/BruteForceMatcher have been moved to a seperate opencv_contrib repository, you may download it and make changes to cmake path for Visual Studio to recognize these functions. Although it did appear after building it locally on my system without doing any additional modification.

After you built it locally you can find it in the following path Build_folder/install/include/opencv2/features2d.hpp

Community
  • 1
  • 1
Nikita Chopra
  • 440
  • 9
  • 22