Skip to content
/ watershed Public

A Python implementation of the watershed image segmentation algorithm

License

Notifications You must be signed in to change notification settings

mzur/watershed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Watershed

A simple (but not very fast) Python implementation of Determining watersheds in digital pictures via flooding simulations.

source image labelled image

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()

About

A Python implementation of the watershed image segmentation algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages