打开和显示图像

#include "highgui.h"
#include "cv.h"
#include "cxcore.h"
#include "cvaux.h"
#pragma comment(lib, "highgui200.lib")
#pragma comment(lib, "cv200.lib")
#pragma comment(lib, "cxcore200.lib")
#pragma comment(lib, "cvaux200.lib")
int main(int argc , char ** argv)
{
	IplImage* img = cvLoadImage( "airplane.jpg");
	cvNamedWindow( "Example1",CV_WINDOW_AUTOSIZE);
	cvShowImage ( "Example1",img);
	cvWaitKey(0);
	cvReleaseImage(&img);
	cvDestroyWindow( "Example1");
	return 0;
}

posted on 2011-07-16 12:09  lwbaptx  阅读(142)  评论(0编辑  收藏  举报

导航