mask_sunlit_canopy: Mask sunlit canopy

View source: R/mask_sunlit_canopy.R

mask_sunlit_canopyR Documentation

Mask sunlit canopy

Description

It is a wrapper function around membership_to_color(). It was developed with images in sRGB color space \insertCiteDiaz2023rcaiman.

Usage

mask_sunlit_canopy(caim, m = NULL)

Arguments

caim

SpatRaster. The output of read_caim() or read_caim_raw().

m

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

Value

An object of class SpatRaster with values 0 and 1.

References

\insertAllCited

See Also

Other Segmentation Functions: chessboard(), polar_qtree(), qtree(), rings_segmentation(), sectors_segmentation(), select_sky_vault_region(), sky_grid_segmentation()

Examples

## Not run: 
path <- system.file("external/APC_0020.jpg", package = "rcaiman")
caim <- read_caim(path)
plotRGB(caim)
caim <- normalize_minmax(caim)
m <- mask_sunlit_canopy(caim)
plot(m)

## End(Not run)

GastonMauroDiaz/rcaiman documentation built on April 14, 2025, 9:39 a.m.