imsubsample2 {imageUtilities} | R Documentation |
subsample an image to at most a certain size
imsubsample2(src, maxSize, method = c("every", "mean"), strict = TRUE)
src |
input image to downsample |
maxSize |
|
method |
'every' or 'mean'. See
|
strict |
whether to strictly enforce the image being at most maxSize, or allow slightly bigger if that works better than the smaller option. |
input image subsampled such that it is at *most* maxSize.
The factor to downsample by must be an integer, so the
integer chosen is ceiling(size/maxSize)
if
strict=TRUE
, and round(size/maxSize)
otherwise.
Aspect ratio is preserved.