OpenCV4.1.1 + contrib VS2017环境配置

contrib各个版本下载地址:https://github.com/opencv/opencv_contrib/releases 

Contrib主要是需要face相关的文件,属于一个扩展包吧,需要下载cmake编译

source选择OpenCV4.1.1中的sources

build选择一个新文件夹,为了生成编译后的文件

第一次点击Configure会让你选择VS版本,记得选择对应系统位数的!

Configure过程中第一次红色,再Configure一次,然后全变成白色,设置OPENCV_EXTRA_MODULES_PATH为下载的Contrib中的modules目录,需要下载同一版本的,再进行Configure,还会出现一次红色,再进行一次Configure,全部变成白色后,点击Generate

OpenCV4.1.1 + contrib VS2017环境配置_第1张图片

在你build中选择的文件夹会生成如下文件

OpenCV4.1.1 + contrib VS2017环境配置_第2张图片用VS打开,然后生成解决方案,没有错误就说明生成成功了!

接下来选择INSTALL,右键->仅用于项目->仅生成INSTALL,等待结束!

OpenCV4.1.1 + contrib VS2017环境配置_第3张图片

回到自己的项目中,添加依赖项,跟开始设置OpenCV相同,系统环境变量和VS的环境

OpenCV4.1.1 + contrib VS2017环境配置_第4张图片

OpenCV4.1.1 + contrib VS2017环境配置_第5张图片

设置VS

OpenCV4.1.1 + contrib VS2017环境配置_第6张图片

包含目录和库目录如下 

OpenCV4.1.1 + contrib VS2017环境配置_第7张图片

OpenCV4.1.1 + contrib VS2017环境配置_第8张图片

依赖项如下 

OpenCV4.1.1 + contrib VS2017环境配置_第9张图片

opencv_world411d.lib
opencv_world411.lib
opencv_aruco411d.lib
opencv_bgsegm411d.lib
opencv_bioinspired411d.lib
opencv_calib3d411d.lib
opencv_ccalib411d.lib
opencv_core411d.lib
opencv_datasets411d.lib
opencv_dnn411d.lib
opencv_dnn_objdetect411d.lib
opencv_dpm411d.lib
opencv_face411d.lib
opencv_features2d411d.lib
opencv_flann411d.lib
opencv_fuzzy411d.lib
opencv_gapi411d.lib
opencv_hfs411d.lib
opencv_highgui411d.lib
opencv_imgcodecs411d.lib
opencv_imgproc411d.lib
opencv_img_hash411d.lib
opencv_line_descriptor411d.lib
opencv_ml411d.lib
opencv_objdetect411d.lib
opencv_optflow411d.lib
opencv_phase_unwrapping411d.lib
opencv_photo411d.lib
opencv_plot411d.lib
opencv_reg411d.lib
opencv_rgbd411d.lib
opencv_saliency411d.lib
opencv_shape411d.lib
opencv_stereo411d.lib
opencv_stitching411d.lib
opencv_structured_light411d.lib
opencv_superres411d.lib
opencv_surface_matching411d.lib
opencv_text411d.lib
opencv_tracking411d.lib
opencv_video411d.lib
opencv_videoio411d.lib
opencv_videostab411d.lib
opencv_xfeatures2d411d.lib
opencv_ximgproc411d.lib
opencv_xobjdetect411d.lib
opencv_xphoto411d.lib

 

你可能感兴趣的:(环境配置)