How to resize or rescale in OpenCV

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:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s