Skip to main content
Log in

Hierarchical Segmentations with Graphs: Quasi-flat Zones, Minimum Spanning Trees, and Saliency Maps

  • Published:
Journal of Mathematical Imaging and Vision Aims and scope Submit manuscript

Abstract

Hierarchies of partitions are generally represented by dendrograms (direct representation). They can also be represented by saliency maps or minimum spanning trees. In this article, we precisely study the links between these three representations. In particular, we provide a new bijection between saliency maps and hierarchies based on quasi-flat zones as often used in image processing and we characterize saliency maps and minimum spanning trees as solutions to constrained minimization problems where the constraint is quasi-flat zones preservation. In practice, these results make up a toolkit for designing new hierarchical methods where one can choose the most convenient representation. They also invite us to process non-image data with morphological hierarchies. More precisely, we show the practical interest of the proposed framework for: (i) hierarchical watershed image segmentations, (ii) combinations of different hierarchical segmentations, (iii) hierarchicalizations of some non-hierarchical image segmentation methods based on regional dissimilarities, and (iv) hierarchical analysis of geographic data.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others

Notes

  1. There also exist hierarchical image segmentation and filtering methods, such as, e.g., [46] and [31], that deal with series of nested partial partitions (i.e., nested partitions of subsets of the image pixels). The study of these methods is beyond the scope of this article. The interested reader can refer to [43] for an algebraic study encompassing these methods.

