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 masks pixels that are likely sunlit canopy.

Usage

mask_sunlit_canopy(caim, m = NULL)

Arguments

caim

SpatRaster. The return of a call to read_caim.

m

SpatRaster. A mask. For hemispherical photographs, check mask_hs. Default (NULL) is the equivalent to enter !is.na(caim$Red). See the Details section in local_fuzzy_thresholding to understand how this argument can modify the output.

Value

An object of class SpatRaster with values 0 and 1.

See Also

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

Examples

## Not run: 
caim <- read_caim() %>% normalize()
z <- zenith_image(ncol(caim), lens("Nikon_FCE9"))
m <- !is.na(z)
sunlit_canopy <- mask_sunlit_canopy(caim, m)
plot(sunlit_canopy)

## End(Not run)

rcaiman documentation built on Sept. 20, 2022, 1:05 a.m.