OpenCV Error: The function/feature is not implemented (OpenCV was built without SURF support) in cvE

来源:互联网 发布:vc串口编程 编辑:程序博客网 时间:2024/05/21 08:58
OpenCV Error: The function/feature is not implemented (OpenCV was built without SURF support) in cvExtractSURF, file /tmp/buildd/ros-hydro-opencv2-2.4.9-2precise-20141231-1914/modules/legacy/src/features2d.cpp, line 77
terminate called after throwing an instance of 'cv::Exception'
1、#include "opencv2/nonfree/features2d.hpp"#include "opencv2/nonfree/nonfree.hpp"

cv::initModule_nonfree();在main函数刚开始的时候调用这个。

include_directories(  ${catkin_INCLUDE_DIRS} include ${OpenCV_INCLUDE_DIRS} )

 add_executable(surf src/main.cpp src/surf.cpp ) target_link_libraries(surf  ${catkin_LIBRARIES} ${OpenCV_LIBRARIES}      /opt/ros/hydro/lib/libopencv_nonfree.so.2.4.9)

0 0