April 2020
Intermediate to advanced
438 pages
12h 2m
English
Perform the following steps to use skimage.morphology module's implementation of a morphological watershed for binary image segmentation:
image = img_as_ubyte(rgb2gray(imread('images/circles.png')))
distance = ndi.distance_transform_edt(image)local_maximum = peak_local_max(distance, indices=False, footprint=np.ones((3, 3)), labels=image)markers = ndi.label(local_maximum)[0]
Read now
Unlock full access