View source: R/utils_segmentation.R
watershed2 | R Documentation |
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()
.
watershed2(binary, dist_thresh = 0.75, plot = TRUE)
binary |
A binary image |
dist_thresh |
The distance threshold to create the |
plot |
If |
The labelled version of binary
.
library(pliman)
img <- image_pliman("soybean_touch.jpg")
binary <- image_binary(img, "B")[[1]]
wts <- watershed2(binary)
range(wts)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.