#include<stdio.h>
#include"highgui.h"
int main(int argc, char** argv){
IplImage *img = cvLoadImage("E:\\2.jpg"); //cvLoadImage()的参数为图片的完整路径名
cvNamedWindow("Example1", CV_WINDOW_AUTOSIZE);
cvShowImage("Example1",img);
cvWaitKey(0);
cvReleaseImage(&img);
cvDestroyWindow("Example1");
return 0;
}
推荐阅读:
Ubuntu 12.04 安装 OpenCV2.4.2
CentOS下OpenCV无法读取视频文件