In geology, a watershed is a divide that separates adjacent catchment basins.
The idea was introduced in 1979 by S. Beucher and C. Lantuéjoul.2 The basic idea consisted of placing a water source in each regional minimum in the relief, to flood the entire relief from sources, and build barriers when different water sources meet. The resulting set of barriers constitutes a watershed by flooding. A number of improvements, collectively called Priority-Flood, have since been made to this algorithm.3
Intuitively, a drop of water falling on a topographic relief flows towards the "nearest" minimum. The "nearest" minimum is that minimum which lies at the end of the path of steepest descent. In terms of topography, this occurs if the point lies in the catchment basin of that minimum. The previous definition does not verify this condition.
Intuitively, the watershed is a separation of the regional minima from which a drop of water can flow down towards distinct minima. A formalization of this intuitive idea was provided in 4 for defining a watershed of an edge-weighted graph.
S. Beucher and F. Meyer introduced an algorithmic inter-pixel implementation of the watershed method,5 given the following procedure:
Previous notions focus on catchment basins, but not to the produced separating line. The topological watershed was introduced by M. Couprie and G. Bertrand in 1997,6 and beneficiate of the following fundamental property. A function W is a watershed of a function F if and only if W ≤ F and W preserves the contrast between the regional minima of F; where the contrast between two regional minima M1 and M2 is defined as the minimal altitude to which one must climb in order to go from M1 to M2.7 An efficient algorithm is detailed in the paper.8
Watershed algorithm
Different approaches may be employed to use the watershed principle for image segmentation.
One of the most common watershed algorithms was introduced by F. Meyer in the early 1990s, though a number of improvements, collectively called Priority-Flood, have since been made to this algorithm,9 including variants suitable for datasets consisting of trillions of pixels.10
The algorithm works on a gray scale image. During the successive flooding of the grey value relief, watersheds with adjacent catchment basins are constructed. This flooding process is performed on the gradient image, i.e. the basins should emerge along the edges. Normally this will lead to an over-segmentation of the image, especially for noisy image material, e.g. medical CT data. Either the image must be pre-processed or the regions must be merged on the basis of a similarity criterion afterwards.
The non-labeled pixels are the watershed lines.
Watersheds as optimal spanning forest have been introduced by Jean Cousty et al.11 They establish the consistency of these watersheds: they can be equivalently defined by their “catchment basins” (through a steepest descent property) or by the “dividing lines” separating these catchment basins (through the drop of water principle). Then they prove, through an equivalence theorem, their optimality in terms of minimum spanning forests. Afterward, they introduce a linear-time algorithm to compute them. It is worthwhile to note that similar properties are not verified in other frameworks and the proposed algorithm is the most efficient existing algorithm, both in theory and practice.
In 2007, C. Allène et al.12 established links relating Graph Cuts to optimal spanning forests. More precisely, they show that when the power of the weights of the graph is above a certain number, the cut minimizing the graph cuts energy is a cut by maximum spanning forest.
The image foresting transform (IFT) of Falcao et al.13 is a procedure for computing shortest path forests. It has been proved by J. Cousty et al.14 that when the markers of the IFT corresponds to extrema of the weight function, the cut induced by the forest is a watershed cut.
The random walker algorithm is a segmentation algorithm solving the combinatorial Dirichlet problem, adapted to image segmentation by L. Grady in 2006.15 In 2011, C. Couprie et al. proved that when the power of the weights of the graph converge toward infinity, the cut minimizing the random walker energy is a cut by maximum spanning forest.16
A hierarchical watershed transformation converts the result into a graph display (i.e. the neighbor relationships of the segmented regions are determined) and applies further watershed transformations recursively. See 17 for more details. A theory linking watershed to hierarchical segmentations has been developed in18
L. Najman and M. Schmitt. Watershed of a continuous function. In Signal Processing (Special issue on Mathematical Morphology.), Vol. 38 (1994), pages 99–112 https://hal-upec-upem.archives-ouvertes.fr/hal-00622129/file/lpe.pdf ↩
Serge Beucher and Christian Lantuéj workshop on image processing, real-time edge and motion detection (1979). http://cmm.ensmp.fr/~beucher/publi/watershed.pdf http://cmm.ensmp.fr/~beucher/publi/watershed.pdf ↩
Barnes, R., Lehman, C., Mulla, D., 2014. Priority-flood: An optimal depression-filling and watershed-labeling algorithm for digital elevation models. Computers & Geosciences 62, 117–127. doi:10.1016/j.cageo.2013.04.024 https://arxiv.org/abs/1511.04463 ↩
J. Cousty, G. Bertrand, L. Najman and M. Couprie. Watershed Cuts: Minimum Spanning Forests and the Drop of Water Principle, IEEE Transactions on Pattern Analysis and Machine Intelligence 31(8) pp. 1362-1374, 2009, https://hal.inria.fr/hal-01113462/document ↩
Serge Beucher and Fernand Meyer. The morphological approach to segmentation: the watershed transformation. In Mathematical Morphology in Image Processing (Ed. E. R. Dougherty), pages 433–481 (1993). https://www.researchgate.net/profile/Serge_Beucher/publication/233950923_Segmentation_The_Watershed_Transformation_Mathematical_Morphology_in_Image_Processing/links/55f7c6ce08aeba1d9efe4072/Segmentation-The-Watershed-Transformation-Mathematical-Morphology-in-Image-Processing.pdf ↩
M. Couprie, G. Bertrand. Topological gray-scale watershed transform. In Proc. of SPIE Vision Geometry V, volume 3168, pages 136–146 (1997). http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.3.7654&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.3.7654&rep=rep1&type=pdf ↩
G. Bertrand. On topological watersheds. Journal of Mathematical Imaging and Vision, 22(2–3), pages 217–230 (2005). https://hal-upec-upem.archives-ouvertes.fr/docs/00/62/23/98/PDF/hal.pdf ↩
Michel Couprie, Laurent Najman, Gilles Bertrand. Quasi-linear algorithms for the topological watershed. Journal of Mathematical Imaging and Vision, Springer Verlag, 2005, 22 (2-3), pp.231-249. https://hal-upec-upem.archives-ouvertes.fr/hal-00622399/file/hal.pdf ↩
Barnes, R., 2016. Parallel priority-flood depression filling for trillion cell digital elevation models on desktops or clusters. Computers & Geosciences. doi:10.1016/j.cageo.2016.07.001 /wiki/Doi_(identifier) ↩
Jean Cousty, Gilles Bertrand, Laurent Najman, and Michel Couprie. Watershed Cuts: Minimum Spanning Forests and the Drop of Water Principle. IEEE Transactions on Pattern Analysis and Machine Intelligence. 31 (8). August 2009. pp. 1362–1374. https://hal.inria.fr/hal-01113462/document ↩
Cédric Allène, Jean-Yves Audibert, Michel Couprie and Renaud Keriven : "Some links between min-cuts, optimal spanning forests and watersheds", Image and Vision Computing, 2009. https://web.archive.org/web/20190217100456/http://pdfs.semanticscholar.org/049b/6ea4c3e70c7249fd4538dec8dc8f24bdde8b.pdf ↩
Falcao, A.X. Stolfi, J. de Alencar Lotufo, R. : "The image foresting transform: theory, algorithms, and applications", In PAMI, 2004 https://www.researchgate.net/profile/Roberto_Lotufo/publication/8331682_The_image_foresting_transform_theory_algorithms_and_applications/links/0912f50b724229bf0d000000.pdf ↩
Jean Cousty, Gilles Bertrand, Laurent Najman, and Michel Couprie. Watershed cuts: thinnings, shortest-path forests and topological watersheds. IEEE Transactions on Pattern Analysis and Machine Intelligence. 32 (5). 2010. pp. 925–939. https://hal-upec-upem.archives-ouvertes.fr/hal-00729346/document ↩
Grady, L.: "Random walks for image segmentation". PAMI, 2006 http://leogrady.net/wp-content/uploads/2017/01/grady2006random.pdf ↩
Camille Couprie, Leo Grady, Laurent Najman and Hugues Talbot, "Power Watersheds: A Unifying Graph-Based Optimization Framework”, IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 33, No. 7, pp. 1384-1399, July 2011 http://leogrady.net/wp-content/uploads/2017/01/couprie2011power.pdf ↩
Laurent Najman, Michel Schmitt. Geodesic Saliency of Watershed Contours and Hierarchical Segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, Institute of Electrical and Electronics Engineers, 1996, 18 (12), pp.1163-1173. https://hal-upec-upem.archives-ouvertes.fr/hal-00622128/document ↩
Laurent Najman. On the equivalence between hierarchical segmentations and ultrametric watersheds. Journal of Mathematical Imaging and Vision, Springer Verlag, 2011, 40 (3), pp.231-247. https://arxiv.org/abs/1002.1887 ↩