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()
.
Arguments
- binary
A binary image
- dist_thresh
The distance threshold to create the
- plot
If
TRUE
(default) plots the labeled objects
Examples
library(pliman)
img <- image_pliman("soybean_touch.jpg")
binary <- image_binary(img, "B")[[1]]
wts <- watershed2(binary)
range(wts)
#> [1] 0 30