OpenCV3.0.0+Contrib配置

1.下载OpenCV安装包:https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.0.0/
安装过程实际上就是解压过程,安装完成后得到:
OpenCV3.0.0+Contrib配置_第1张图片

2.下载opencv_contrib源码:https://github.com/Itseez/opencv_contrib
下载之后直接解压,得到源码目录:
OpenCV3.0.0+Contrib配置_第2张图片
3.下载cmake-gui工具:http://www.cmake.org/cmake/resources/software.html

在这里插入图片描述
4.打开cmake-gui\bin目录下的cmake-gui.exe工具。

5.填写相应参数,包括:OpenCV源码目录和OpenCV.sln工程的导出目录,开始导出OpenCV.sln工程:

6.点击Configure
第一次导出时需要设置后面用来编译此OpenCV.sln工程的VS的版本,这里我用的是VS 2013 Win64。
Configure完成

7.在配置表中找到“OPENCV_EXTRA_MODULES_PATH”,设置其参数值为open_contrib源码包中的modles目录,我的目录是“D:\opencv_contrib-3.0.0\modules”
另外我需要勾选WITH_OPENGL。

8.Configure+Generate,完成编译。
OpenCV3.0.0+Contrib配置_第3张图片
9.用VS打开OpenCV.sln工程,编译生成Debug和Release库
选择Debug、win32
在解决方案中选中工程,右键选择重新生成解决方案,
找到CMakeTargets中的INSTALL,然后右键选择“仅限于项目”–>“仅生成INSTALL(B)”
然后,在工程目录下的install目录中,可以看到生成了一堆文件。

10.配置opencv环境。
VC++目录–>包含目录,添加:
D:\opencv\cmake_contrib\install\include

VC++目录–>库目录,添加:
D:\opencv\cmake_contrib\install\x86\vc12\lib
D:\opencv\cmake_contrib\install\x86\vc12\staticlib
链接器–>输入–>附加依赖项,添加:
opencv_surface_matching300d.lib
opencv_line_descriptor300d.lib
opencv_bgsegm300d.lib
//opencv_bioinspired300d.lib
opencv_calib3d300d.lib
opencv_ccalib300d.lib
opencv_core300d.lib
opencv_datasets300d.lib
opencv_face300d.lib
opencv_features2d300d.lib
opencv_flann300d.lib
opencv_hal300d.lib
opencv_highgui300d.lib
opencv_imgcodecs300d.lib
opencv_imgproc300d.lib
opencv_latentsvm300d.lib
opencv_ml300d.lib
opencv_objdetect300d.lib
opencv_optflow300d.lib
opencv_photo300d.lib
opencv_reg300d.lib
opencv_rgbd300d.lib
opencv_saliency300d.lib
opencv_shape300d.lib
//opencv_stereo300d.lib
opencv_stitching300d.lib
opencv_superres300d.lib
opencv_text300d.lib
opencv_tracking300d.lib
opencv_ts300d.lib
opencv_video300d.lib
opencv_videoio300d.lib
opencv_videostab300d.lib
opencv_xfeatures2d300d.lib
opencv_ximgproc300d.lib
opencv_xobjdetect300d.lib
opencv_xphoto300d.lib
ippicvmt.lib

参考自:
https://blog.csdn.net/Simple_Xiao/article/details/53978608

https://segmentfault.com/a/1190000003496009
http://johnhany.net/2015/10/windows7-compile-opencv3-with-cuda/
https://blog.csdn.net/qq_41051855/article/details/80473448
https://blog.csdn.net/linshuhe1/article/details/51221015

https://jingyan.baidu.com/article/64d05a0245aa70de55f73b12.html

你可能感兴趣的:(安装笔记)