View source: R/rem_isolated_black_pixels.R
rem_isolated_black_pixels | R Documentation |
Remove isolated black pixels
rem_isolated_black_pixels(bin)
bin |
SpatRaster. Binarized canopy image. |
An object of class SpatRaster with values 0
and 1
.
Other Binarization Functions:
apply_thr()
,
obia()
,
ootb_mblt()
,
ootb_obia()
,
regional_thresholding()
,
thr_isodata()
,
thr_mblt()
## 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")
sky <- read_ootb_sky_model(gsub(".txt", "", path), z, a)
bin <- apply_thr(r/sky$sky, 0.9)
plot(bin)
bin2 <- rem_isolated_black_pixels(bin)
plot(bin2)
plot(bin2 - bin)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.