.. _example_plot_marked_watershed.py:


===============================
Markers for watershed transform
===============================

The watershed is a classical algorithm used for **segmentation**, that
is, for separating different objects in an image.

Here a marker image is build from the region of low gradient inside the image.

See Wikipedia_ for more details on the algorithm.

.. _Wikipedia: http://en.wikipedia.org/wiki/Watershed_(image_processing)


.. image:: images/plot_marked_watershed_1.png
    :align: center


.. literalinclude:: plot_marked_watershed.py
    :lines: 16-



**Python source code:** :download:`download <plot_marked_watershed.py>`
(generated using ``skimage`` |version|)



**IPython Notebook:** :download:`download <./notebook/plot_marked_watershed.ipynb>`
(generated using ``skimage`` |version|)

