Finds the background of a grayscale image, resulting in a black and white image.

Binarizes based on quantile of nonzero values.

Uses median smoothing and morphological opening for improved smoothness.

An alternative to something like .!ImageBinarization.binarize(image, ImageBinarization.Otsu())`


Finds, isolates, and removes edges in a grayscale image.

Potentially useful to increase distance between bordering cell nuclei.

TODO: Examine if Otsu's method is best binarization for edges. TODO: Make edge thickening (by morphological dilation) independent of image resolution.


Segment nucleui or cells using marked watershed method.

If markers are not provided, they are established using a distance from the background, thresholded to a quantile of foreground distances from background.

Using a different background for markers is supported as well.