colorfulness {rcaiman}R Documentation

Quantify colorfulness

Description

Quantify the colorfulness of an image

Usage

colorfulness(caim, m = NULL)

Arguments

caim

SpatRaster. The return of a call to read_caim() or read_caim_raw().

m

SpatRaster. A mask. For hemispherical photographs, check mask_hs(). Default (NULL) is the equivalent to enter !is.na(caim$Red).

Details

Quantify the colorfulness of an sRGB image using a bidimensional space formed by the green/red and the blue/yellow axes of the CIE LAB space, symbolized with A and B, respectively. The colorfulness index (CI) is defined as

CI = \dfrac{A_o}{A_p} \cdot 100,

where A_o and A_p are the observed and potential area of the AB plane. A_o refers to the colors from the image while A_p to the colors from the whole sRGB cube.

Value

A numeric vector of length one.

Note

An early version of this function was used in Martin et al. (2020).

References

Martin DA, Wurz A, Osen K, Grass I, Hölscher D, Rabemanantsoa T, Tscharntke T, Kreft H (2020). “Shade-Tree Rehabilitation in Vanilla Agroforests is Yield Neutral and May Translate into Landscape-Scale Canopy Cover Gains.” Ecosystems, 24(5), 1253–1267. doi:10.1007/s10021-020-00586-5.

See Also

Other Tool Functions: correct_vignetting(), defuzzify(), extract_dn(), extract_feature(), extract_rl(), extract_sky_points_simple(), extract_sky_points(), extract_sun_coord(), find_sky_pixels_nonnull(), find_sky_pixels(), masking(), optim_normalize(), percentage_of_clipped_highlights(), read_bin(), read_caim_raw(), read_caim(), write_bin(), write_caim()

Examples

caim <- read_caim() %>% normalize()
colorfulness(caim)

[Package rcaiman version 1.2.2 Index]