0

I've an issue with OpenCV and iOS. I tried to implement SURF in my Xcode project but when I try to execute it, this error message appears:

OpenCV Error: The function/feature is not implemented (OpenCV was built without SURF support) in cvExtractSURF, file /Users/alexandershishkov/opencv2.4.3rc/opencv/modules/legacy/src/features2d.cpp, line 77 libc++abi.dylib: terminate called throwing an exception

I had compiled OpenCV from the official repository on Github and with this tutorial: http://docs.opencv.org/trunk/doc/tutorials/introduction/ios_install/ios_install.html#ios-installation

Maybe you have an idea... I'm lost.

Thank you.

Seb Thiebaud
  • 2,419
  • 1
  • 15
  • 13
  • I'm fairly sure that exception is your answer. SURF and SIFT are not freely accessible without licensing, unlike the rest of the framework and modules. – CodaFi Jan 08 '13 at 23:55

1 Answers1

2

You need to read my self-answered question here:

openCV 2.4.3 iOS framework compiler trouble recognising some c++ headers

The bit that is catching you out is probably that SURF has been moved to non-free (as it has licensing issues). So you need to:

#include <opencv2/nonfree/nonfree.hpp>
#include <opencv2/legacy/compat.hpp>

and possibly

 cv::initModule_nonfree();

if you are working with older the C interface

There are alternatives to SURF if you wish to stick with the open-licensed standard openCV library...

Community
  • 1
  • 1
foundry
  • 31,615
  • 9
  • 90
  • 125
  • @Sebastien, good to know I was helpful. Can you please tick the answer as accepted, and/or vote up if you liked it... that way you attract more enthusiasts for you next question. – foundry Jan 09 '13 at 00:33