Description Usage Arguments Details Value See Also Examples
Quantify the colorfulness of a sRGB image using a bidimensional space form by the green/red and the blue/yellow axes of the CIE L*a*b* space, in other words, the lightness is excluded. In this bidimensional space, the algorithm creates a square with sides of 200 and centered in 0. Next, it compute how much area of this square is covered by the image pixels. The index is the percentage of cover.
1 2 3 4 | colorfulness(x, mask = NULL, plot = FALSE, returnRaster = FALSE)
## S4 method for signature 'CanopyPhoto'
colorfulness(x, mask = NULL, plot = FALSE, returnRaster = FALSE)
|
x |
|
mask |
BinImage. The default value |
plot |
logical. By default it is |
returnRaster |
logical. By default it is |
When you request a plot with argument plot = TRUE
, the
colorfulness is returned but also a plot is sent to the active graphics
Device. The plot shows the color of the image represented in a
bidimensional space made by the axis a and b of the CIE
L*a*b* space.
numeric or Raster
.
1 2 3 4 5 6 7 8 | x <- loadPhoto()
x <- normalize(x, 0, 255)
z <- makeZimage(ncol(x), lensPolyCoef(c(0.6427, 0.0346, -0.024491)))
m <- doMask(z, alim = asAngle(c(0, 10)), zlim = asAngle(c(30, 40)))
m <- doMask(z)
colorfulness(x, m, TRUE)
r <- colorfulness(x, m, TRUE, TRUE)
plotRGB(r)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.