#include "cv.h"
#include "highgui.h"
int main( int argc, char** argv )
{
// 结构中载入图像:图像也是BMP图像(cvLoadImage)或者其它格式
// XML/YAML (cvLoad)
IplImage *src;
src=cvLoadImage("lena.jpg",-1);
cvNamedWindow( "lena.jpg",0);
cvShowImage("lena.jpg",src);
//img.show( "image with grain" ); // cvShowImage的另外一种形式
cvWaitKey();
cvSaveImage("d:/save.jpg",src);
cvDestroyWindow("lena.jpg");
cvReleaseImage(&src);
}