| cv.resize - MATLAB File Help |
Resizes an image
dst = cv.resize(src, dsize)
dst = cv.resize(src, fx, fy)
dst = cv.resize(..., 'OptionName',optionValue, ...)
[w,h].When scale factors are specified, the output image size is computed as:
dsize = round([fx*size(src,2), fy*size(src,1)]).
dsize or the size computed from
size(src) and fx and fy. The type of dst is the same as of src.The function cv.resize resizes the image src down to or up to the
specified size. The size and type of dst are derived from src, dsize,
fx and fy. If you want to resize src so that it fits a specified size,
you may call the function as follows:
dst = cv.resize(src, [w,h], 'Interpolation',interp)
If you want to decimate the image by factor of 2 in each direction, you can call the function this way:
dst = cv.resize(src, 0.5, 0.5, 'Interpolation',interp)
To shrink an image, it will generally look best with 'Area' interpolation, whereas to enlarge an image, it will generally look best with 'Cubic' (slow) or 'Linear' (faster but still looks OK).