核心函数:cvResize
程序:
代码:
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include <iostream>
int resize(int argc,char** argv)
{
IplImage* src=cvLoadImage("e:\\picture\\xibao.jpg");
IplImage* dst=cvCreateImage(cvSize(src->width/3,src->height/3),src->depth,src->nChannels);
cvResize(src,dst,1);
cvNamedWindow("src");
cvNamedWindow("dst");
cvShowImage("src",src);
cvShowImage("dst",dst);
cvWaitKey(0);
cvDestroyWindow("src");
cvDestroyWindow("dst");
cvReleaseImage(&src);
cvReleaseImage(&dst);
return 0;
}
转载于:https://blog.51cto.com/flyclc/1539859