Resizes mat to new dimensions.
objectResize(
mat,
size = c(0, 0),
add_noise = TRUE,
random_seed = NULL,
bg = 0,
sd = 0
)
a numeric matrix.
a length 2 integer vector of final dimensions of the image, height 1st and width 2nd. Default is c(0,0) for no change.
if TRUE adds normal noise when size is larger than mat dimensions using rnorm(), from Rcpp. Default is TRUE.
a single value, interpreted as an integer, or NULL to be used with set.seed() from base when 'add_noise' is set to TRUE. Default is NULL.
mean value of the background added if add_noise is TRUE. Default is 0.
standard deviation of the background added if add_noise is TRUE. Default is 0.
a resized matrix with padding background if desired size is larger than original mat dimensions.