Regional thresholding of greyscale images.
regional_thresholding(
r,
segmentation,
method,
intercept = NULL,
slope = NULL,
prob = NULL
)
An object of class SpatRaster with values 0
and 1
.
SpatRaster. A normalized greyscale image. Typically, the
blue channel extracted from a canopy photograph. Please see read_caim()
and normalize()
.
SpatRaster. The result of segmenting r
.
Arguably, the result of a call to rings_segmentation()
will be the
preferred choice for fisheye images.
Character vector of length one. See details for current options.
Numeric vector of length one. These are linear function coefficients.
Numeric vector of length one. Probability for stats::quantile()
calculation.
Methods currently implemented are:
Diaz2018: method presented in
Diaz2018;textualrcaiman applied regionally. If this method is
selected, the arguments intercept
, slope
, and prob
should be provided.
It works segment-wise extracting the digital numbers per segment and passing
them to stats::quantile()
along with prob
, which aggregated result is in
turn passed to thr_mblt()
along with intercept
and slope
. Finally, this
threshold image is applied to obtain a binarized image.
Methods from autothresholdr package: this function can call
methods from autothresholdr::auto_thresh()
. For instance, use "IsoData"
to use the algorithm by isodata;textualrcaiman, which was
recommended by Jonckheere2005;textualrcaiman.
Method isodata from this package: Use "thr_isodata"
to
use thr_isodata()
.
Other Binarization Functions:
apply_thr()
,
obia()
,
ootb_mblt()
,
ootb_obia()
,
thr_isodata()
,
thr_mblt()