核心函数: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;
}
本文出自 “flyclc” 博客,请务必保留此出处http://flyclc.blog.51cto.com/1385758/1539859
cvResize 重新设定图像大小,布布扣,bubuko.com
原文地址:http://flyclc.blog.51cto.com/1385758/1539859