References

  1. Achanta, R., Shaji, A., Smith, K., Lucchi, A., Fua, P., Süsstrunk, S.: Slic superpixels compared to state-of-the-art superpixel methods. IEEE Trans. Pattern Anal. Mach. Intell. 34(11), 2274–2282 (2012)

    Article  Google Scholar 

  2. Alpert, S., Galun, M., Brandt, A., Basri, R.: Image segmentation by probabilistic bottom-up aggregation and cue integration. IEEE Trans. Pattern Anal. Mach. Intell. 34(2), 315–327 (2012)

    Article  Google Scholar 

  3. Arbelaez, P., Maire, M., Fowlkes, C., Malik, J.: Contour detection and hierarchical image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 33(5), 898–916 (2011)

    Article  Google Scholar 

  4. Arbeláez, P., Cohen, L.: A metric approach to vector-valued image segmentation. Int. J. Comput. Vis. 69(1), 119–126 (2006)

    Article  Google Scholar 

  5. Bender, M., Farach-Colton, M.: The LCA problem revisited. In: Latin American Theoretical INformatics, pp. 88–94 (2000)

  6. Bertrand, G.: On topological watersheds. J. Math. Imaging Vis. 22(2–3), 217–230 (2005)

    Article  MathSciNet  Google Scholar 

  7. Beucher, S.: Watershed, hierarchical segmentation and waterfall algorithm. In: Serra, J., Soille, P. (eds.) Mathematical Morphology and Its Applications to Image and Signal Processing, pp. 69–76. Kluwer (1994)

  8. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C., et al.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2001)

    MATH  Google Scholar 

  9. Couprie, M., Najman, L., Bertrand, G.: Quasi-linear algorithms for the topological watershed. J. Math. Imaging Vis. 22(2–3), 231–249 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  10. 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)

    Article  Google Scholar 

  11. Cousty, J., Najman, L.: Incremental algorithm for hierarchical minimum spanning forests and saliency of watershed cuts. Math. Morphol. Its Appl. Image Signal Process. Lect. Notes Comput. Sci. 6671, 272–283 (2011)

    MathSciNet  MATH  Google Scholar 

  12. Cousty, J., Najman, L., Kenmochi, Y., Guimarães, S.: New characterizations of minimum spanning trees and of saliency maps based on quasi-flat zones. In: Benediktsson, J.A., Chanussot, J., Najman, L., Talbot, H. (eds.) Mathematical Morphology and Its Applications to Signal and Image Processing, Lecture Notes in Computer Science, vol. 9082, pp. 205–216. Springer, UK (2015). doi:10.1007/978-3-319-18720-4_18

  13. Cousty, J., Najman, L., Perret, B.: Constructive links between some morphological hierarchies on edge-weighted graphs. In: Luengo Hendriks, C.L., Borgefors, G., Strand, R. (eds.) Mathematical Morphology and Its Applications to Image and Signal Processing, pp. 86–97. Springer, Berlin (2013)

  14. Cousty, J., Najman, L., Serra, J.: Raising in watershed lattices. In: 15th IEEE International Conference on Image Processing, 2008 (ICIP 2008), pp. 2196–2199. IEEE (2008)

  15. Felzenszwalb, P., Huttenlocher, D.: Efficient graph-based image segmentation. Int. J. Comput. Vis. 59, 167–181 (2004)

    Article  Google Scholar 

  16. Gordon, A.D.: A review of hierarchical classification. J. R. Stat. Soc. Ser. A (Gen.) 150, 119–137 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  17. Guigues, L., Cocquerez, J.P., Men, H.L.: Scale-sets image analysis. Int. J. Comput. Vis. 68(3), 289–317 (2006)

    Article  Google Scholar 

  18. Guimarães, S.J.F., Cousty, J., Kenmochi, Y., Najman, L.: A hierarchical image segmentation algorithm based on an observation scale. In: SSPR/SPR, pp. 116–125. Springer, Berlin (2012)

  19. Guimarães, S., Kenmochi, Y., Cousty, J., Patrocínio, Z., Jr., Najman, L.: Hierarchizing Graph-Based Image Segmentation Algorithms Relying on Region Dissimilarity the Case of the Felzenszwalb–Huttenlocher Method (2016). http://hal-upec-upem.archives-ouvertes.fr/hal-01342967v2/document. Research report on HAL

  20. Guimarães, S.J.F., do Patrocínio, Z.K.G.J.: A graph-based hierarchical image segmentation method based on a statistical merging predicate. In: Petrosino, A. (ed.) Image Analysis and Processing—ICIAP 2013, Lecture Notes in Computer Science, vol. 8156, pp. 11–20. Springer, Berlin (2013)

  21. Guimarães, S.J.F., do Patrocínio, Z.K.G.J., Kenmochi, Y., Cousty, J., Najman, L.: Hierarchical image segmentation relying on a likelihood ratio test. In: Murino, V., Puppo, E. (eds.) Image Analysis and Processing—ICIAP 2015, Lecture Notes in Computer Science, vol. 9280, pp. 25–35. Springer. Berlin (2015)

  22. Kiran, B.R., Serra, J.: Fusion of ground truths and hierarchies of segmentations. Pattern Recognit. Lett. 47, 63–71 (2014). Advances in Mathematical Morphology

    Article  Google Scholar 

  23. Kiran, B.R., Serra, J., et al.: Global-local optimizations on hierarchies of segmentations. Pattern Recognit. 47(1), 12–24 (2014)

    Article  MATH  Google Scholar 

  24. Kovalevsky, V.A.: Finite topology as applied to image analysis. Comput. Vis. Graph. Image Process. 46(2), 141–161 (1989)

    Article  Google Scholar 

  25. Leclerc, B.: Description combinatoire des ultramétriques. Mathématiques et Sciences humaines 73, 5–37 (1981)

    MATH  Google Scholar 

  26. Malmberg, F., Hendriks, C.L.L.: An efficient algorithm for exact evaluation of stochastic watersheds. Pattern Recognit. Lett. 47, 80–84 (2014). Advances in Mathematical Morphology

    Article  Google Scholar 

  27. Martin, D.R., Fowlkes, C.C., Malik, J.: Learning to detect natural image boundaries using local brightness, color, and texture cues. IEEE Trans. Pattern Anal. Mach. Intell. 26(5), 530–549 (2004)

    Article  Google Scholar 

  28. Meyer, F.: The dynamics of minima and contours. In: Maragos, P., Schafer, R., Butt, M. (eds.) Mathematical Morphology and Its Applications to Image and Signal Processing, pp. 329–336. Kluwer Academic Publisher (1996)

  29. Meyer, F., Maragos, P.: Morphological scale-space representation with levelings. In: Nielsen, M., Johansen, P., Olsen, O.F., Weickert, J. (eds.) Scale-Space Theories in Computer Vision, Lecture Notes in Computer Science, vol. 1682, pp. 187–198. Springer, Berlin (1999)

  30. Meyer, F., Najman, L.: Segmentation, Minimum Spanning Tree and Hierarchies. Mathematical Morphology: From Theory to Applications, pp. 229–261. Wiley (2013)

  31. Monasse, P., Guichard, F.: Fast computation of a contrast-invariant image representation. IEEE Trans. Image Process. 9(5), 860–872 (2000)

    Article  Google Scholar 

  32. NetworkX Examples: Knuth Miles. http://networkx.github.io/documentation/latest/examples/drawing/knuth_miles.html. Accessed 21 Sept 2015

  33. Nagao, M., Matsuyama, T., Ikeda, Y.: Region extraction and shape analysis in aerial photographs. Comput. Graph. Image Process. 10(3), 195–223 (1979)

    Article  Google Scholar 

  34. Najman, L.: On the equivalence between hierarchical segmentations and ultrametric watersheds. J. Math. Imaging Vis. 40(3), 231–247 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  35. Najman, L., Cousty, J., Perret, B.: Playing with Kruskal: algorithms for morphological trees in edge-weighted graphs. In: Luengo Hendriks, C.L., Borgefors, G., Strand, R. (eds.) Mathematical Morphology and Its Applications to Image and Signal Processing, pp. 135–146. Springer, Berlin (2013)

  36. Najman, L., Schmitt, M.: Geodesic saliency of watershed contours and hierarchical segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 18(12), 1163–1173 (1996)

    Article  Google Scholar 

  37. Nakache, J.P., Confais, J.: Approche pragmatique de la classification: arbres hiérarchiques, partitionnements. Editions Technip (2004)

  38. Nock, R., Nielsen, F.: Statistical region merging. IEEE Trans. Pattern Anal. Mach. Intell. 26(11), 1452–1458 (2004)

    Article  Google Scholar 

  39. Pavlidis, T.: Structural Pattern Recognition, vol. 2. Springer, New York (1977)

    MATH  Google Scholar 

  40. Peng, B., Zhang, L., Zhang, D.: Automatic image segmentation by dynamic region merging. IEEE Trans. Image Process. 20(12), 3592–3605 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  41. Perret, B., Cousty, J., Guimarães, S., Maya, D.: Evaluation of Hierarchical Watersheds (2016). http://hal.archives-ouvertes.fr/hal-01430865/ (submitted)

  42. Philipp-Foliguet, S., Jordan, M., Najman, L., Cousty, J.: Artwork 3D model database indexing and classification. Pattern Recognit. 44(3), 588–597 (2011)

    Article  MATH  Google Scholar 

  43. Ronse, C.: Ordering partial partitions for image segmentation and filtering: merging, creating and inflating blocks. J. Math. Imaging Vis. 49(1), 202–233 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  44. Rother, C., Kolmogorov, V., Blake, A.: GrabCut: interactive foreground extraction using iterated graph cuts. ACM Trans. Graph. 23(3), 309–314 (2004)

    Article  Google Scholar 

  45. Salembier, P., Garrido, L.: Binary partition tree as an efficient representation for image processing, segmentation, and information retrieval. IEEE Trans. Image Process. 9(4), 561–576 (2000)

    Article  Google Scholar 

  46. Salembier, P., Oliveras, A., Garrido, L.: Antiextensive connected operators for image and sequence processing. IEEE Trans. Image Process. 7(4), 555–570 (1998)

    Article  Google Scholar 

  47. Silla Jr., C.N., Freitas, A.A.: A survey of hierarchical classification across different application domains. Data Min. Knowl. Discov. 22(1–2), 31–72 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  48. Skupin, A.: The world of geography: visualizing a knowledge domain with cartographic means. Proc. Natl. Acad. Sci. 101(suppl 1), 5274–5278 (2004)

    Article  Google Scholar 

  49. Skupin, A., Fabrikant, S.I.: Spatialization methods: a cartographic research agenda for non-geographic information visualization. Cartogr. Geogr. Inf. Sci. 30(2), 99–119 (2003)

    Article  Google Scholar 

  50. Soille, P.: Constrained connectivity for hierarchical image partitioning and simplification. IEEE Trans. Pattern Anal. Mach. Intell. 30(7), 1132–1145 (2008)

    Article  Google Scholar 

  51. Soille, P., Najman, L.: On morphological hierarchical representations for image processing and spatial data clustering. In: Köthe, U., Montanvert, A., Soille, P. (eds.) Applications of Discrete Geometry and Mathematical Morphology: First International Workshop, WADGMM 2010, Istanbul, Turkey, August 22, 2010, Revised Selected Papers, pp. 43–67. Springer, Berlin (2012)

    Chapter  Google Scholar 

  52. Urbach, E., Roerdink, J., Wilkinson, M.: Connected shape-size pattern spectra for rotation and scale-invariant classification of gray-scale images. IEEE Trans. Pattern Anal. Mach. Intell. 29(2), 272–285 (2007)

    Article  Google Scholar 

  53. Vachier, C., Meyer, F.: Extinction value: a new measurement of persistence. In: IEEE Workshop on Nonlinear Signal and Image Processing, pp. 254–257 (1995)

