View source: R/objectCleanse.R
objectCleanse | R Documentation |
Removes abnormalities (clipped/debris) from image.
objectCleanse(mat, msk, add_noise = TRUE, random_seed = NULL, bg = 0, sd = 0)
mat |
a numeric matrix (image). |
msk |
a numeric matrix (mask identifying abnormalities). |
add_noise |
if TRUE adds normal noise to background 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. |
According to msk, pixel values in mat are substituted by either bg [add_noise == FALSE] or rnorm(n = prod(dim(mat), mean=bg, sd=sd)) [add_noise == TRUE].
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.