View source: R/calc_oor_index.R
calc_oor_index | R Documentation |
The out-out-of-range (OOR) index is calculated as foollow:
calc_oor_index(r, sky)
r |
SpatRaster. The blue channel of a canopy photograph. |
sky |
SpatRaster. The blue radiance of the unobscured sky |
\sum_{i = 1}^{N}(r_i/sky_i)^2
,
where r
is a canopy image with radiance data, sky
is an
image with unobstructed sky radiance data, i
is the index that
represents the position of a given pixel on the raster grid, and N
is
the total number of pixels that satisfy: r_i/sky_i<0
or
r_i/sky_i>1
.
Numeric vector of length one.
Other Tool Functions:
calc_spherical_distance()
,
colorfulness()
,
correct_vignetting()
,
defuzzify()
,
display_caim()
,
extract_dn()
,
extract_feature()
,
extract_rel_radiance()
,
extract_sky_points()
,
extract_sun_coord()
,
find_sky_pixels()
,
masking()
,
optim_dist_to_black()
,
optim_normalize()
,
percentage_of_clipped_highlights()
,
read_bin()
,
read_caim()
,
read_caim_raw()
,
read_ootb_sky_model()
,
sor_filter()
,
vicinity_filter()
,
write_bin()
,
write_caim()
,
write_ootb_sky_model()
## Not run:
path <- system.file("external/DSCN4500.JPG", package = "rcaiman")
caim <- read_caim(path, c(1250, 1020) - 745, 745 * 2, 745 * 2)
z <- zenith_image(ncol(caim), lens("Nikon_FCE9"))
a <- azimuth_image(z)
r <- gbc(caim$Blue)
r <- correct_vignetting(r, z, c(0.0638, -0.101)) %>% normalize_minmax()
bin <- regional_thresholding(r, rings_segmentation(z, 30), "thr_isodata")
bin <- bin & select_sky_vault_region(z, 0, 80)
sky_points <- extract_sky_points(r, bin, sky_grid_segmentation(z, a, 3))
sky_points <- extract_rel_radiance(r, z, a, sky_points, no_of_points = NULL)
model <- fit_coneshaped_model(sky_points$sky_points)
summary(model$model)
sky_cs <- model$fun(z, a)
plot(r/sky_cs)
calc_oor_index(r, sky_cs)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.