Download references

Acknowledgements

The research leading to these results has received funding from the French Agence Nationale de la Recherche (Contract ANR-2010-BLAN-0205-03), the French Committee for the Evaluation of Academic and Scientific Cooperation with Brazil, and the Brazilian Federal Agency of Support and Evaluation of Postgraduate Education (Program CAPES/PVE: Grant 064965/2014-01, and Program CAPES/COFECUB: Grant 592/08).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jean Cousty.

Appendices

Appendix A: Proof of Theorem 1

Proof

In order to establish Theorem 1, we will prove that the two following statements hold true:

  1. (1)

    for any connected hierarchy \(\mathcal {H} = ( \mathbf{P}_0, \ldots , \mathbf{P}_\ell )\), we have: \(\varPhi _G^{-1}(\varPhi _G(\mathcal {H})) = \mathcal {QFZ}(G,\varPhi _G(\mathcal {H})) = \mathcal {H}\); and

  2. (2)

    for any saliency map w, we have \( \varPhi _G(\varPhi _G^{-1}(w))= \varPhi _G(\mathcal {QFZ}(G,w)) = w\).

(1) Let \(\mathcal {QFZ}(G,\varPhi _G(\mathcal {H})) = (\mathbf{P}'_0, \ldots , \mathbf{P'}_\ell )\). Since \(\mathcal {H}\) and \(\mathcal {QFZ}(G,\varPhi _G(\mathcal {H}))\) are complete hierarchies, we have \(\mathbf{P}_0 = \mathbf{P}'_0\). Thus, in order to complete the proof of (1), we will establish that \(\mathbf{P}_\lambda = \mathbf{P}'_\lambda \), for any \(\lambda \in \{1,\ldots ,\ell \}\). Let \(\lambda \in \{1,\ldots ,\ell \}\) and let x and y be two points in V. The following statements are equivalent:

  1. i

    \(\left[ \mathbf{P}'_i \right] _x = \left[ \mathbf{P}'_i \right] _y\);

  2. ii

    x and y belong to the same connected component of \(\varPhi _G(\mathcal {H})^V_\lambda (G)\) [by Eq. (3)];

  3. iii

    there exists a path \(\pi = (x=x_0,\ldots , x_k =y)\) from x to y in the graph \(\varPhi _G(\mathcal {H})^V_\lambda (G)\);

  4. iv

    there exists a path \(\pi = (x=x_0,\ldots , x_k =y)\) from x to y in the graph \((V, \{u \in E \; | \;\varPhi _G(\mathcal {H})(u) < \lambda \}\) [by Eqs. (2) and (1)];

  5. v

    there exists a path \(\pi = (x=x_0,\ldots , x_k =y)\) in G from x to y such that \(\varPhi _G(\mathcal {H})(\{x_{i-1},x_i\}) < \lambda \), for any \(i \in \{1, \ldots , k\}\);

  6. vi

    there exists a path \(\pi = (x=x_0,\ldots , x_k =y)\) in G from x to y such that \(\max \left\{ j \in \left\{ 0,\ldots , \ell \right\} \; | \;\left[ \mathbf{P}_j \right] _{x_{i-1}} \ne \left[ \mathbf{P}_j \right] _{x_{i}}\right\} < \lambda \), for any \(i \in \{1, \ldots , k\}\) [by Eqs. (5) and (4)];

  7. vii

    there exists a path \(\pi = (x=x_0,\ldots , x_k =y)\) in G from x to y such that \(\left[ \mathbf{P}_\lambda \right] _{x_{i-1}} = \left[ \mathbf{P}_\lambda \right] _{x_i}\), for any \(i \in \{1, \ldots , k\}\);

  8. viii

    \(\left[ \mathbf{P}_\lambda \right] _{x} = \left[ \mathbf{P}_\lambda \right] _{y}\) (since \(\left[ \mathbf{P} \right] _\lambda \) is a connected partition for G).

Thus, since statements i. and viii. are equivalent, we deduce that \(\mathbf{P}_\lambda = \mathbf{P}'_\lambda \), which completes the proof of statement (1).

(2) Let w be a saliency map. By the definition of a saliency map, there exists a hierarchy \(\mathcal {H}\) such that \(w = \varPhi _G(\mathcal {H})\). By statement (1), we have \(\mathcal {H} = \varPhi _G^{-1}(\varPhi _G(\mathcal {H}))\). Thus, we deduce that \(w = \varPhi _G(\varPhi _G^{-1}(\varPhi _G(\mathcal {H})))\). Then, since \(w = \varPhi _G(\mathcal {H})\), we have \(w = \varPhi _G(\varPhi _G^{-1}(w))\). \(\square \)

Appendix B: Proof of Theorem 2

In order to prove Theorem 2, we first established the following lemma.

Lemma 5

For any map z from E to \(\mathbb {E}\), the following inequality holds true:

$$\begin{aligned} \varPhi _G \left( \mathcal {QFZ} \left( G, z \right) \right) \le z. \end{aligned}$$

Proof

Let \(\mathcal {H} = \mathcal {QFZ}(G,z) = (\mathbf{P}_0, \ldots , \mathbf{P}_\ell )\). For any \(\lambda \in \{0, \ldots \ell \}\), the partition \(\mathbf{P}_\lambda \) is the connected component partition of the \(\lambda \)-level graph \(z^V_\lambda (G)\) of G for z. By Eq. (2), we have \(z^V_\lambda (G) = (V, z_\lambda (G))\), for any \(\lambda \in \{0, \ldots \ell \}\). Let \(u = \{x,y\}\) be any edge in E. In order, to establish Lemma , it is sufficient to prove that \(z(u) \ge \varPhi _G(\mathcal {H})(u)\). For any \(\lambda \in \{z(u)+1, \ldots , \ell \}\), the edge u belongs to \(z_\lambda (G)\). Thus, for any \(\lambda \in \{z(u)+1, \ldots , \ell \}\), we have \(\left[ \mathbf{P}_\lambda \right] _x = \left[ \mathbf{P}_\lambda \right] _y\). By Eq. (6), we deduce that \(\min \{ \lambda \in \{0, \ldots , \ell \} \; | \;\left[ \mathbf{P}_\lambda \right] _x = \left[ \mathbf{P}_\lambda \right] _y \} = \varPhi _G( \mathcal {H} )( u ) + 1\). Thus, we have \(z(u) \ge \varPhi _G(\mathcal {H})(u)\). \(\square \)

Proof of Theorem 2

  1. 1.

    Let us first prove the forward implication of Theorem 2. To this end, let \(\mathcal {H} = (\mathbf{P}_0, \ldots , \mathbf{P}_\ell )\) and let us assume that w is the saliency map of \(\mathcal {H}\) (i.e., \(w = \varPhi _G(\mathcal {H})\)). Thus, we have: \(\mathcal {QFZ}(G,w) = \mathcal {QFZ}(G, \varPhi _G(\mathcal {H}))\). Hence, by Theorem 1 (see, in particular, Eq. (7) which follows straightforwardly from Theorem 1), we deduce that \(\mathcal {QFZ}(G,w) = \mathcal {H}\), which establishes statement 1. Let z be any map from E to \(\mathbb {E}\) such that \(\mathcal {QFZ}(G,z) = \mathcal {H}\) and such that \(z \le w\). By Lemma , we have \(\varPhi _G(\mathcal {QFZ}(G,z)) \le z\). Thus, since \(\mathcal {QFZ}(G,z)= \mathcal {H}\), we deduce that \(\varPhi _G(\mathcal {H}) \le z\). Hence, we have \(w \le z\). Therefore, we conclude that \(w = z\), which establishes statement 2.

  2. 2.

    Let us now prove the backward implication of Theorem 2. To this end, let us suppose that the map w is such that: (1) the quasi-flat zone hierarchies for w is \(\mathcal {H}\) (i.e., \(\mathcal {QFZ}(G,w) = \mathcal {H}\)); and (2) the map w is minimal for statement (1), i.e., for any map \(w'\) such that \(w' \le w\), if the quasi-flat zone hierarchy for \(w'\) is \(\mathcal {H}\), then we have \(w = w'\). By Lemma , we deduce that \(\varPhi _G(\mathcal {QFZ}(G,w)) \le w\). Thus, we have \(\varPhi _G(\mathcal {H}) \le w\). By Theorem 2 (see, in particular, Eq. (7)), we have \(\mathcal {QFZ}(G,\varPhi _G(\mathcal {H})) = \mathcal {H}\). Thus, by definition of w (see in particular statement (2)), we deduce that \(\varPhi _G(\mathcal {H}) = w\). \(\square \)

Appendix C: Proof of Property 

Proof

  1. 1.

    By Eq. (9), we have:

    $$\begin{aligned} \varPsi _G(\varPsi _G(w)) = \varPhi _G(\mathcal {QFZ}(G,\varPhi _G(\mathcal {QFZ}(G,w)))). \end{aligned}$$

    Hence, by Eq. (7), we deduce that:

    $$\begin{aligned} \varPsi _G(\varPsi _G(w)) = \varPhi _G(\mathcal {QFZ}(G,w)). \end{aligned}$$

    Thus, by Eq. (9), we conclude that:

    $$\begin{aligned} \varPsi _G(\varPsi _G(w)) = \varPsi _G(w). \end{aligned}$$
  2. 2.

    Lemma .

  3. 3.

    Let \(w'\) be a map from E to \(\mathbb {E}\) such that \(w' \le w\). Let \(u = \{x,y\}\) be any edge in E, we are going to prove that \([\varPsi _G(w')](u) \le [\varPsi _G(w)](u)\). By Eq. (9), we have \(\varPsi _G(w') = \varPhi _G(\mathcal {QFZ}(G,w'))\) and \(\varPsi _G(w) = \varPhi _G(\mathcal {QFZ}(G,w))\). Let \(\mathcal {QFZ}(G,w') = (\mathbf{P}'_0, \ldots , \mathbf{P}'_{|E|})\) and \(\mathcal {QFZ}(G,w) = (\mathbf{P}_0, \ldots , \mathbf{P}_{|E|})\). Let \(k = [\varPsi _G(w')](u)\). From Eq. (6), we deduce that \(\left[ \mathbf{P}_{k+1}\right] _x = \left[ \mathbf{P}_{k+1}\right] _y\). By Eq. (3), we have \(\mathbf{P}_{k+1} = \mathbf{C}(w^V_{k+1}(G))\). Hence, there exists a path \((x_0, \ldots , x_\ell )\) such that \(x_0 = x\)\(x_\ell = y\), and \(w(\{x_{i-1},x_i\}) < k+1\) for any \(i \in \{1,\ldots ,\ell \}\). Since \(w' \le w\), we also have \(w'(\{x_{i-1},x_i\}) < k+1\) for any \(i \in \{1,\ldots ,\ell \}\). Thus, we have \(\left[ \mathbf{P}'_{k+1} \right] _x = \left[ \mathbf{P}'_{k+1} \right] _y \). Hence, by Eq. (6), we have \( \left[ \varPhi _G \left( \mathcal {QFZ}(w') \right) \right] (u) \le k\). Thus, we have, \([\varPsi _G(w')](u) \le [\varPsi _G(w)](u)\). \(\square \)

Appendix D: Proof of Theorem 4

In order to establish the equivalence Theorem 4, we first prove the backward implication (Property ) and then the forward implication (Property )

Before establishing Properties  and 8, let us state the following propositions which can be derived from classical properties of trees.

Let S be a subset of V and let \(\{x,y\}\) be an edge of G. We say that \(\{x,y\}\) is outgoing from S if we have \(x \in S\) and \(x \in V \setminus S\) (or \(y \in S\) and \(x \in V \setminus S\)).

Lemma 6

Let X be a connected subgraph of G. If, for any subset S of V, there is an edge u of X outgoing from S such that the weight of u is less than or equal to the weight of any edge of G outgoing from S, then, there exists a subgraph of X that is an MST of (Gw)

Let X be a graph and let \(\pi = (x_0, \ldots , x_k)\) be a path in X. We say that \(\pi \) is a simple path if for any two distinct i and j in \(\{0, \ldots , k\}\), we have \(x_i \ne x_j\). Let x and y be two vertices of X, there exists a path from x to y in X if and only if there is a simple path in X from x to y.

Property 7

Let X be a MST of (Gw). Then, the two following statements hold true:

  1. 1.

    the quasi-flat zone hierarchies of X and of G are the same; and

  2. 2.

    the graph X is minimal for Theorem 4.1, i.e., for any subgraph Y of X, if the quasi-flat zones hierarchy of Y for w is the one of G for w, then we have \(Y = X\).

Proof

Let \(\mathcal {H} = (\mathbf{P}_0, \ldots , \mathbf{P}_\ell ) = \) and \(\mathcal {H}' = (\mathbf{P}'_0, \ldots , \mathbf{P}'_\ell )\) be the quasi-flat zone hierarchy of G and X, respectively. It can be seen that \(\mathbf{P}_0 = \mathbf{P}'_0\) since \(\mathcal {H}\) and \(\mathcal {H}'\) are complete hierarchies. Let \(\lambda \in \{1, \ldots , \ell \}\) and let x and y be two points of V. In order to complete the proof of Theorem 4.1, we are going to establish that:

  1. (i)

    if \(\left[ \mathbf{P}'_\lambda \right] _x = \left[ \mathbf{P}'_\lambda \right] _y\), then \(\left[ \mathbf{P}_\lambda \right] _x = \left[ \mathbf{P}_\lambda \right] _y\);

  2. (ii)

    if \(\left[ \mathbf{P}_\lambda \right] _x = \left[ \mathbf{P}_\lambda \right] _y\), then \( \left[ \mathbf{P}'_\lambda \right] _x = \left[ \mathbf{P}'_\lambda \right] _y\)

In order to establish i), we assume that \(\left[ \mathbf{P}'_\lambda \right] _x = \left[ \mathbf{P}'_\lambda \right] _y\) and we will prove that \(\left[ \mathbf{P}_\lambda \right] _x = \left[ \mathbf{P}_\lambda \right] _y\). Since \(\left[ \mathbf{P}'_\lambda \right] _x = \left[ \mathbf{P}'_\lambda \right] _y\), by definition of the quasi-flat zone hierarchy of X, there exists a path \(\pi = (x_0, \ldots , x_k)\) in X such that \(x_0 = x\)\(x_k=y\), and \(w(\{x_{i-1}, x_i\}) < \lambda \), for any \(i \in \{1, \ldots , k\}\). Since X is a subgraph of G, the path \(\pi \) is also a path in G. Thus, the vertices x and y belong to the same connected component of the \(\lambda \)-level graph of G. Hence, we have \(\left[ \mathbf{P}'_\lambda \right] _x = \left[ \mathbf{P}'_\lambda \right] _x\).

We now establish ii) by contradiction. Therefore, we assume that \([\mathbf{P}'_\lambda ]_x \ne [\mathbf{P}'_\lambda ]_y\) and we will prove that \(\left[ \mathbf{P}_\lambda \right] _x \ne \left[ \mathbf{P}_\lambda \right] _y\). Since X is a spanning tree, there exists a simple path \(\pi = (x_0, \ldots , x_k)\) such that \(x_0 = x\) and \(x_k =y\). As \([\mathbf{P}'_\lambda ]_x \ne [\mathbf{P}'_\lambda ]_y\), there exists an index \(i \in \{1, \ldots , k\}\) such that \(w(\{x_{i-1},x_i\}) \ge \lambda \). Let i be the lowest index in \(\{1, \ldots , k\}\) such that \(w(\{x_{i-1},x_i\})\ge \lambda \). Let \(X' = (V, E(X) \setminus \{\{x_{i-1},x_i\}\})\) and let C be the connected component of \(X'\) that contains the vertex x. Observe that any edge u of G which is outgoing from C is such that \(w(u) \ge w(\{x_{i-1},x_i\})\) (otherwise the graph \((V, E(X') \cup \{w\})\) would be connected and of weight less than the weight of X, which is a contradiction with the fact that X is a MST of (Gw)). Observe also that the vertex y belongs to \(V \setminus C\) (otherwise \(X'\) would be connected and of weight strictly less that the weight of X, which is a contradiction with the fact that X is a MST of (Gw)). Therefore, any path in G from x to y has an edge outgoing from C. Thus, any path in G from x to y has an edge of weight greater than or equal to \(\lambda \). Hence, the vertices x and y belong to two distinct connected components of the \(\lambda \)-level graph of G and therefore, we have \(\left[ \mathbf{P}_\lambda \right] _x \ne \left[ \mathbf{P}_\lambda \right] _y\).

Let us now prove the second proposition of Property . Let Y be a subgraph of X such that \(Y \ne X\) and such that the quasi-flat zone hierarchy of Y for w is the one of G for w. Thus, we have \(\mathbf{C}(w^V_\ell (Y)) = \mathbf{C}(w^V_\ell (G))\). By definition of (Gw), we have \(\mathbf{C}(w^V_\ell (G)) = \{V\}\) where \(\ell = |E|\). Therefore, we also have \(\mathbf{C}(w^V_\ell (Y)) = \{V\}\). Hence, we deduce that \(V(Y) = V\) and that Y is connected. Thus, we have \(Y = X\), since X is a MST of (Gw). \(\square \)

Property 8

Let X be a subgraph of G such that

  1. (1)

    the quasi-flat zone hierarchies of X and of G are the same; and

  2. (2)

    the graph X is minimal for (1), i.e., for any subgraph Y of X, if the quasi-flat zone hierarchy of Y for w is the one of G for w, then we have \(Y = X\).

Then, the graph X is a MST of (Gw).

Proof (by contradiction)

Let us assume that X is not a MST of (Gw). We distinguish three cases.

  1. i.

    We first assume that X is not connected. Then, the |E|-level graph of X is not connected. Thus, the |E|-level partition of X is not trivial, which is a contradiction with the fact that quasi-flat zone hierarchies of X and of G are the same since G is connected and \(\mathbb {E}\) is the range of w.

  2. ii.

    We now assume that X is connected and that there exists a MST Y of (Gw) which is a proper subgraph of X. Then, by Property , the quasi-flat zone hierarchies of Y and of G are the same, which is a contradiction with (2).

  3. iii.

    We finally assume that X is connected and that there is no subgraph of X which is a MST for w. By the contraposition of Lemma , we deduce that there is a subset S of V and an edge \(v = \{x,y\}\) in \(E \setminus E(X)\) outgoing from S and of weight less than the weight of any edge of X outgoing from S. Let \(\lambda = w(v) +1\). It can be seen that x and y belong to the same region of the \(\lambda \)-level partition of G. In order to complete the proof, we will show that x and y do not belong to the same \(\lambda \)-level partition of X, which constitutes a contradiction with statement (1). To this end, we are going to show that there is no simple path (hence, from the observation above Property , no path) in the \(\lambda \)-level graph of X from x to y. Since any path in the \(\lambda \)-level graph of X is a path in X, it is sufficient to prove that any simple path \(\pi = (x_0, \ldots , x_k)\) in X such that \(x_0 = x\) and \(x_k =y\) is not a path in the \(\lambda \)-level graph of X. Without loss of generality, let us assume that x belongs to S and that y belongs to \(V \setminus S\). Thus, there is an index \(i \in \{1, \ldots , k\}\) such that \(x_{i-1}\) belongs to S and \(x_i\) belongs to \(V \setminus S\). Since \(\pi \) is a path in X, the edge \(u = \{x_{i-1},x_i\}\) belongs to E(X). Therefore, u is an edge of X outgoing from S. Hence, by definition of v, the weight of u is greater than the weight v. Thus, the path \(\pi \) is not a path in the \(\lambda \)-level graph of X.\(\square \)

Appendix E: Minimum Spanning Tree and Minimal Representation of a Hierarchy

In Sects. 5 and 6, we consider the problems of finding a minimal subgraph X and a minimal function \(w'\) such that the quasi-flat zone hierarchy of G for w, the quasi-flat zone hierarchy of G for \(w'\) and the quasi-flat zone hierarchy of X for w are the same. In this appendix section, we are interested in a similar problem given a connected hierarchy \(\mathcal {H}\) instead of a weight map w. More precisely, we investigate the following problem:

\((P_4)\) :

given a graph G and a connected hierarchy \(\mathcal {H}\), find a minimal pair (Xw) such that the quasi-flat zone hierarchy of X for w is precisely \(\mathcal {H}\).

Hence, the solutions to this problem can be considered as spatially and functionally minimal representations of the given hierarchy \(\mathcal {H}\).

Before stating the main result of this section, let us deduce some interesting properties from Theorem 4. These properties are useful to prove the main result of this section, namely Theorem 12.

We recall that a tree is a graph that is connected and that cannot be “reduced” by edge removal while remaining connected. More formally, a connected graph X is a tree if, for any connected subgraph Y of X such that \(V(Y) = V(X)\), we have \(X = Y\).

Property 9

Let \(\mathcal {H}\) be a hierarchy such that \(\mathcal {H} = \mathcal {QFZ}(G,w)\). If G is a tree, then we have \(w = \varPhi _G(\mathcal {H})\).

Proof

Let \(u = \{x,y\}\) be any edge of G and let \(\lambda = \varPhi _{G}(\mathcal {H})(u)\). In order to establish Property , we will prove that \(w(u) = \lambda \). Let \(\mathcal {H} = (\mathbf{P}_{0}, \ldots , \mathbf{P}_{\ell })\). By Lemma , we have \(\varPhi _{G}(\mathcal {H}) \le w\). Hence, we have \(\underline{\lambda \le w(u)}\). Since G is a tree, the edge u appears in any path from x to y. By Eq. (6), we deduce that \(\left[ \mathbf{P}_{\lambda +1}\right] _{x} = \left[ \mathbf{P}_{\lambda +1}\right] _{y}\). Thus, there is a path \(\pi \) from x to y in the graph \(w_{\lambda +1}^V(G)\) and the edge u appears in \(\pi \). Hence, from Eq. (2), we deduce that \(u \in w_{\lambda +1}(G)\) and, from Eq. (1), we can affirm that \(\underline{w(u) < \lambda +1}\). Since the range of w is a subset of the integers, we deduce from the two underlined relations that \(w(u) = \lambda \). \(\square \)

Property 10

If G is a tree, then we have \(w = \varPsi _G(w)\).

Proof

Let \(\mathcal {H} = \mathcal {QFZ}(G,w)\). By Eq. (9), we have \(\varPsi _G(w)= \varPhi _G(\mathcal {H})\). Hence, since G is a tree, by Property , we deduce that \(\varPsi _G(w) = w\). \(\square \)

Property 11

If X is a MST of (Gw), then for any edge u of X, we have \(\varPsi _G(w)(u) = w(u)\).

Proof

Let \(\mathcal {H} = \mathcal {QFZ}(G,w)\). By Theorem 4, we also have \(\mathcal {QFZ}(X,w) = \mathcal {H}\). Thus, by Eq. (6), for any \(u \in E(X)\), we have \(\varPhi _G(\mathcal {H})(u) = \varPhi _X(\mathcal {H})(u)\). Since X is a tree, by Property , we have \(\varPhi _X(\mathcal {H})(u) = w(u)\). Thus, for any \(u \in E(X)\), we have \(\varPhi _G(\mathcal {H})(u) = w(u)\). Hence, by Eq. (9), for any \(u \in E(X)\), we have \(\varPsi _G(w)(u) = w(u)\). \(\square \)

Let \(\mathcal {H}\) be a hierarchy, let X be a subgraph of G and let f be a map from E(X) to \(\mathbb {E}\). We say that (Xf) is a representation of \(\mathcal {H}\) if \(\mathcal {H}\) is the quasi-flat zone hierarchy of X for f. A representation (Xf) of \(\mathcal {H}\) is said to be spatially minimal whenever, for any representation (Yf) of \(\mathcal {H}\) such that \(Y \sqsubseteq X\), we have \(Y = X\); the representation (Xf) of \(\mathcal {H}\) is said to be functionally minimal if for any representation (Xg) of \(\mathcal {H}\) such \(g \le f\), we have \(g=f\).

Due to Theorems 2 and 4, we are able to prove the following characterization of the spatially and functionally minimal representations of a hierarchy.

Theorem 12

Let \(\mathcal {H}\) be a hierarchy of depth |E|, let X be a subgraph of G, and let f be any map from E(X) to \(\mathbb {E}\). The pair (Xf) is a spatially and functionally minimal representation of \(\mathcal {H}\) if and only if X is a minimum spanning tree of \((G, \varPhi _G(\mathcal {H}))\) and \(f(u) = \varPhi _G(\mathcal {H})(u)\) for any \(u \in E(X)\).

Proof

Let \(g = \varPhi _G(\mathcal {H})\). In order to establish Theorem 12, we will first prove the forward implication and then the backward one.

  1. 1.

    Let us assume that (Xf) is a spatially and functionally minimal representation of \(\mathcal {H}\). Let Y be any MST of (Xf). Then, by Theorem 4, we have \(\mathcal {QFZ}(Y,f) = \mathcal {QFZ}(X,f) = \mathcal {H}\). Since (Xf) is a minimal representation of \(\mathcal {H}\), we deduce that \(Y = X\). Hence, the graph X is a tree. Then, by Property , we have \(f = \varPhi _X(\mathcal {H})\). Thus, since \(g = \varPhi _G(\mathcal {H})\) and since \(X \sqsubseteq G\), we deduce from Eq. (6) that, for any \(u \in E(X)\), we have \(f(u) = g(u)\). Furthermore, we then have \(\mathcal {QFZ}(X,g) = \mathcal {QFZ}(X,f)\). By definition of g, we have \(\mathcal {QFZ}(G,g) = \mathcal {H}\). Thus, since (Xf) is spatially minimal and since \(\mathcal {QFZ}(X,g) = \mathcal {H}\), we deduce from Theorem 4 that X is a MST of (Gg).

  2. 2.

    Let us now assume that X is a minimum spanning tree of (Gg) and that \(f(u) = g(u)\) for any \(u \in E(X)\). By Eq. (7), we have \(\mathcal {QFZ}(G,g) = \mathcal {H}\). By Theorem 4, we deduce that \(\mathcal {QFZ}(X,g) = \mathcal {H}\) and that for any \(Y \sqsubseteq X\) such that \(\mathcal {QFZ}(Y,g) = \mathcal {H}\), we have \(Y = X\). By definition of f, we can then also deduce that \(\mathcal {QFZ}(X,f) = \mathcal {H}\) and that for any \(Y \sqsubseteq X\) such that \(\mathcal {QFZ}(Y,f) = \mathcal {H}\), we have \(Y=X\). Thus, the pair (Xf) is a spatially minimal representation of \(\mathcal {H}\). Furthermore, since X is a tree, by Property , we have \(\varPhi _X(\mathcal {H}) = f\). Hence, by Theorem 2, we deduce that the representation (Xf) of \(\mathcal {H}\) is also functionally minimal.\(\square \)

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Cousty, J., Najman, L., Kenmochi, Y. et al. Hierarchical Segmentations with Graphs: Quasi-flat Zones, Minimum Spanning Trees, and Saliency Maps. J Math Imaging Vis 60, 479–502 (2018). https://doi.org/10.1007/s10851-017-0768-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10851-017-0768-7

Keywords

Navigation