diff --git a/doc/examples/plot_watershed.py b/doc/examples/plot_watershed.py index 0fea79f2..7927cb90 100644 --- a/doc/examples/plot_watershed.py +++ b/doc/examples/plot_watershed.py @@ -3,23 +3,25 @@ Watershed segmentation ====================== -The watershed is a classical algorithm used for **segmentation**, that is, for -separating different objects in an image. +The watershed is a classical algorithm used for **segmentation**, that +is, for separating different objects in an image. -Starting from user-defined markers, the watershed algorithm treats pixels -values as a local topography (elevation). The algorithm floods basins from the -markers, until basins attributed to different markers meet on watershed lines. -In many cases, markers are chosen as local minima of the image, from which -basins are flooded. +Starting from user-defined markers, the watershed algorithm treats +pixels values as a local topography (elevation). The algorithm floods +basins from the markers, until basins attributed to different markers +meet on watershed lines. In many cases, markers are chosen as local +minima of the image, from which basins are flooded. -In the example below, two overlapping circles are to be separated. To do so, -one computes an image that is the distance to the background. The maxima of -this distance (i.e., the minima of the opposite of the distance) are chosen as -markers, and the flooding of basins from such markers separates the two circles -along a watershed line. +In the example below, two overlapping circles are to be separated. To +do so, one computes an image that is the distance to the +background. The maxima of this distance (i.e., the minima of the +opposite of the distance) are chosen as markers, and the flooding of +basins from such markers separates the two circles along a watershed +line. -See http://en.wikipedia.org/wiki/Watershed_(image_processing) for more details -on the algorithm. +See `Wikipedia +`__ for +more details on the algorithm. """ import numpy as np