安装opencv,在vs2010配置opencv

1.安装opencv。

下载地址:http://www.opencv.org.cn/index.php/Download


下载完成后,双击exe安装。我安装在了H盘。


2.在电脑中配置opencv的环境变量。

在系统属性,高级,环境变量的path属性中,增加opencv路径。

H:\opencv\build\x86\vc9\bin;

H:\opencv\build\x86\mingw\bin;

H:\opencv\build\common\tbb\ia32\vc9;

3.在vs2010中配置opencv环境。

项目属性->vc++目录->包含目录:

H:\opencv\build\include;
H:\opencv\build\include\opencv;
H:\opencv\build\include\opencv2;
C:\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses;
C:\Extras\DirectShow\Include;$(IncludePath)

项目属性->vc++目录->库目录:

H:\opencv\build\x86\vc10\lib;
C:\Extras\DirectShow\Samples\C++\DirectShow\BaseClasses\Release;
C:\Extras\DirectShow\Lib;$(LibraryPath)

项目属性->链接器->输入:

opencv_calib3d2411.lib
opencv_contrib2411.lib
opencv_core2411.lib
opencv_features2d2411.lib
opencv_flann2411.lib
opencv_gpu2411.lib
opencv_highgui2411.lib
opencv_imgproc2411.lib
opencv_legacy2411.lib
opencv_ml2411.lib
opencv_objdetect2411.lib
opencv_ts2411.lib
opencv_video2411.lib





你可能感兴趣的:(工作中遇到的问题,opencv,vc2010)