在最新的OpenCV3.1.0中,众多著名的特征检测算子(如SIFT, SURF, ORB算子等)都被移除了,这些算子都被移到了opencv_contrib库中,另外,这个库中还有很多有意思的模块(如ArUco,dnn等)值得我们学习使用。要想使用这些库,就要到OpenCV的github下载源码编译。这个过程还是有些费事的,如果想一步步做请看
这篇博客
。
如果想省事的话可以直接下载本篇博客下面编译好的库来使用(注意只适用于OpenCV3.1.0)。
下面讲一下具体配置步骤:
vs工程包含目录:
…\install\include
…\install\include\opencv
…\install\include\opencv2
库目录:
…\install\x64\vc14\lib
…\install\x64\vc14\lib
\staticlib
链接器-输入Debug
opencv_aruco310d.lib
opencv_bgsegm310d.lib
opencv_calib3d310d.lib
opencv_ccalib310d.lib
opencv_core310d.lib
opencv_datasets310d.lib
opencv_dnn310d.lib
opencv_dpm310d.lib
opencv_face310d.lib
opencv_features2d310d.lib
opencv_flann310d.lib
opencv_fuzzy310d.lib
opencv_hdf310d.lib
opencv_highgui310d.lib
opencv_imgcodecs310d.lib
opencv_imgproc310d.lib
opencv_line_descriptor310d.lib
opencv_ml310d.lib
opencv_objdetect310d.lib
opencv_optflow310d.lib
opencv_photo310d.lib
opencv_plot310d.lib
opencv_reg310d.lib
opencv_rgbd310d.lib
opencv_saliency310d.lib
opencv_shape310d.lib
opencv_stereo310d.lib
opencv_stitching310d.lib
opencv_structured_light310d.lib
opencv_superres310d.lib
opencv_surface_matching310d.lib
opencv_text310d.lib
opencv_tracking310d.lib
opencv_ts310d.lib
opencv_video310d.lib
opencv_videoio310d.lib
opencv_videostab310d.lib
opencv_xfeatures2d310d.lib
opencv_ximgproc310d.lib
opencv_xobjdetect310d.lib
opencv_xphoto310d.lib
ippicvmt.lib
链接器-输入Release
opencv_aruco310.lib
opencv_bgsegm310.lib
opencv_calib3d310.lib
opencv_ccalib310.lib
opencv_core310.lib
opencv_datasets310.lib
opencv_dnn310.lib
opencv_dpm310.lib
opencv_face310.lib
opencv_features2d310.lib
opencv_flann310.lib
opencv_fuzzy310.lib
opencv_hdf310.lib
opencv_highgui310.lib
opencv_imgcodecs310.lib
opencv_imgproc310.lib
opencv_line_descriptor310.lib
opencv_ml310.lib
opencv_objdetect310.lib
opencv_optflow310.lib
opencv_photo310.lib
opencv_plot310.lib
opencv_reg310.lib
opencv_rgbd310.lib
opencv_saliency310.lib
opencv_shape310.lib
opencv_stereo310.lib
opencv_stitching310.lib
opencv_structured_light310.lib
opencv_superres310.lib
opencv_surface_matching310.lib
opencv_text310.lib
opencv_tracking310.lib
opencv_ts310.lib
opencv_video310.lib
opencv_videoio310.lib
opencv_videostab310.lib
opencv_xfeatures2d310.lib
opencv_ximgproc310.lib
opencv_xobjdetect310.lib
opencv_xphoto310.lib
ippicvmt.lib
系统环境变量Path:在最后加上…\install\x64\vc14\bin
然后需要重启一次vs,否则好像只能编译不能运行
配置好后可以用下面的代码测试一下。下面是运行结果:
资源连接:
编译好的opencv_conrib库
、
测试代码ORB