bnormalize | R Documentation |
Adjust values of an image to a common background.
bnormalize(img, inputRange, quant = 0.005, nonzero = FALSE, ...)
img |
Grayscale |
inputRange |
A numeric vector of 2 values specifying the expected range of intensity values. |
quant |
Quantile to serve as the common baseline, default of 0.005. |
nonzero |
Should zero values be ignored in quantile calculation? |
... |
Additional arguments are accepted but ignored in order to remain compatible with previous versions of this function. |
Each frame of an Image
will be linearly scaled to have an
identical value at the specified quantile. If inputRange
is missing,
it will be taken as the actual range of values in img
.
Each frame of the image will be adjusted by subtracting the median value at
the specified quantile and adding quant * inputRange[2]
. Negative
values will be clipped to 0. Note that if inputRange
is not specified, the different image objects will not necessarily share
the same background value.
Image
object linearly scaled to have a common background.
cell <- readImage(system.file("extdata", "by_folder/b2/file002.tif",
package = "virustiter"))
N <- prod(dim(cell)[1:2])
cells <- Image(rep(imageData(cell), 4), dim = c(dim(cell), 4))
cells[,,2] <- cell + 0.005
cells[,,3] <- cell + 0.01
cells[,,4] <- cell + 0.02
cells <- normalize(cells, separate = FALSE)
plot(cells, all = TRUE)
plot(bnormalize(cells), all = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.