Watershed#
Principle#
The concept of watershed considers the image as a topographic map: high intensities in the image are the mountains and low intensities are the valleys. The principal objectives of the watershed segmentation method is to find the crest lines of the topographic map, where a drop of water placed on one of these crest lines would be equally likely to fall on one side or the other of the line.
The basic idea of watershed segmentation is to flood the topographic map and letting water rise through the valleys at a uniform rate. When the rising water of two distinct valleys is about to merge, a dam is built to prevent the merging. When water covers the entire surface of the image, the dams correspond to the segmentation boundaries.
Application to an image#
Generally, the contours of the objects do not correspond to the crest lines, so the watershed has to be applied to the gradient of the image (see Fig. 75).
Limitations#
One of the limitations of the watershed method appears when there are many local minima in the image: the watershed leads to over-segmentation because each local minimum will produce a segment. This phenomenon is illustrated Fig. 76 where the image is the same as in Fig. 75 but degraded by additive noise and JPEG. Therefore the image gradient now presents some small local minima.
To reduce the number of segments, one can: