3

I have installed Opencv 2.4.8 on my Linux(ubuntu 14.04) machine and it works fine. When I'm trying to test SURF descriptor using sample code from the online official documentation the compiler gave me no such file or director error for #include<opencv2/nonfree/nonfree.hpp>

.

From this link i have tried to update the opencv library for the nonfree modules with but still no success.

To make history short how can include SURF descriptor to my project or any idea how to fix this?

Community
  • 1
  • 1
realtekme
  • 353
  • 4
  • 6
  • 16
  • 1
    This was already answered in [opencv surf function is not implemented][1] [1]: http://stackoverflow.com/questions/11175794/opencv-surf-function-is-not-implemented – Thomas Dickey Feb 15 '15 at 12:45
  • just note, that answer from 2012 might no more be valid in 2015 – berak Feb 15 '15 at 13:41
  • Possible duplicate of [include nonfree openCV 2.4.10 on ubuntu](https://stackoverflow.com/questions/27481849/include-nonfree-opencv-2-4-10-on-ubuntu) – Ruslan Jun 14 '17 at 17:00

2 Answers2

6
sudo apt-get update
sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
sudo apt-get update
sudo apt-get install libopencv-nonfree-dev
Alex
  • 8,461
  • 6
  • 37
  • 49
Jaing Aobo
  • 61
  • 1
  • 3
1

You need to enable OPENCV_ENABLE_NONFREE when you build your opencv version. I guess it goes like this in the prompt command cmake -D OPENCV_ENABLE_NONFREE=ON ..

But if you prefer cmake GUI see the picture below. picture

ZSmain
  • 360
  • 1
  • 6
  • 20