Cookbook¶ Here is a collection of code fragments demonstrating some features of the OpenCV Python bindings. >>> import cv >>> im = cv.LoadImageM("building.jpg") >>> print type(im) <type 'cv.cvmat'> >>> cv.SaveImage("foo.png", im) Resize an image¶ To resize an image in OpenCV, create a destination image of the appropriate size, then call Resize . >>> import cv >>> original = cv.LoadImageM("building