This is a basic watershed algorithm that can be used as a faster alternative
to EBImage::watershed()
. I strongly suggest using this only with round
objects, since it doesn't consider both 'extension' and 'tolerance' arguments
of EBImage::watershed()
.
Examples
if (interactive() && requireNamespace("EBImage")) {
library(pliman)
img <- image_pliman("soybean_touch.jpg")
binary <- image_binary(img, "B")[[1]]
wts <- watershed2(binary)
range(wts)
}
#> [1] 0 30