objectResize {IFC} | R Documentation |
Object Resizing
Description
Resizes mat to new dimensions.
Usage
objectResize(
mat,
size = c(0, 0),
add_noise = TRUE,
random_seed = NULL,
bg = 0,
sd = 0
)
Arguments
mat |
a numeric matrix. |
size |
a length 2 integer vector of final dimensions of the image, height 1st and width 2nd. Default is c(0,0) for no change. |
add_noise |
if TRUE adds normal noise when size is larger than mat dimensions using rnorm(), from Rcpp. Default is TRUE. |
random_seed |
a list of elements to pass to set.seed or a single value, interpreted as an integer, or NULL to be used when 'add_noise' is set to TRUE. Default is NULL. Note that NA_integer_ or list(seed = NA_integer_) can be used to not call set.seed at all. |
bg |
mean value of the background added if add_noise is TRUE. Default is 0. |
sd |
standard deviation of the background added if add_noise is TRUE. Default is 0. |
Value
a resized matrix with padding background if desired size is larger than original mat dimensions.