打开和显示图像
#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; }