Split touching objects#

In this section we will split objects in binary images that have a roundish shape and touch each other. We will use the napari plugin napari-segment-blobs-and-things-with-membranes. Under the hood, this plugins uses functions from scikit-image.

from napari_segment_blobs_and_things_with_membranes import threshold_otsu, split_touching_objects
from skimage.io import imread
from skimage import data
from pyclesperanto_prototype import imshow

Starting point for this is a binary image, e.g. made using thresholding.

blobs = imread('../../data/blobs.tif')

binary = threshold_otsu(blobs)


We can then split the touching object by only taking the binary image into account. The underlying algorithm aims to produce similar results to ImageJ’s binary watershed algorithm and the implementation here also works in 3D.

split_objects = split_touching_objects(binary)