Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

An image segmentation algorithm based on the watershed paradigm

Project description

Consult the module API page at

for all information related to this module, including information related to the latest changes to the code. The page at the URL shown above lists all of the module functionality you can invoke in your own code. That page also describes how you can directly access the segmented blobs in your own code and how you can apply a color filter to an image before its segmentation.

With regard to the basic purpose of the module, it is a Python implementation of the watershed algorithm for image segmentation. This implementation allows for both fully automatic and marker-assisted segmentation of an image.

Typical usage syntax:

    from Watershed import *
    shed = Watershed(
               data_image = "orchid0001.jpg",
               binary_or_gray_or_color = "color",
               size_for_calculations = 128,
               sigma = 1,
               gradient_threshold_as_fraction = 0.1,
               level_decimation_factor = 16,
               padding = 20,
    shed.mark_image_regions_for_gradient_mods()                     #(A)
    shed.modify_gradients_with_marker_minima()                      #(B)

The statements in lines (A) and (B) are needed only for marker-assisted
segmentation with the module.  For a fully automated implemented of the
BLM algorithm, you would need to delete those two statements.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Watershed, version 2.2.1
Filename, size File type Python version Upload date Hashes
Filename, size Watershed-2.2.1.tar.gz (22.5 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page