resizecv

Resizes the given image, handle.

Syntax

R = resizecv(handle, size)

R = resizecv(handle, size, fx)

R = resizecv(handle, size, fx, fy)

R = resizecv(handle, size, fx, interpolation)

Inputs

handle
Handle of an image.
Type: integer
size
Real vector of [width height] representing the dimensions of R.
Type: vector
fx
Optional parameter representing the scale factor along the x-axis. Default value is 0.0.
Type: scalar
fy
Optional parameter representing the scale factor along the y-axis. Default value is 0.0.
Type: scalar
interpolation
Optional parameter specifying the interpolation method. Default value is 1 (linear interpolation). Valid values are:
0
Nearest neighbor interpolation.
1
Bilinear interpolation (default).
2
Bicubic interpolation.
3
Resampling using pixel area relation. Preferred for image decimation.
4
Lanczos interpolation over 8x8 neighborhood.
5
Bit exact bilinear interpolation.
6
Bit exact nearest neighbor interpolation.
7
Mask for interpolation codes.
8
Flag for filling output image pixels.
16
Flag for inverse transformation.
Type: integer

Outputs

R
Handle of the resized image.
Type: integer

Example

Crop an image to the region of interest in pixels :

handle = imreadcv('image1.jpg');
R = resizecv(handle, [250 200]);