calc_co {rcaiman}R Documentation

Calculate canopy openness

Description

Calculate canopy openness

Usage

calc_co(bin, m = NULL, z, a, angle_width)

Arguments

bin

SpatRaster. Binarized hemispherical canopy image.

m

SpatRaster. A mask. For hemispherical photographs, check mask_hs().

z

SpatRaster built with zenith_image().

a

SpatRaster built with azimuth_image().

angle_width

Numeric vector of length one. It should be ⁠30, 15, 10, 7.5, 6, 5, 3.75, 3, 2.5, 1.875, 1⁠ or 0.5 degrees. This constrain is rooted in the requirement of a value able to divide both the 0 to 360 and 0 to 90 ranges into a whole number of segments.

Details

Canopy openness calculated as in the equation from Gonsamo et al. (2011):

CO=i=1NGF(ϕi,θi)[(cos(θ1)cos(θ2))/n]CO = \sum_{i = 1}^{N} GF(\phi_i, \theta_i) \cdot [(cos(\theta_1) - cos(\theta_2))/n],

where GF(ϕi,θi)GF(\phi_i, \theta_i) is the gap fraction of the cell ii, θ1\theta_1 and θ2\theta_2 are the minimum and maximum zenith angle of the cell ii, nn is the number of cells on the ring delimited by θ1\theta_1 and θ2\theta_2, and NN is the total number of cells.

When a mask is provided through the m argument, the equation is modified as follow:

CO=i=1NGF(ϕi,θi)[(cos(θ1)cos(θ2))/n]i=1N(cos(θ1)cos(θ2))/n \frac{ CO = \sum_{i = 1}^{N} GF(\phi_i, \theta_i) \cdot [(cos(\theta_1) - cos(\theta_2))/n] }{ \sum_{i = 1}^{N} (cos(\theta_1) - cos(\theta_2))/n} .

This allows the masking of any individual cell.

Value

Numeric vector of length one.

References

Gonsamo A, Walter JN, Pellikka P (2011). “CIMES: A package of programs for determining canopy geometry and solar radiation regimes through hemispherical photographs.” Computers and Electronics in Agriculture, 79(2), 207–215. doi:10.1016/j.compag.2011.10.001.

Examples

caim <- read_caim()
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
m <- mask_hs(z, 0, 70)
bin <- apply_thr(caim$Blue, thr_isodata(caim$Blue[m]))
plot(bin)
calc_co(bin, m, z, a, 10)


[Package rcaiman version 1.2.2 Index]