An image cannot be resized or rescaled inplace in OpenCV. You will need to create another image with the new size or scale and apply a resize operation.
Resizing or rescaling a
Mat is somewhat easier than dealing with a
IplImage. The code below illustrates these operations on both data types: