Watershed
A Python implementation of the watershed image segmentation algorithm
Install / Use
/learn @mzur/WatershedREADME
Watershed
A simple (but not very fast) Python implementation of Determining watersheds in digital pictures via flooding simulations.

In contrast to skimage.morphology.watershed and cv2.watershed this implementation does not use marker seeds.
Usage
import numpy as np
from Watershed import Watershed
from PIL import Image
import matplotlib.pyplot as plt
w = Watershed()
image = np.array(Image.open('ex.png'))
labels = w.apply(image)
plt.imshow(labels, cmap='Paired', interpolation='nearest')
plt.show()
