Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/s/c/scikits-image-0.7.1/doc/gh-pages/0.3/_downloads/plot_watershed.py   scikits-image(Download)
from scipy import ndimage
import matplotlib.pyplot as plt
from scikits.image.morphology import watershed, is_local_maximum
 
# Generate an initial image with two overlapping circles
local_maxi = is_local_maximum(distance, image, np.ones((3, 3)))
markers = ndimage.label(local_maxi)[0]
labels = watershed(-distance, markers, mask=image)
 
plt.figure(figsize=(9, 3))