opencv2.4.13+win10+vs2015

这已经不是我第一次在windows下安装opencv的库了,但是过程并没有轻松多少啊

1.从链接:https://pan.baidu.com/s/1cJKngE 密码:hpl7上下载opencv2.4.13,官网上也可以,只是太慢了。。

2.下载好以后提取,提取的速度还是挺快的,会得到一个opencv的文件夹,打开build/X86下可以看到,它有v11和v12,但是我使用的是vs2015,所以得自己编译

3.我是用的是cmake3.10.0-win64-x64,下载地址是https://cmake.org/download/

打开cmake,选择source和build文件夹,选择vs的版本号 v14 vs2015 win64,开始configure

我的电脑安装有cuda,虽然找到了cuda的地址但还是报错了,我的选择是将with_cuda选项取消,configure成功,generate成功。

4.打开你上一步build的文件夹,可以看到OpenCV.sln,打开,选择CMakeTargets/ALL_BUILD,点击生成,然后install。。。将debug和release都生成一下。

5.最关键的步骤来了,生成属性管理器,方便以后使用

点击 视图--其他窗口--属性管理器    ,随便新建一个项目,点击属性管理器,新建一个属性管理页,这是目录(debug版本)

D:\work\opencv2.4.13\opencv\sources\include;D:\work\opencv2.4.13\opencv\sources\include\opencv;D:\work\opencv2.4.13\opencv\sources\modules\core\include;D:\work\opencv2.4.13\opencv\sources\modules\flann\include;D:\work\opencv2.4.13\opencv\sources\modules\imgproc\include;D:\work\opencv2.4.13\opencv\sources\modules\highgui\include;D:\work\opencv2.4.13\opencv\sources\modules\features2d\include;D:\work\opencv2.4.13\opencv\sources\modules\calib3d\include;D:\work\opencv2.4.13\opencv\sources\modules\ml\include;D:\work\opencv2.4.13\opencv\sources\modules\video\include;D:\work\opencv2.4.13\opencv\sources\modules\legacy\include;D:\work\opencv2.4.13\opencv\sources\modules\objdetect\include;D:\work\opencv2.4.13\opencv\sources\modules\photo\include;D:\work\opencv2.4.13\opencv\sources\modules\gpu\include;D:\work\opencv2.4.13\opencv\sources\modules\ocl\include;D:\work\opencv2.4.13\opencv\sources\modules\nonfree\include;D:\work\opencv2.4.13\opencv\sources\modules\contrib\include;D:\work\opencv2.4.13\opencv\sources\modules\stitching\include;D:\work\opencv2.4.13\opencv\sources\modules\superres\include;D:\work\opencv2.4.13\opencv\sources\modules\ts\include;D:\work\opencv2.4.13\opencv\sources\modules\videostab\include;D:\work\opencv2.4.13\opencv\sources\include\opencv2;D:\work\opencv2.4.13\opencv\sources\build_64

这是库文件 (debug版本)

D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_ts2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_videostab2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_superres2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_stitching2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_contrib2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_nonfree2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_ocl2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_gpu2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_photo2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_objdetect2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_legacy2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_video2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_ml2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_calib3d2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_features2d2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_highgui2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_imgproc2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_flann2413d.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Debug\opencv_core2413d.lib

(release版本)

D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_ts2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_videostab2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_superres2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_stitching2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_contrib2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_nonfree2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_ocl2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_gpu2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_photo2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_objdetect2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_legacy2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_video2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_ml2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_calib3d2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_features2d2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_highgui2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_imgproc2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_flann2413.lib;D:\work\opencv2.4.13\opencv\sources\build_64\lib\Release\opencv_core2413.lib


测试程序

#include
using namespace cv;
int main()
{
 Mat image = imread("test.tif");
 imshow("test", image);
 waitKey();
 return 0;
}





你可能感兴趣的:(opencv,windows,visual,studio)