#include<cv.h>
#include<highgui.h> int main(int argc, char** argv)
{
IplImage* img = cvLoadImage(argv[1]);
IplImage* img1 = cvLoadImage(argv[2]);
cvNamedWindow("原图1", CV_WINDOW_AUTOSIZE);
cvShowImage("原图1", img);
cvNamedWindow("原图2", CV_WINDOW_AUTOSIZE);
cvShowImage("原图2", img1); cvResize(img, img1); cvNamedWindow("尺寸调整", CV_WINDOW_AUTOSIZE); cvShowImage("尺寸调整", img1); cvWaitKey(0);
cvReleaseImage(&img); cvDestroyWindow("原图");
cvDestroyWindow("尺寸调整"); }

结果图:

OpenCV尺寸调整-LMLPHP

05-02 23:40