OpenCV学习:Windows+VS2010+OpenCV配置

时间:2023-02-01 21:25:03

  OpenCV下载:

  百度云下载:https://pan.baidu.com/s/1mhAExdu (2.4.9版本)

下载完成后,双击运行exe,选择输出目录,我选择的是C:\OpenCV

配置环境变量(path变量):选择x86平台,对应VS选择Win32配置

C:\opencv\opencv\build\x86\vc10\bin;

  在VS2010中加入OpenCV:

  在VS2010中点击“工具”,再点击“选项”,然后选择“项目和解决方案”,手动加入库文件和包含文件即可完成OpenCV在VS2010的导入。

  包含文件:

  C:\OpenCV\opencv\build\include

  C:\OpenCV\opencv\build\include\opencv

  C:\OpenCV\opencv\build\include\opencv2

  库文件:

  C:\OpenCV\opencv\build\x86\vc10\lib

  C:\OpenCV\opencv\build\x86\vc10\staticlib

  加入链接导入库(linker->Input):d 表示Debug版本

  opencv_calib3d249d.lib

  opencv_contrib249d.lib

  opencv_core249d.lib

  opencv_features2d249d.lib

  opencv_flann249d.lib

  opencv_gpu249d.lib

  opencv_highgui249d.lib

  opencv_imgproc249d.lib

  opencv_legacy249d.lib

  opencv_ml249d.lib

  opencv_objdetect249d.lib

  opencv_ts249d.lib

  opencv_video249d.lib

  至此,VS2010+OpenCV的环境基本配置完毕~