准备软件 下载并且安装opencv2.4.13.5 准备好visual studio(版本不重要)
配置环境变量 D:\opencv\opencv2413\build\x64\vc14\bin
将D:\opencv\opencv2413\build\x64\vc14\bin目录下文件添加到C:\Windows\System32中
在vs中新建一个工程然后进行属性设置 vc++目录下 包含目录D:\opencv\opencv2413\build\include D:\opencv\opencv2413\build\include\opencv D:\opencv\opencv2413\build\include\opencv2 库目录D:\opencv\opencv2413\build\x64\vc14\lib 链接器-输入-附加依赖项 opencv_calib3d2413d.lib opencv_contrib2413d.lib opencv_core2413d.lib opencv_features2d2413d.lib opencv_flann2413d.lib opencv_gpu2413d.lib opencv_highgui2413d.lib opencv_imgproc2413d.lib opencv_legacy2413d.lib opencv_ml2413d.lib opencv_nonfree2413d.lib opencv_objdetect2413d.lib opencv_ocl2413d.lib opencv_photo2413d.lib opencv_stitching2413d.lib opencv_superres2413d.lib opencv_video2413d.lib opencv_videostab2413d.lib 调试过程中要注意蓝色部分的设置
简单测试后编写你的代码==