Abstract
Any watershed, when defined on a stack on a normal pseudomanifold of dimension d, is a pure \((d-1)\)-subcomplex that satisfies a drop-of-water principle. In this paper, we introduce Morse stacks, a class of functions that are equivalent to discrete Morse functions. We show that the watershed of a Morse stack on a normal pseudomanifold is uniquely defined and can be obtained with a linear-time algorithm relying on a sequence of collapses. Last, we prove that such a watershed is the cut of the unique minimum spanning forest, rooted in the minima of the Morse stack, of the facet graph of the pseudomanifold.
Similar content being viewed by others
Availability of data and materials
Not applicable.
References
Digabel, H., Lantuéjoul, C.: Iterative algorithms. In: Proceedings of the 2nd European Symposium Quantitative Analysis of Microstructures in Material Science, Biology and Medicine, vol. 19, p. 8. Riederer (1978)
Vincent, L., Soille, P.: Watersheds in digital spaces: an efficient algorithm based on immersion simulations. IEEE Trans. Pattern Anal. Mach. Intell. 13(6), 583–598 (1991)
Arbelaez, P., Maire, M., Fowlkes, C., Malik, J.: Contour detection and hierarchical image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 33(5), 898–916 (2010)
Couprie, M., Bertrand, G.: Topological gray-scale watershed transformation. In: Vision Geometry VI, vol. 3168, pp. 136–146. SPIE (1997)
Bertrand, G.: On topological watersheds. J. Math. Imaging Vis. 22(2), 217–230 (2005)
Cousty, J., Bertrand, G., Najman, L., Couprie, M.: Watershed cuts: minimum spanning forests and the drop of water principle. IEEE Trans. Pattern Anal. Mach. Intell. 31(8), 1362–1374 (2009)
Cousty, J., Bertrand, G., Couprie, M., Najman, L.: Collapses and watersheds in pseudomanifolds. In: International Workshop on Combinatorial Image Analysis. Lecture Notes in Computer Science, vol. 5852, pp. 397–410. Springer (2009)
Cousty, J., Bertrand, G., Couprie, M., Najman, L.: Collapses and watersheds in pseudomanifolds of arbitrary dimension. J. Math. Imaging Vis. 50(3), 261–285 (2014)
Forman, R.: A discrete Morse theory for cell complexes. In: Yau, S.-T. (ed.) Geometry, Topology for Raoul Bott. International Press, Somerville (1995)
Scoville, N.A.: Discrete Morse Theory, vol. 90. American Mathematical Soc, Providence (2019)
Najman, L., Talbot, H.: Mathematical Morphology: From Theory to Applications. Wiley, Hoboken (2013)
Boutry, N., Géraud, T., Najman, L.: An equivalence relation between morphological dynamics and persistent homology in 1D. In: International Symposium on Mathematical Morphology. Lecture Notes in Computer Science Series, vol. 11564, pp. 57–68. Springer (2019)
Boutry, N., Géraud, T., Najman, L.: An equivalence relation between morphological dynamics and persistent homology in \(n\)-D. In: International Conference on Discrete Geometry and Mathematical Morphology, pp. 525–537. Springer (2021)
Boutry, N., Najman, L., Géraud, T.: Some equivalence relation between persistent homology and morphological dynamics. J. Math. Imaging Vis. 64, 807–824 (2022). https://doi.org/10.1007/s10851-022-01104-z
Grimaud, M.: New measure of contrast: the dynamics. In: Image Algebra and Morphological Image Processing III, vol. 1769, pp. 292–306. International Society for Optics and Photonics (1992)
Edelsbrunner, H., Harer, J.: Persistent homology—a survey. Contemp. Math. 453, 257–282 (2008)
Tierny, J.: Introduction to Topological Data Analysis. Technical report, Sorbonne University, LIP6, APR team, France. https://hal.archives-ouvertes.fr/cel-01581941 (2017)
Munch, E.: A user’s guide to topological data analysis. J. Learn. Anal. 4(2), 47–61 (2017)
Boutry, N., Bertrand, G., Najman, L.: Gradient vector fields of discrete Morse functions and watershed-cuts. In: Baudrier, É., Naegel, B., Krähenbühl, A., Tajine, M. (eds.) Discrete Geometry and Mathematical Morphology, pp. 35–47. Springer, Cham (2022)
Forman, R.: Witten–Morse theory for cell complexes. Topology 37(5), 945–980 (1998)
De Floriani, L., Iuricich, F., Magillo, P., Simari, P.: Discrete Morse versus watershed decompositions of tessellated manifolds. In: International Conference on Image Analysis and Processing. Lecture Notes in Computer Science, vol. 8157, pp. 339–348. Springer (2013)
Delgado-Friedrichs, O., Robins, V., Sheppard, A.: Skeletonization and partitioning of digital images using Discrete Morse Theory. IEEE Trans. Pattern Anal. Mach. Intell. 37(3), 654–666 (2014)
De Floriani, L., Fugacci, U., Iuricich, F., Magillo, P.: Morse complexes for shape segmentation and homological analysis: discrete models and algorithms. Comput. Gr. Forum 34(2), 761–785 (2015)
Najman, L., Schmitt, M.: Watershed of a continuous function. Signal Process. 38(1), 99–112 (1994)
Alexandroff, P.: Diskrete raüme. Matematicheskiĭ Sbornik 2(3), 501–519 (1937)
Barmak, J.A., Minian, E.G.: Simple homotopy types and finite spaces. Adv. Math. 218(1), 87–104 (2008)
Whitehead, J.H.C.: Simplicial spaces, nuclei and m-groups. Proc. Lond. Math. Soc. 2(1), 243–327 (1939)
Massey, W.S.: A Basic Course in Algebraic Topology. Springer, Berlin (1991)
Bagchi, B., Datta, B.: Lower bound theorem for normal pseudomanifolds. Expo. Math. 26(4), 327–351 (2008)
Basak, B., Swartz, E.: Three-dimensional normal pseudomanifolds with relatively few edges. Adv. Math. 365, 107035 (2020)
Datta, B., Nilakantan, N.: Three-dimensional pseudomanifolds on eight vertices. Int. J. Math. Sci. (2008)
Couprie, M., Najman, L., Bertrand, G.: Algorithms for the topological watershed. In: Andres, E., Damiand, G., Lienhardt, P. (eds.) Discrete Geometry for Computer Imagery, pp. 172–182. Springer, Berlin (2005)
Cormen, T.H., Leiserson, C.E., Rivest, R.L.: Introduction to Algorithms. 23rd printing. The MIT Press, Cambrideg (1999)
Motwani, R., Raghavan, P.: Randomized Algorithms. Cambridge University Press, Cambridge (1995)
Čomić, L., De Floriani, L., Iuricich, F., Magillo, P.: Computing a discrete Morse gradient from a watershed decomposition. Comput. Gr. 58, 43–52 (2016)
Najman, L., Schmitt, M.: Geodesic saliency of watershed contours and hierarchical segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 18(12), 1163–1173 (1996)
Najman, L.: On the equivalence between hierarchical segmentations and ultrametric watersheds. J. Math. Imaging Vis. 40(3), 231–247 (2011)
Cousty, J., Najman, L., Kenmochi, Y., Guimarães, S.: Hierarchical segmentations with graphs: quasi-flat zones, minimum spanning trees, and saliency maps. J. Math. Imaging Vis. 60(4), 479–502 (2018)
Perret, B., Chierchia, G., Cousty, J., Guimarães, S.J.F., Kenmochi, Y., Najman, L.: Higra: hierarchical graph analysis. SoftwareX 10, 100335 (2019)
Challa, A., Danda, S., Sagar, B.D., Najman, L.: Watersheds for semi-supervised classification. IEEE Signal Process. Lett. 26(5), 720–724 (2019)
Bertrand, G., Couprie, M.: Powerful parallel and symmetric 3d thinning schemes based on critical kernels. J. Math. Imaging Vis. 48(1), 134–148 (2014)
Bertrand, G., Everat, J.-C., Couprie, M.: Image segmentation through operators based on topology. J. Electron. Imaging 6(4), 395–405 (1997)
Forman, R.: Morse theory for cell complexes. Adv. Math. 134, 90–145 (1998)
Acknowledgements
The authors would like to thank both Julien Tierny and Thierry Géraud, for many insightful discussions.
Funding
Not applicable.
Author information
Authors and Affiliations
Contributions
LN had the intuition of the main results and was pivotal in starting the project. The first draft of the conference version was written by NB and LN. The final version of the conference paper was written by GB and LN. GB wrote the main text of the journal version, while LN wrote the introduction and the conclusion. Figures 1, 4 and 6 were done jointly by all the authors. Figures 2 and 5 are taken from paper [8], co-authored in particular by GB and LN. Figure 3 was prepared by GB. Figures 7 and 8 were done by NB and LN. Figure 9 was prepared by LN. All authors reviewed the manuscript.
Corresponding author
Ethics declarations
Ethical approval
Not applicable.
Conflict of interest
Not applicable.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A Normal pseudomanifolds
A normal pseudomanifold is usually defined as a pseudomanifold that satisfies a certain link condition, which corresponds to a local property [29,30,31]. In this section, we show that this definition is equivalent to the one given in Definition 6.
Let S be a finite set of simplexes. If x and y are facets of S, a p-chain (in S) from x to y is a sequence \(\langle x = x_0,...,x_k = y \rangle \) of facets of S such that, for each \(i \in [0,k-1]\), \(x_i \cap x_{i+1}\) is a q-face of S, with \(q \ge p\). The set S is p-connected if, for any two facets x, y in S, there is a p-chain in S from x to y.
We observe that:
-
A complex is connected if and only if it is 0-connected.
-
A d-pure complex is strongly connected if and only if it is \((d-1)\)-connected.
Let X be a complex. Two faces \(x,y \in X\) are adjacent if \(x \cup y \in X\). The link of \(x \in X\) in X is the complex \(lk(x,X) = \{y \in X \; \mid \; x \cap y = \emptyset \) and \(x \cup y \in X \}\). The star of \(x \in X\) in X is the set \(st(x,X) = \{y \in X \; \mid \; x \subseteq y \}\).
Let X be a d-pseudomanifold. We say that X satisfies the link condition if lk(x, X) is connected whenever x is a p-face of X and \(p \le d-2\).
Let X be a complex and x be a p-face of X. Let \(st^*(x,X) = st(x,X) {\setminus } \{ x \}\). We have \(lk(x,X) = \{y {\setminus } x \; \mid \; y \in st^*(x,X) \}\) and \(st^*(x,X) = \{z \cup x \; \mid \; z \in lk(x,X) \}\).
We note that there is a set isomorphism between lk(x, X) and \(st^*(x,X)\), which preserves set inclusion. If \(y \in st^*(x,X)\), the corresponding face \(y \setminus x\) of lk(x, X) is such that \(dim(y \setminus x) = dim(y) - (p + 1)\). Thus, \(dim(y {\setminus } x) = dim(y) - p^+\), where \(p^+ = p +1\) is the number of elements in x.
Let X be a d-pseudomanifold and x be a p-face of X. Let \(p^+ = p+1\) and \(d' = d - p^+\). The following facts are a direct consequence of the above isomorphism:
-
The complex lk(x, X) is \(d'\)-pure.
-
The complex lk(x, X) is non-branching.
-
The set \(st^*(x,X)\) is q-connected if and only if lk(x, X) is \(q'\)-connected, with \(q' = q - p^+\).
Proposition 32
A pseudomanifold is normal if and only if it satisfies the link condition.
Proof
Let X be a d-pseudomanifold.
-
1.
Suppose X satisfies the link condition and let S be a connected open subset of X. Let x and y be two d-faces of S. By Remark 2, there exists a p-chain \(\pi \) in S from x to y. Thus, \(\pi = \langle x = x_0,\ldots ,x_k = y \rangle \) is a sequence of facets of S such that, for each \(i \in [0,k-1]\), \(x_i \cap x_{i+1}\) is a q-face of S, with \(q \ge p\). We choose \(\pi \) such that p is maximal and, if p is maximal, such that the number \(K(\pi )\) of p-faces \(x_i \cap x_{i+1}\), with \(i \in [0,k-1]\), is minimal. If \(p = d-1\), it means that S is strongly connected; then, we are done. Suppose \(p < d-1\) and let \(x_i, x_{i+1}\) such that \(z = x_i \cap x_{i+1}\) is a p-face. Since X satisfies the link condition, lk(z, X) is connected. By the isomorphism between lk(z, X) and \(st^*(z,X)\), it follows there is a q-chain \(\langle x_i = w_0,\ldots ,w_l = x_{i+1} \rangle \) in \(st^*(z,X)\) with \(q >p\). Therefore, \(\pi ' = \langle x = x_0,\ldots ,x_i = w_0,\ldots ,w_l = x_{i+1},\ldots ,x_k = y \rangle \) is a p-chain in S from x to y. But we have \(K(\pi ') < K(\pi )\), a contradiction. Thus, each connected open subset of X is strongly connected.
-
2.
Suppose X is strictly connected. That is, any connected open subset of X is \((d-1)\)-connected. Let x be a p-face of X with \(p \le d-2\). The set st(x, X) is a connected open subset of X, thus it is \((d-1)\)-connected. Since \(p < d-1\), it means that \(st^*(x,X)\) is \((d-1)\)-connected. Therefore, \(st^*(x,X)\) is strongly connected. By the isomorphism between lk(x, X) and \(st^*(x,X)\), it follows that lk(x, X) is strongly connected. Thus, lk(x, X) is connected.
\(\square \)
In the second part of the proof of Proposition 32, we showed that lk(x, X) is strongly connected. Consequently, we have the following characterization of a normal pseudomanifold.
Proposition 33
A pseudomanifold X is normal if and only if, for each p-face x of X, with \(p \le d-2\), the complex lk(x, X) is a pseudomanifold.
Appendix B Discrete Morse functions
Let us consider the following definition of a discrete Morse function:
Definition 34
(Morse function) Let X be a complex and let F be a map from X to \(\mathbb {Z}\). We say that F is a discrete Morse function on X if any face of X is in at most one covering pair (x, y) in X such that \(F(x) \ge F(y)\). If F is a discrete Morse function, we say that such a pair is a regular pair of F.
It may be checked that this definition is equivalent to the classical one given by Forman (See Def. 2.1 and Lemma 2.5 of [43]).
In this way, the gradient vector field of a discrete Morse function F, written \(\overrightarrow{\textrm{grad}} (F)\), is the set composed of all regular pairs of F.
The following restriction of a discrete Morse function will lead us to Morse stacks.
We say that a discrete Morse function F on X is flat if we have \(F(x) = F(y)\) whenever (x, y) is a regular pair of F, that is, if each regular pair of F is a flat pair of F.
We can check that a map F from X to \(\mathbb {Z}\) is a flat discrete Morse function if and only if:
-
1.
Each covering pair (x, y) in X is such that \(F(x) \le F(y)\);
-
2.
Each face of X is in at most one flat pair of F.
Therefore, if we consider the function \(-F\), we obtain the following:
Proposition 35
Let X be a complex and let F be a map from X to \(\mathbb {Z}\). The map F is a Morse stack on X if and only if the map \(-F\) is a flat discrete Morse function on X.
The following proposition claims that, up to an equivalence, we may assume that any discrete Morse function is flat (see Def. 2.27 and Prop. 4.16 of [10]).
Proposition 36
(from [10]) If F is a discrete Morse function on X, then there exists a flat discrete Morse function G on X such that, for every covering pair (x, y) in X, we have \(F(x) \ge F(y)\) if and only if \(G(x) \ge G(y)\). In other words, the function G is such that \(\overrightarrow{\textrm{grad}} (G) = \overrightarrow{\textrm{grad}} (F)\).
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Bertrand, G., Boutry, N. & Najman, L. Discrete Morse Functions and Watersheds. J Math Imaging Vis 65, 787–801 (2023). https://doi.org/10.1007/s10851-023-01157-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10851-023-01157-8