3/17/2014

OpenCV Study, cvResize function

float percent = 50.0;
IplImage *source = cvLoadImage("bigImage.jpg");
IplImage *destination = cvCreateImage( cvSize((int)((source->width*percent)/100) , (int)((source->height*percent)/100) ),source->depth, source->nChannels );

//use cvResize to resize source to a destination image
cvResize(source, destination);

// save image with a name supplied with a second argument
cvSaveImage( "resizeImage.jpg", destination );