extract_rl | R Documentation |
Extract the luminance relative to the zenith digital number.
extract_rl(
r,
z,
a,
sky_points,
no_of_points = 20,
z_thr = 2,
use_window = TRUE
)
r |
SpatRaster. A normalized greyscale image. Typically,
the blue channel extracted from a canopy photograph. Please see
|
z |
SpatRaster built with |
a |
SpatRaster built with |
sky_points |
An object of class data.frame. The result of a call
to |
no_of_points |
Numeric vector on length one. The number of near-zenith points required for the estimation of the zenith DN. |
z_thr |
Numeric vector on length one. The starting maximum zenith angle used to search for near-zenith points. |
use_window |
Logical vector of length one. If |
The search for near-zenith points starts in the region ranged between
0
and z_thr
. If the number of near-zenith points is less than
no_of_points
, the region increases by steps of 2
degrees of
zenith angle till the required number of points is reached.
A list of three objects, zenith_dn and max_zenith_angle
from the class numeric, and sky_points from the class
data.frame; zenith_dn is the estimated zenith digital number,
max_zenith_angle is the maximum zenith angle reached in the search
for near-zenith sky points, and sky_points is the input argument
sky_points
with the additional columns: a, z,
dn, and rl, which stand for azimuth and zenith angle in
degrees, digital number, and relative luminance, respectively. If
NULL
is provided as no_of_points
, then zenith_dn is
forced to one and dn, and rl are equals.
Other Tool Functions:
colorfulness()
,
defuzzify()
,
extract_dn()
,
extract_feature()
,
extract_sky_points()
,
masking()
,
read_bin()
,
read_caim()
,
write_bin()
,
write_caim()
## Not run:
path <- system.file("external/DSCN4500.JPG", package = "rcaiman")
caim <- read_caim(path, c(1280, 960) - 745, 745 * 2, 745 * 2)
z <- zenith_image(ncol(caim), lens("Nikon_FCE9"))
a <- azimuth_image(z)
r <- gbc(caim$Blue)
g <- sky_grid_segmentation(z, a, 10)
bin <- find_sky_pixels(r, z, a)
sky_points <- extract_sky_points(r, bin, g)
rl <- extract_rl(r, z, a, sky_points, 1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.