cv2.error: OpenCV was built without SURF support (Linux/Python)

asked 2014-06-20 08:40:21 -0500

GermanGiant gravatar image

updated 2014-06-20 15:49:22 -0500


I am trying to run third party python code which is supposed to extract SURF information from pictures. I get the following error message:

"cv2.error: OpenCV was built without SURF support"

The error occurs when the script tries to call cv.ExtractSURF.

I am running the code on a fresh install of Linux Mint 17, and I have only limited knowledge of the workings of libraries and dependencies. I have, of course, searched the internet and this website for the error. I know that since version 2.4, the SURF support is not included by default due to patent issues, and is in the nonfree library.

I have downloaded version 2.4.9 of OpenCV, and installed using cmake and make (via checkinstall) without any options. I actually received the error even before doing that, so I already seemed to have some parts of opencv on my system, but the nonfree module or library were definitely not there. Now (after downloading etc.) is located at /proc/13955/cwd/lib.

Can anyone help me in getting this to work? Î would appreciate it a lot!


Hi Berak,

thank you for answering. I tried both:

cv2.__version__ returns 2.4.8, but cv2.getBuildInformation() gets me 2.4.9. Excerpt from the cv2.getBuildInformation() output:

General configuration for OpenCV 2.4.9 =====================================
  Version control:               unknown

    Host:                        Linux 3.13.0-24-generic x86_64
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/make
    Configuration:               Release


  OpenCV modules:
    To be built:                 core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl **nonfree** contrib stitching superres ts videostab
    Disabled:                    world
    Disabled by dependency:      -
    Unavailable:                 androidcamera dynamicuda java python viz


I only have one on my system. I still don't know what's wrong...

edit retag flag offensive close merge delete



did you run a 'make install' after building opencv from src ?

check cv2.__version__ or cv2.getBuildInformation()

my guess is, that you're still using the old cv2 module (i.e. the new one did not get copied to python/lib/site-packages)

berak gravatar imageberak ( 2014-06-20 08:49:55 -0500 )edit

Thank you for replying. I edited the original question with results to your suggestions.

GermanGiant gravatar imageGermanGiant ( 2014-06-20 15:50:24 -0500 )edit