View source: R/ootb_interpolate_and_merge.R
ootb_interpolate_and_merge | R Documentation |
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.
ootb_interpolate_and_merge(
r,
z,
a,
sky_points,
ootb_sky,
rmax_tune = 1,
use_window = TRUE
)
r |
SpatRaster. Typically, the blue channel extracted from a
canopy photograph. The image from which |
z |
SpatRaster built with |
a |
SpatRaster built with |
sky_points |
The output of |
ootb_sky |
An object of the class |
rmax_tune |
Numeric vector of length one. It must be a positive integer.
It is used to fine tune the |
use_window |
Logical vector of length one. If |
An object of class SpatRaster.
Other Sky Reconstruction Functions:
cie_sky_image()
,
fit_cie_sky_model()
,
fit_coneshaped_model()
,
fit_trend_surface()
,
interpolate_sky_points()
,
ootb_fit_cie_sky_model()
## Not run:
caim <- read_caim()
r <- caim$Blue
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
path <- system.file("external/ootb_sky.txt", package = "rcaiman")
ootb_sky <- read_ootb_sky_model(gsub(".txt", "", path), z, a)
sky <- ootb_interpolate_and_merge(r, z, a, ootb_sky$sky_points, ootb_sky)
plot(sky$sky)
# See fit_cie_sky_model() for details on below file
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)
plot(caim$Blue)
points(sky_points$col, nrow(caim) - sky_points$row, col = 2, pch = 10)
sky_points <- rbind(sky_points, ootb_sky$sky_points[, c("row", "col")])
sky <- ootb_interpolate_and_merge(r, z, a, ootb_sky$sky_points,
ootb_sky)
plot(sky$sky)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.