VS2010 opencv2.3

1 下载安装VS2010、OpenCV2.3,并解压缩OpenCV2.3,本处为D:\Program Files\OpenCV2.3
2  配置VS2010,右键项目属性,其中vc目录添加
配置include路径:包含 D:\Program Files\OpenCV2.3\build\include; D:\Program Files\OpenCV2.3\build\include\opencv;D:\Program Files\OpenCV2.3\build\include\opencv2
配置lib路径:
32位系统 & VC2010,库目录为:D:\Program Files\OpenCV2.3\build\x86\vc10\lib
3 设置环境变量
DLL:D:\Program Files\OpenCV2.3\build\x86\vc10\bin


4 在项目属性 链接器 输入 附加依赖库 里加上


opencv_core230d.lib
opencv_highgui230d.lib
opencv_video230d.lib
opencv_ml230d.lib
opencv_legacy230d.lib
opencv_imgproc230d.lib




//添加额外的头文件
#include "cv.h"
#include "highgui.h"
#include "CvvImage.h"
#define IMAGE_CHANNELS 3
#define CameraPicWidth 1280//摄像头
#define CameraPicHeight 1024//摄像头

你可能感兴趣的:(VS2010 opencv2.3)