obia | R Documentation |
Object-based image analysis targeting the canopy silhouette.
obia(r, z = NULL, a = NULL, bin, segmentation, gf_mn = 0.2, gf_mx = 0.95)
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 |
bin |
SpatRaster. This should be a working binarization of |
segmentation |
SpatRaster built with |
gf_mn, gf_mx |
Numeric vector of length one. The minimum/maximum gap fraction that a segment should comply with to be considered as one containing foliage. |
This method was first presented in \insertCiteDiaz2015;textualrcaiman.
This version is simpler since it relies on a better working binarized image.
The version from 2015 uses an automatic selection of samples followed by a
knn classification of segments containing foliage. This version uses
de gap fraction extracted from bin
to classify foliage by defining upper
and lower limits through the arguments gf_mx
and gf_mn
.
This method produces a synthetic layer by computing the ratio of r
to the
maximum value of r
at the segment level. This process is carried out only
on the pixels covered by the classes foliage and sky. The latter is
defined by bin
equal to one. To avoid spurious values, the quantile 0.9
is computed instead of the maximum. Pixels not belonging to the class
foliage return as NA
.
Default values of z
and a
allows the processing of restricted view
photographs.
If you use this function in your research, please cite
\insertCiteDiaz2015;textualrcaiman in addition to this package
(citation("rcaiman"
).
SpatRaster.
Other Binarization Functions:
apply_thr()
,
ootb_mblt()
,
ootb_obia()
,
regional_thresholding()
,
thr_isodata()
,
thr_mblt()
## Not run:
caim <- read_caim() %>% normalize()
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
m <- !is.na(z)
ecaim <- enhance_caim(caim, m)
bin <- apply_thr(ecaim, thr_isodata(ecaim[m]))
plot(bin)
seg <- polar_qtree(caim, z, a)
synth <- obia(caim$Blue, z, a, bin, seg)
plot(synth)
foliage <- !is.na(synth)
hist(synth[foliage])
synth <- terra::cover(synth, bin)
plot(synth)
hist(synth[foliage])
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.