View source: R/ootb_fit_cie_sky_model.R
ootb_fit_cie_sky_model | R Documentation |
This function is a hard-coded version of a pipeline that uses these main
functions extract_sun_coord()
, extract_sky_points()
, sor_filter()
,
extract_rel_radiance()
, fit_cie_sky_model()
, and
validate_cie_sky_model()
.
ootb_fit_cie_sky_model(r, z, a, m, bin, gs, min_spherical_dist)
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 |
m |
SpatRaster. A mask, check |
bin |
SpatRaster. This should be a preliminary binarization of
|
gs |
An object of the class list. A list with the output of
|
min_spherical_dist |
Numeric vector. These values will be passed to the
|
This function is part of the efforts to automate the method proposed by \insertCiteLang2010;textualrcaiman. A paper for thoroughly presenting and testing this pipeline is under preparation.
A list with the following components:
An object of the SpatRaster) with the predicted digital number values.
The output produced by fit_cie_sky_model()
.
The output produced by validate_cie_sky_model()
.
The dist_to_black
argument used in extract_sky_points()
.
The min_spherical_dist
argument used to filter the sky points.
The sky_points
argument used in extract_rel_radiance()
.
Other Sky Reconstruction Functions:
cie_sky_image()
,
fit_cie_sky_model()
,
fit_coneshaped_model()
,
fit_trend_surface()
,
interpolate_sky_points()
,
ootb_interpolate_and_merge()
## Not run:
caim <- read_caim()
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
m <- !is.na(z)
r <- caim$Blue
bin <- regional_thresholding(r, rings_segmentation(z, 30),
method = "thr_isodata")
g <- sky_grid_segmentation(z, a, 10)
sun_coord <- extract_sun_coord(r, z, a, bin, g)
sun_coord$zenith_azimuth
.a <- azimuth_image(z, orientation = sun_coord$zenith_azimuth[2]+90)
seg <- sectors_segmentation(.a, 180) * rings_segmentation(z, 30)
bin <- regional_thresholding(r, seg, method = "thr_isodata")
mx <- optim_normalize(caim, bin)
caim <- normalize_minmax(caim, mx = mx, force_range = TRUE)
ecaim <- enhance_caim(caim, m, polarLAB(50, 17, 293))
bin <- apply_thr(ecaim, thr_isodata(ecaim[m]))
bin <- bin & select_sky_vault_region(z, 0, 85)
plot(bin)
set.seed(7)
gs <- list(
sky_grid_segmentation(z, a, 1.875, first_ring_different = TRUE),
sky_grid_segmentation(z, a, 6, first_ring_different = TRUE),
sky_grid_segmentation(z, a, 10, first_ring_different = TRUE)
)
sky <- ootb_fit_cie_sky_model(r, z, a, m, bin , gs,
min_spherical_dist = seq(3, 9, 3))
sky$sky
plot(sky$sky)
sky$model_validation$rmse
plot(r/sky$sky>1.15)
plot(sky$model_validation$pred, sky$model_validation$obs)
abline(0,1)
plot(bin)
points(sky$sky_points$col, nrow(caim) - sky$sky_points$row, col = 2, pch = 10)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.