Image Processing Toolbox    
imresize

Resize an image

Syntax

Description

imresize resizes an image of any type using the specified interpolation method. method is a string that can have one of these values:

If you omit the method argument, imresize uses the default method of 'nearest'.

B = imresize(A,m,method) returns an image that is m times the size of A. If m is between 0 and 1.0, B is smaller than A. If m is greater than 1.0, B is larger than A.

B = imresize(A,[mrows ncols],method) returns an image of size
[mrows ncols]. If the specified size does not produce the same aspect ratio
as the input image has, the output image is distorted.

When the specified output size is smaller than the size of the input image, and method is 'bilinear' or 'bicubic', imresize applies a lowpass filter before interpolation to reduce aliasing. The default filter size is 11-by-11.

You can specify a different order for the default filter using

n is an integer scalar specifying the size of the filter, which is n-by-n. If n is 0 (zero), imresize omits the filtering step.

You can also specify your own filter h using

h is any two-dimensional FIR filter (such as those returned by ftrans2, fwind1, fwind2, or fsamp2).

Class Support

The input image, A, can be numeric or logical and it must be nonsparse. The output image, B, is of the same class as the input image.

See Also

imrotate, imtransform, tformarray; interp2 in the MATLAB Function Reference


  imregionalmin imrotate