Sunday, February 7, 2010

Resize image in opencv

from opencv.cv import *
from opencv.highgui import *



if __name__ == '__main__':
   
   
    ipl = cvLoadImage("/home/selva/Desktop/me.jpg");
    newImage = cvCreateImage(cvSize(48, 16), ipl.depth, ipl.nChannels);
    cvResize(ipl, newImage, CV_INTER_LINEAR);

    cvNamedWindow("image pop", CV_WINDOW_AUTOSIZE)
    cvShowImage("image pop",newImage)
    cvWaitKey()

No comments:

Post a Comment