obia {rcaiman} | R Documentation |
Do object-based image analysis of canopy photographs
Description
Object-based image analysis targeting the canopy silhouette.
Usage
obia(r, z = NULL, a = NULL, bin, segmentation, gf_mn = 0.2, gf_mx = 0.95)
Arguments
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. |
Details
This method was first presented in Díaz and Lencinas (2015).
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
Díaz and Lencinas (2015) in addition to this package
(citation("rcaiman"
).
Value
References
Díaz GM, Lencinas JD (2015). “Enhanced gap fraction extraction from hemispherical photography.” IEEE Geoscience and Remote Sensing Letters, 12(8), 1785–1789. doi:10.1109/lgrs.2015.2425931.
See Also
Other Binarization Functions:
apply_thr()
,
ootb_mblt()
,
ootb_obia()
,
regional_thresholding()
,
thr_isodata()
,
thr_mblt()
Examples
## 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)