| Image Processing Toolbox | Search  Help Desk |
| imresize | See Also |
Syntax
B = imresize(A,m,method) B = imresize(A,[mrows ncols],method) B = imresize(...,method,n) B = imresize(...,method,h)
Description
imresize resizes an image of any type using the specified interpolation method. method is a string that can have one of these values:
'nearest' (default) uses nearest neighbor interpolation.
'bilinear' uses bilinear interpolation.
'bicubic' uses bicubic interpolation.
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 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:
[...] = imresize(...,method,n)
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:
[...]= imresize(...,method,h)
h is any two-dimensional FIR filter (such as those returned by ftrans2, fwind1, fwind2, or fsamp2).
Class Support
The input image can be of classuint8, uint16, or double. The output image is of the same class as the input image.
See Also
interp2 in the online MATLAB Function Reference