cvResize
IplImage *image = cvLoadImage("Sunset.jpg" ,1);
IplImage * reimage;
CvSize re_size;
re_size.height = 500;
re_size.width =500;
reimage = cvCreateImage(re_size ,image->depth ,image->nChannels);
cvResize(image ,reimage ,1);
printf("image width:%i heigth:%i \n" ,image->width ,image->height);
printf("reimage width:%i heigth:%i" ,reimage->width ,reimage->height);
cvNamedWindow("image" ,1);
cvNamedWindow("reimage" ,1);
cvShowImage("image",image);
cvShowImage("reimage",reimage);
cvWaitKey(0);
IplImage * reimage;
CvSize re_size;
re_size.height = 500;
re_size.width =500;
reimage = cvCreateImage(re_size ,image->depth ,image->nChannels);
cvResize(image ,reimage ,1);
printf("image width:%i heigth:%i \n" ,image->width ,image->height);
printf("reimage width:%i heigth:%i" ,reimage->width ,reimage->height);
cvNamedWindow("image" ,1);
cvNamedWindow("reimage" ,1);
cvShowImage("image",image);
cvShowImage("reimage",reimage);
cvWaitKey(0);
留言
張貼留言