我对 OpenCV 和 iOS 有疑问。我尝试在我的 Xcode 项目中实现 SURF,但是当我尝试执行它时,会出现以下错误消息:
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
最佳答案
您需要在这里阅读我的自我回答问题:
openCV 2.4.3 iOS framework compiler trouble recognising some c++ headers
引起你注意的一点可能是 SURF 已被转移到非免费(因为它有许可问题)。所以你需要:
#include <opencv2/nonfree/nonfree.hpp>
#include <opencv2/legacy/compat.hpp>
cv::initModule_nonfree();
https://stackoverflow.com/questions/14226095/