windows7下vs2010安装opencv2.4.3详细步骤(图)

2019-10-07 19:58:08王旭
opencv_ml243.lib

opencv_objdetect243.lib

opencv_ts243.lib

opencv_video243.lib

主文件源码如下:

// OpenCV01.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include <opencv2/opencv.hpp>using namespace std;using namespace cv;int _tmain(int argc, _TCHAR* argv[]){const char* imagename = "Lena.jpg"; //从文件中读入图像Mat img = imread(imagename); //如果读入图像失败if(img.empty()){fprintf(stderr, "Can not load image %sn", imagename);return -1;} //显示图像imshow("image", img); //此函数等待按键,按键盘任意键就返回waitKey(); return 0;}

添加Lena.jpg文件到项目文件夹,运行该项目,报如下错误:

目测应该是编译版本错误,在配置管理器中修改项目为x64类型,重新运行,顺利显示这位图像处理界的“名模”!