Quantify the colorfulness of an sRGB image using a bidimensional space formed by the green/red and the blue/yellow axes of the CIE L*a*b* space, symbolized with a* and b*, respectively. The proposed index is defined as the surface of the a*b* plane covered by colors from the image relative to the surface that the whole sRGB cube covers in the same plane, expressed in percentage.
colorfulness(caim, m = NULL, plot = FALSE)
SpatRaster. The return of a call to
SpatRaster. A mask. For hemispherical photographs,
Logical vector of length one. If is
Pixels from the image covered by pixels from
m with value
will be taking into account in the computations.
plot = TRUE is used, a plot is sent to the active graphics device.
It shows the color from the image plotted into a bidimensional space made by
the axis a* and b* of the CIE L*a*b* space.
An early version of this function was used in \insertCiteMartin2020;textualrcaiman.
A numeric vector of length one and, if the argument
TRUE, an object returned by
plot is send to the
Other Tool Functions:
caim <- read_caim() %>% normalize() plotRGB(caim*255) colorfulness(caim) path <- system.file("external/DSCN4500.JPG", package = "rcaiman") caim <- read_caim(path, c(1280, 960) - 745, 745 * 2, 745 * 2) %>% normalize() plotRGB(caim*255) colorfulness(caim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.