编译OpenCV3.3.1 +contrib+vs2013+x86版本

一、准备工具

分别下载opencv3.3.1,opencv-contrib,cmake。默认已经安装VS2013。

opencv3.3.1下载地址  选择 win pack ,下载后会得到opencv-3.3.1-vc14.exe这样一个文件。

opencv-contrib下载地址  下载后得到opencv_contrib-3.3.1.zip这样一个文件。

camke下载     下载后得到cmake-3.10.1-win64-x64.zip的文件,在bin目录下的cmake-gui.exe 可直接打开运行。


二、cmake编译  

1、打开刚刚下载的cmake,bin目录下的 cmake-gui.exe文件。

2、cmake第一行输入的是opencv的源码即opencv的source文件,第二行是编译好的文件放置处即mybulid文件夹。

3、第一次编译按Generate,设置选项 Visual  Studio 12 2013(如果想编译成X64的opencv,此处选择  Visual  Studio 12 2013 Win 64即可),成功后有done的标志。

4、在配置表中找到“OPENCV_EXTRA_MODUALS_PATH”,设置其参数值为opencv_contrib源码包中的modules目录。本次编译去除勾选WITH_CUDA选项。

5、再按下configure.成功后显示configuring done。可能会有红色的框条出现,再重复一次configure,更新后红色消除。

6、最后按[Generate]生成工程,如果配置和生成工程完全ok底下应该有Configuring done和Generating done两行。

编译OpenCV3.3.1 +contrib+vs2013+x86版本_第1张图片

编译OpenCV3.3.1 +contrib+vs2013+x86版本_第2张图片


三、打开opencv.sln工程,进行编译

1、打开刚刚保存目录下的 opencv.sln文件

2、在解决方案资源管理器中,选择“解决方案 opencv”->右键->重新生成解决方案。

3、找到CMakeTargets下的INSTALL,右键INSTALL->仅用于项目->仅生成INSTALL。

4、注意debug和release都编译一遍。


四、编程成功后,得到42个dll(你会感谢我的)

debug版本

opencv_aruco331d.lib
opencv_bgsegm331d.lib
opencv_bioinspired331d.lib
opencv_calib3d331d.lib
opencv_ccalib331d.lib
opencv_core331d.lib
opencv_datasets331d.lib
opencv_dnn331d.lib
opencv_dpm331d.lib
opencv_face331d.lib
opencv_features2d331d.lib
opencv_flann331d.lib
opencv_fuzzy331d.lib
opencv_highgui331d.lib
opencv_imgcodecs331d.lib
opencv_imgproc331d.lib
opencv_img_hash331d.lib
opencv_line_descriptor331d.lib
opencv_ml331d.lib
opencv_objdetect331d.lib
opencv_optflow331d.lib
opencv_phase_unwrapping331d.lib
opencv_photo331d.lib
opencv_plot331d.lib
opencv_reg331d.lib
opencv_rgbd331d.lib
opencv_saliency331d.lib
opencv_shape331d.lib
opencv_stereo331d.lib
opencv_stitching331d.lib
opencv_structured_light331d.lib
opencv_superres331d.lib
opencv_surface_matching331d.lib
opencv_text331d.lib
opencv_tracking331d.lib
opencv_video331d.lib
opencv_videoio331d.lib
opencv_videostab331d.lib
opencv_xfeatures2d331d.lib
opencv_ximgproc331d.lib
opencv_xobjdetect331d.lib
opencv_xphoto331d.lib


release版本

opencv_aruco331.lib
opencv_bgsegm331.lib
opencv_bioinspired331.lib
opencv_calib3d331.lib
opencv_ccalib331.lib
opencv_core331.lib
opencv_datasets331.lib
opencv_dnn331.lib
opencv_dpm331.lib
opencv_face331.lib
opencv_features2d331.lib
opencv_flann331.lib
opencv_fuzzy331.lib
opencv_highgui331.lib
opencv_imgcodecs331.lib
opencv_imgproc331.lib
opencv_img_hash331.lib
opencv_line_descriptor331.lib
opencv_ml331.lib
opencv_objdetect331.lib
opencv_optflow331.lib
opencv_phase_unwrapping331.lib
opencv_photo331.lib
opencv_plot331.lib
opencv_reg331.lib
opencv_rgbd331.lib
opencv_saliency331.lib
opencv_shape331.lib
opencv_stereo331.lib
opencv_stitching331.lib
opencv_structured_light331.lib
opencv_superres331.lib
opencv_surface_matching331.lib
opencv_text331.lib
opencv_tracking331.lib
opencv_video331.lib
opencv_videoio331.lib
opencv_videostab331.lib
opencv_xfeatures2d331.lib
opencv_ximgproc331.lib
opencv_xobjdetect331.lib
opencv_xphoto331.lib



你可能感兴趣的:(opencv编译)