<< impyramid Spatial Transformations imrotate >>

IPCV - Image Processing and Computer Vision Toolbox for Scilab >> Spatial Transformations > imresize

imresize

Resizes image

Syntax

imout = imresize(imin, scale)
imout = imresize(imin, scale, interp)
imout = imresize(imin, [mrows ncols])
imout = imresize(imin, [mrows ncols], interp)

Parameters

imin :

An image which will be resized.

scale :

The size of resized image is [width, height] x scale .

[mrows ncols] :

The size of resized image.

interp :

Interpolation method. The value of interp must be one of the follows:

1. 'nearest' :

nearest-neigbor interpolation (default value);

2. 'bilinear' :

bilinear interpolation;

3. 'bicubic' :

bicubic interpolation;

4. 'area' :

resampling using pixel area relation.

Description

imresize resize the input image. When scale parameter is specified, the width and height of the image is resized in the same scale. There are four interpolation method can be used: nearest-neigbor, bilinear, bicubic and area methods. The default method is nearest-neigbor method.

Examples

im = imread(fullpath(getIPCVpath() + "/images/baboon.png"));
ima = imresize(im, 1.5);
imb = imresize(im, 1.5, 'bilinear');
imc = imresize(im, [100,200], 'bicubic');
imshow(ima);scf();imshow(imb);scf();imshow(imc);

See also

Authors


Report an issue
<< impyramid Spatial Transformations imrotate >>