extract_rl | R Documentation |
Extract the luminance relative to the zenith digital number
extract_rl(r, z, a, sky_points, no_of_points = 3, z_thr = 5, 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 of 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, therefore, dn and rl will be identical.
The point selection tool of ‘ImageJ’ software can be used to manually digitize points and create a CSV file from which to read coordinates (see Examples). After digitizing the points on the image, use the dropdown menu Analyze>Measure to open the Results window. To obtain the CSV file, use File>Save As...
Other Tool Functions:
colorfulness()
,
correct_vignetting()
,
defuzzify()
,
extract_dn()
,
extract_feature()
,
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()
## Not run:
caim <- read_caim() %>% normalize(., 0, 20847)
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
plotRGB(caim*255)
path <- system.file("external/sky_points.csv",
package = "rcaiman")
sky_points <- read.csv(path)
sky_points <- sky_points[c("Y", "X")]
colnames(sky_points) <- c("row", "col")
head(sky_points)
points(sky_points$col, nrow(caim) - sky_points$row, col = 2, pch = 10)
extract_rl(caim$Blue, 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.