Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Making SURF working on UBUNTU 14.04 in c

Hi everybody,

I'm currently working on my master thesis and I need to do some feature detection. For that purpose I would like to use the cvExtractSURF function. As the title says, I'm working on Ubuntu 14.04 and my code is written in c (not c++).

I've installed opencv 2.4.11 following this tutorial. My code is the following: Code

I've already tried many proposed solutions as this one or that one. As you can see, I already tried to link the nonfree librairies. /nonfree.hpp is commented, if not I get the following error:/usr/local/include/opencv2/nonfree/nonfree.hpp:48:1: error: unknown type name ‘namespace’ namespace cv. I think it has something to do with the fact I'm coding in c and not c++.

I did my best to install the nonfree librairies. In my /home/xxx/opencv-2.4.11/build/lib folder, I've got the following lib files (related to the nonfree lib): 1) libopencv_nonfree.so 2) libopencv_nonfree.so.2.4 3) libopencv_nonfree.so.2.4.11

Result when I make openCV: OpenCV modules: -- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib java python stitching superres ts videostab viz

When I try to make my main.c with the following makefile:MakeFile

I still get the error OpenCV Error: The function/feature is not implemented (OpenCV was built without SURF support) in cvExtractSURF, file /home/xxx/opencv-2.4.11/modules/legacy/src/features2d.cpp, line 77 terminate called after throwing an instance of 'cv::Exception'.

Can somebody help me ? I REALLY need to make it work for my thesis. Already lost 3 days to find a solution (and btw I'm quite new to linux OS...)

Thanks in advance for your help!