下载OpenCV2.2 安装

我的安装路径是D:\Program Files\OpenCV2.2

打开VS2010

新建项目HelloOpencv

VS2010下配置  OpenCV2.2
VS2010下配置  OpenCV2.2中    单击VS2010下配置  OpenCV2.2
打开
打开VS2010下配置  OpenCV2.2
分别在包含目录加入
D:\Program Files\OpenCV2.2\include
D:\Program Files\OpenCV2.2\include\opencv
在库目录加入
D:\Program Files\OpenCV2.2\lib
单击应用
选择 连接器-->输入
VS2010下配置  OpenCV2.2
在附加依赖项中  增加所要包含的库就行了
opencv_core220d.lib
opencv_highgui220d.lib
opencv_video220d.lib
opencv_ml220d.lib
opencv_legacy220d.lib
opencv_imgproc220d.lib
 点击应用   确定
下面可以试一下是不是配置成功
输入代码:
#include "stdafx.h"
#include "cv.h"
#include <cxcore.h>
#include <highgui.h>


int _tmain(int argc, _TCHAR* argv[])
{
        IplImage *img = cvLoadImage("funny-pictures.jpg");
        cvNamedWindow("Image:",1);
        cvShowImage("Image:",img);

        cvWaitKey();
        cvDestroyWindow("Image:");
        cvReleaseImage(&img);

        return 0;

}
 将图片  funny-pictures.jpg  放在[VS2010默认项目文件夹]\HelloOpenCV\HelloOpenCV 下 
运行结果
VS2010下配置  OpenCV2.2

相关文章:

  • 2021-10-15
  • 2022-12-23
  • 2022-12-23
  • 2021-12-11
  • 2022-02-08
  • 2022-12-23
猜你喜欢
  • 2022-02-08
  • 2022-02-08
  • 2022-12-23
  • 2022-02-08
  • 2021-10-09
相关资源
相似解决方案