watershed2: Alternative watershed algorithm

View source: R/utils_segmentation.R

watershed2R Documentation

Alternative watershed algorithm

Description

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().

Usage

watershed2(binary, dist_thresh = 0.75, plot = TRUE)

Arguments

binary

A binary image

dist_thresh

The distance threshold to create the

plot

If TRUE (default) plots the labeled objects

Value

The labelled version of binary.

Examples

library(pliman)
img <- image_pliman("soybean_touch.jpg")
binary <- image_binary(img, "B")[[1]]
wts <- watershed2(binary)
range(wts)

pliman documentation built on Oct. 15, 2023, 1:06 a.m.

Related to watershed2 in pliman...