Petra Bosilj
email: pbosilj@lincoln.ac.uk

Ewa Kijak
email: ewa.kijak@irisa.fr

Sébastien Lefèvre
email: sebastien.lefevre@irisa.fr

Partition and Inclusion Hierarchies of Images: A Comprehensive Survey

Keywords: component trees, hierarchical image representation, Mathematical Morphology, hierarchy indexing

The theory of hierarchical image representations has been well-established in Mathematical Morphology, and provides a suitable framework to handle images through objects or regions taking into account their scale. Such approaches have increased in popularity and been favourably compared to treating individual image elements in various domains and applications. This survey paper presents the development of hierarchical image representations over the last 20 years using the framework of component trees. We introduce two classes of component trees, partitioning and inclusion trees, and describe their general characteristics and differences. Examples of hierarchies for each of the classes are compared, with the resulting study aiming to serve as a guideline when choosing a hierarchical image representation for any application and image domain.

Introduction

Properties such as accuracy, size and relation between elements are considered for an image representation in accordance with the application domain. We list several such families of representations with their characteristics:

•

Pixel-based representation of an image is characterized by a large number of elements in simple neighborhood relations [START_REF] Soille | Morphological Image Analysis: Principles and Applications[END_REF] and contains uninterpreted intensity information [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF].

•

Block-based representations (on binary images [START_REF] Mohamed | Binary Image Compression Using Efficient Partitioning into Rectangular Regions[END_REF][START_REF] Flusser | Refined Moment Calculation Using Image Block Representation[END_REF][START_REF] Perantonis | Block decomposition and segmentation for fast Hough transform evaluation[END_REF] and grayscale images [START_REF] Won | A Block-Based MAP Segmentation for Image Compressions[END_REF][START_REF] Chung | Improved Image Compression using S-Tree and Shading Approach[END_REF][START_REF] Chung | An efficient algorithm for computing moments on a block representation of a grey-scale image[END_REF]) divide the image into the set of (rectangular) arrays of pixels. It has fewer elements than pixel-based representations, but the image data are still not interpreted. Most common applications include image compression [START_REF] Mohamed | Binary Image Compression Using Efficient Partitioning into Rectangular Regions[END_REF][START_REF] Won | A Block-Based MAP Segmentation for Image Compressions[END_REF][START_REF] Chung | Improved Image Compression using S-Tree and Shading Approach[END_REF], segmentation [START_REF] Perantonis | Block decomposition and segmentation for fast Hough transform evaluation[END_REF][START_REF] Won | A Block-Based MAP Segmentation for Image Compressions[END_REF], and feature and attribute extraction [START_REF] Flusser | Refined Moment Calculation Using Image Block Representation[END_REF][START_REF] Perantonis | Block decomposition and segmentation for fast Hough transform evaluation[END_REF][START_REF] Chung | An efficient algorithm for computing moments on a block representation of a grey-scale image[END_REF]].

•

Compressed (or frequency) domain representations store the image as a set of coefficients in a transform domain, such as Fourier transform [START_REF] De Castro | Registration of Translated and Rotated Images Using Finite Fourier Transforms[END_REF][START_REF] Vetterli | Wavelets and Subband Coding[END_REF], wavelets [START_REF] Vetterli | Wavelets and Subband Coding[END_REF][START_REF] Mallat | A Theory for Multiresolution Signal Decomposition: The Wavelet Representation[END_REF][START_REF] Lee | Image Representation Using 2D Gabor Wavelets[END_REF], ridgelets [START_REF] Do | The Finite Ridgelet Transform for Image Representation[END_REF], contourlets [START_REF] Do | The Contourlet Transform: An Efficient Directional Multiresolution Image Representation[END_REF], etc. Typical uses include image compression [START_REF] Vetterli | Wavelets and Subband Coding[END_REF][START_REF] Mallat | A Theory for Multiresolution Signal Decomposition: The Wavelet Representation[END_REF], denoising [START_REF] Do | The Finite Ridgelet Transform for Image Representation[END_REF][START_REF] Mallat | Singularity Detection and Processing with Wavelets[END_REF], reconstruction [START_REF] Lee | Image Representation Using 2D Gabor Wavelets[END_REF], texture analysis and segmentation [START_REF] Bovik | Multichannel Texture Analysis Using Localized Spatial Filters[END_REF]. Their advantage is a reduced image size, but they are sensitive to translation, rotation and scaling [START_REF] Monasse | Morphological Representation of Digital Images and Application to Registration[END_REF] and make it difficult to manipulate localized image content.

•

Region-based representations group similar connected pixels using a segmentation algorithm, typically producing an over-segmentation. The resulting regions are often called superpixels [START_REF] Achanta | SLIC Superpixels Compared to State-of-the-Art Superpixel Methods[END_REF], with the region adjacency information kept in a region-adjacency graph (RAG) [START_REF] Rosenfeld | Adjacency in digital pictures[END_REF] or combinatorial maps [START_REF] Lienhardt | Topological models for boundary representation: A comparison with n-dimensional generalized maps[END_REF]. Different approaches include normalized cuts [START_REF] Shi | Normalized cuts and image segmentation[END_REF], graph-based segmentation by Felzenszwalb and Huttenlocher [START_REF] Felzenszwalb | Efficient graph-based image segmentation[END_REF] and watershed segmentation [START_REF] Vincent | Watersheds in digital spaces: An efficient algorithm based on immersion simulations[END_REF][START_REF] Cousty | Watershed Cuts: Minimum Spanning Forests and the Drop of Water Principle[END_REF], with a comparison in [START_REF] Achanta | SLIC Superpixels Compared to State-of-the-Art Superpixel Methods[END_REF].

The reduced number of regions based on interpreting image information keeps the representational accuracy [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF], but further unions of regions need to be considered to detect semantic structures [START_REF] Vilaplana | Binary Partition Trees for Object Detection[END_REF].

•

Hierarchical representations propose those most likely unions of regions on different scales of the image, from fine to coarse [START_REF] Vilaplana | Binary Partition Trees for Object Detection[END_REF]. They enrich the horizontal relations between regions present in (partial) segmentations [START_REF] Serra | A Lattice Approach to Image Segmentation[END_REF][START_REF] Ronse | Partial Partitions, Partial Connections and Connective Segmentation[END_REF] with vertical inclusion information between regions at different scales. Initially, they were used for image filtering [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF][START_REF] Jones | Component trees for image filtering and segmentation[END_REF][START_REF] Salembier | Antiextensive Connected Operators for Image and Sequence Processing[END_REF], segmentation [START_REF] Garrido | Extensive operators in partition lattices for image sequence analysis[END_REF][START_REF] Meyer | an overview of morphological segmentation[END_REF][START_REF] Horowitz | Picture segmentation by a tree traversal algorithm[END_REF] and boundary detection [START_REF] Tanimoto | a hierarchical data structure for picture processing[END_REF] but have since been applied to a vast amount of domains and applications (cf. Table 3).

We focus on the hierarchical representations of image in this work, and refer to them as component trees due to their aim to propose complex regions corresponding to "meaningful" image objects [START_REF] Jones | Component trees for image filtering and segmentation[END_REF][START_REF] Salembier | Antiextensive Connected Operators for Image and Sequence Processing[END_REF]. While hierarchical image representations have been receiving increasing amounts of attention [START_REF] Arbelaez | Contour detection and hierarchical image segmentation[END_REF][START_REF] Hoiem | Recovering occlusion boundaries from an image[END_REF][START_REF] Uijlings | Selective search for object recognition[END_REF] in image processing community, the structure, properties and construction of such hierarchies are the focus of study of Mathematical Morphology. Quad-trees [START_REF] Horowitz | Picture segmentation by a tree traversal algorithm[END_REF][START_REF] Tanimoto | a hierarchical data structure for picture processing[END_REF] were amongst the first developed hierarchical image representations. However, they are regular hierarchies with predefined image division which is not dependent on the image content, and are in the same relation to the hierarchies considered in this paper as the block-based to the region-based representations. Recently, many different such hierarchical representations have been developed: Trees of Shapes [START_REF] Monasse | Fast Computation of a Contrast-Invariant Image Representation[END_REF][START_REF] Song | Monotonic tree[END_REF][START_REF] Géraud | A quasi-linear algorithm to compute the tree of shapes of nD images[END_REF], Binary Partition Trees (BPT) [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF][START_REF] Vilaplana | Binary Partition Trees for Object Detection[END_REF] and trees based on them (e.g., BPT by Altitude Ordering [START_REF] Cousty | Constructive Links between Some Morphological Hierarchies on Edge-Weighted Graphs[END_REF], Hierarchies of Minimum Spanning Forests [START_REF] Cousty | Incremental Algorithm for Hierarchical Minimum Spanning Forests and Saliency of Watershed Cuts[END_REF]), α-trees [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF][START_REF] Ouzounis | Pattern Spectra from Partition Pyramids and Hierarchies[END_REF] and constrained connectivity hierarchies, such as (ω)-trees [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF][START_REF] Najman | On Morphological Hierarchical Representations for Image Processing and Spatial Data Clustering[END_REF] which merit a structured study and comparison.

Contributions. The "building blocks" of hierarchical image representations were thoroughly investigated by Serra [START_REF] Serra | A Lattice Approach to Image Segmentation[END_REF] and Ronse [START_REF] Ronse | Partial Partitions, Partial Connections and Connective Segmentation[END_REF], who study the (partial) segmentations and partitions, and further the lattices of those (partial) partitions forming hierarchies [START_REF] Ronse | Adjunctions on the lattices of partitions and of partial partitions[END_REF][START_REF] Ronse | Ordering partial partitions for image segmentation and filtering: Merging, creating and inflating blocks[END_REF][START_REF] Ronse | Orders for Simplifying Partial Partitions[END_REF]. In contrast to these and other theoretical works from Mathematical Morphology presented in a more general framework (e.g., [START_REF] Najman | A short tour of mathematical morphology on edge and vertex weighted graphs[END_REF]) and appropriated for different domains, we examine the component trees built directly from monochannel images represented by vertex-valued graphs and equipped with a 4-connectivity.

This paper formalizes the general characteristics of hierarchical representations, and introduces two distinct superclasses based on the common properties of the currently used representations (inclusion and partitioning trees, briefly introduced in [START_REF] Bosilj | Hierarchical Image Representation Simplification Driven by Region Complexity[END_REF]). While hierarchies provide the information relating to the image structure in terms of object relations, they need to be indexed in order to study the scale of image content. We present a consistent way of indexing the hierarchies based on dendrograms [START_REF] Sokal | The comparison of dendrograms by objective methods[END_REF], and additionally propose a mapping from indexed inclusion hierarchies onto partitioning hierarchies on a doubled domain. Different hierarchies are compared in terms of structure, duality, parameterization, their ability to represent objects, and representation completeness.

Existing surveys covering several hierarchical informations are presented in the next section, followed by the basic notions used throughout the article in Section 3. Section 4 formalizes the hierarchies and proposes a unifying hierarchy classification and indexing, while Section 5 is dedicated to a detailed analysis of different hierarchies and their characteristics. A comparison between the current construction algorithms, including references, serving as user guidelines when making an implementation choice is given in Section 6. Finally, Section 7 offers a summary and comparison of different characteristics presented in Sections 5 and 6, as well as identifies the open challenges based on the presented concepts, while the work will be concluded in Section 8.

Related Work

Despite the recent popularity of hierarchical image representations, the published works summarizing and comparing their characteristics tend to be limited to either a specific domain or hierarchy type. In contrast, we aim to explain the general properties of popular hierarchical representations and their behavior in different domains such as filtering, segmentation and object detection.

Hierarchies are often used to select a specific or optimal image (partial) partition for further processing [START_REF] Kiran | Global-local optimizations by hierarchical cuts and climbing energies[END_REF]. Partitions and partial partitions are constituent parts of hierarchical representations, studied in the unifying papers by Serra [START_REF] Serra | A Lattice Approach to Image Segmentation[END_REF] and Ronse [START_REF] Ronse | Partial Partitions, Partial Connections and Connective Segmentation[END_REF] which present the theory of (partial) partitions and study the lattices they make and their relations. The hierarchies are studied and formally defined in [START_REF] Ronse | Adjunctions on the lattices of partitions and of partial partitions[END_REF] as an erosion from the lattice of levels to that of partial partitions. In contrast to our proposition to study the hierarchy structure and scale separately, the definition of a hierarchy offered by Ronse [START_REF] Ronse | Adjunctions on the lattices of partitions and of partial partitions[END_REF] refers directly to indexed hierarchy. We offer both definitions for each studied hierarchy in order to facilitate their use in the theoretical framework of Ronse [START_REF] Ronse | Adjunctions on the lattices of partitions and of partial partitions[END_REF], further expanded to study the ordering between partitions forming hierarchies [START_REF] Ronse | Ordering partial partitions for image segmentation and filtering: Merging, creating and inflating blocks[END_REF][START_REF] Ronse | Orders for Simplifying Partial Partitions[END_REF].

Soille [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF] examined multiple approaches to hierarchical image partitioning, focusing on the problems caused by the chaining effect in the α-hierarchy and proposing constrained connectivity solutions. The studied hierarchies are compared in the context of image simplification, comparing the number of regions based on simplification strength (level) as well as visually comparing the segmentation results. Although the paper proposes many potential modifications to α-connectivity, presently, only the global range constraints are widely used, forming a hierarchy known as (ω)-tree.

An exhaustive survey of filtering tools called connected operators was offered by Salembier and Wilkinson [START_REF] Salembier | Connected Operators[END_REF], focusing on their characteristics and techniques used to create them, and encompassing both the "classical" filtering approaches based on pixel-based representations as well as the approaches based on component trees. Approaches based on simplifying component trees with pruning and non-pruning strategies act on the connected components where the image is constant, bridging the gap between filtering and segmentation. Several hierarchies are presented in the strong context of filtering. It deals with extrema-oriented filtering based on inclusion trees, complemented only by a Binary Partition Tree for regions of intermediate level and without focusing on the implications of replacing an inclusion hierarchy with a partitioning one.

In contrast, the paper by Najman and Soille [START_REF] Najman | On Morphological Hierarchical Representations for Image Processing and Spatial Data Clustering[END_REF] formalizes the structure of hierarchical partitioning representations in the context of image segmentations, extending on the definitions of hierarchical clustering while taking spatial relations between the image elements into account. The ultrametric property of hierarchical clustering is explained in the context of hierarchical segmentations, emphasizing the importance of object scale. Hierarchies are represented by dendrograms [START_REF] Sokal | The comparison of dendrograms by objective methods[END_REF], and the ultrametric watershed is introduced as a new visualization and computation scheme for partitioning hierarchies. We extend the framework to inclusion hierarchies, but regard the structural information of a component tree separately from the scale information in an indexed hierarchy.

One of most recent surveys, by Cousty et al. [START_REF] Cousty | Constructive Links between Some Morphological Hierarchies on Edge-Weighted Graphs[END_REF], is presented in the framework of edge-weighted graphs (i.e., operating on the dissimilarities between image pixels, as opposed to working directly with pixel values). It is accompanied by a paper which presents efficient quasi-linear algorithms based on the Kruskal Minimum Spanning Tree algorithm for computing these hierarchies [START_REF] Najman | Playing with Kruskal: Algorithms for Morphological Trees in Edge-Weighted Graphs[END_REF], and establishes the relations between the α-tree of an image with other Mathematical Morphology hierarchies and segmentation from markers. Recently, these links were studied further in [START_REF] Cousty | Hierarchical segmentations with graphs: quasi-at zones, minimum spanning trees, and saliency maps[END_REF] and put additionally in relation with saliency maps, images which can be interpreted as characteristic maps of hierarchies used for visualization, accompanied by example applications both from the field of image analysis and outside of it.

An application independent survey paper was presented by Najman and Cousty [START_REF] Najman | a graph-based mathematical morphology reader[END_REF] covering a larger scope of morphological image processing techniques. It presents the basic concepts in modern Mathematical Morphology, offering introductory discussions on several topics. They discuss in detail different connectivities which can be used to define the image graph as well as the basic morphological operators. Image segmentation and connected filtering techniques leading to hierarchies of partitions are also presented through examples linking the α-tree hierarchy, minimum spanning forests and watersheds on edge-valued graphs, offering an intuitive insight into various image processing tasks performed on hierarchies. Contrary to this work, which presents the reader with different choices of connectivity relations and filtering criteria but only provides a general idea of the capabilities of hierarchical image processing, our work uses a straightforward framework of 4-connectivity in order to better emphasize the differences and properties of hierarchies under examination.

The published surveys are mostly application-dependent, deal with a limited range of hierarchical representations and do not contrast well the hierarchies of partitions and partial partitions. The goal of this paper will thus be to provide an application independent reference about the structure and characteristics of commonly used hierarchical representations, decoupling the structure of the hierarchy from the scale of the represented regions. It is aimed at a general image processing audience, as a guide in comparing a large range of different hierarchical representations and aid when making a choice of representation.

Image Representation

This section describes the primary definitions from graph theory following [START_REF] Berge | Graphs and Hypergraphs[END_REF], explains the interpretation of images as graphs and finally defines the terminology used in Mathematical Morphology to refer to image components. Firstly, in Section 3.1, we revise how images, partitions and regions are represented on a graph. Secondly, in Section 3.2, we define further terminology for handling image regions, as well as some characteristic image regions.

Images as Graphs

A graph comprises points and arrows which join one point to another. More formally, a graph G is an ordered pair (V, U), where V denotes a set of points, called vertices (or nodes) and U a family of arrows between those points (i.e., duplicate elements are allowed), called arcs. Two vertices joined by an arc are said to be adjacent. An edge is obtained from an arc by discarding the direction of said arc. If the directions of arcs between the vertices are not specified, it is more convenient to represent the graph as a pair G = (V, E), where E stands for the set of edges, and such a graph is then referred to as an undirected graph. An undirected graph is a simple graph if it has no loops (edges from a vertex to itself) and has no more than one edge between any two vertices. While all results applicable to undirected and directed graphs can be applied to both types of graphs indiscriminately, for convenience, it is easier to distinguish between the two types depending on the application. Further, let I be a grayscale digital image which comprises a set of pixels, and f I : I → N 0 , where N 0 = {0, 1, 2, . . . } is the set of natural numbers including 0. A function that assigns to each pixel p ∈ I its intensity value. The dual image, denoted by -I, comprises the same set of pixels while the intensity function is changed: f -I (p) = lMaxf I (p), where lMax is the maximum allowed gray level.

When representing an image I as a graph, the image pixels correspond to the set of vertices V, and choosing an adjacency relation or connectivity (cf. [START_REF] Soille | Morphological Image Analysis: Principles and Applications[END_REF] for more details on connectivity and [START_REF] Ouzounis | Mask-based second-generation connectivity and attribute filters[END_REF][START_REF] Ouzounis | Hyperconnected attribute filters based on k-flat zones[END_REF][START_REF] Perret | Hyperconnections and hierarchical representations for grayscale and multiband image processing[END_REF][START_REF] Ronse | Set-theoretical algebraic approaches to connectivity in continuous or digital spaces[END_REF] for examples of advanced connectivities) determines the set of edges E connecting those pixels and associates an undirected graph G = (V, E) to the image. An edge between two adjacent pixels p and q is denoted by e p,q or e q,p . When using regular 4-connectivity, we can distinguish the image boundary pixels as those pixels p ∈ I that do not have the full set of 4 neighbors. For a theoretical analysis of connectivity and connections, the theory of connective segmentation [START_REF] Serra | A Lattice Approach to Image Segmentation[END_REF] and its extension to partial connections [START_REF] Ronse | Partial Partitions, Partial Connections and Connective Segmentation[END_REF] permit combining different connections.

A path P in G from p 1 to p n is defined by a sequence of vertices (pixels) (p 1 , . . . , p n ) such that for all 1 ≤ i < n the pixels p i and p i+1 are adjacent. A path from p 1 to p n is a cycle if p 1 = p n and has no duplicate edges. SP(p, q) denotes the set of all possible paths in G between any p and q. Pixels p and q are connected in G if and only if there is a path P in G from p to q or if p = q.

We next define the concepts involved into image segmentation based tasks. A subgraph of G generated by a set of vertices V X ⊆ V is defined as X = (V X , E X ), where E X = {e p,q |p, q ∈ V, e p,q ∈ E}. A partial graph of G is generated by a set of edges E X and defined as X = (V, E X ) (i.e., all the vertices and a selected set of edges from the original graph.) Finally, we denote a partial subgraph of G by X ⊆ G, and define it as a subgraph of a partial graph, X = (V X , E X ). Such X ⊆ G is said to be connected if all p, q ∈ V X are connected in X .

A region R = (V R , E R ) of I generated by a nonempty X ⊆ G is defined by V R = V X , E R = {e p,q |e p,q ∈ G ∧ p, q are connected in X }. A connected region or a connected component of the image I is a region R ⊆ G which is connected and of maximal extent, i.e., R ⊆ G s.t. R ⊂ R . For a region R, one can similarly define connected components as connected regions R ⊂ R of maximal extent. We denote the set of all connected components of the image as CC(I), or a region R as CC(R). Unless explicitly specified, all the partial subgraphs and regions in the remainder of the article will be connected.

A set of regions π = {R 1 , . . . , R k }, k ≥ 1 is said to partition the image if it covers the entire image domain and the elements of the set are mutually disjoint:

R i ∈π V R i = V = I and
(1)

∀R i , R j ∈ π, i = j, V R i ∩ V R j = ∅
It can be also defined through an equivalence relation or by associating each point to a class [START_REF] Serra | A Lattice Approach to Image Segmentation[END_REF][START_REF] Serra | Mathematical morphology for Boolean lattices[END_REF]. The intensity function f (•) is partitioned using one of many existing image segmentation algorithms [START_REF] Serra | A Lattice Approach to Image Segmentation[END_REF]. The regions need not be connected (i.e., segmentation to foreground and background, into predetermined classes [START_REF] Ghamisi | a Survey on Spectral-Spatial Classification Techniques Based on Attribute Profiles[END_REF][START_REF] Cavallaro | Extended self-dual attribute profiles for the classification of hyperspectral images[END_REF][START_REF] Damodaran | Attribute profiles on derived features for urban land cover classification[END_REF], second generation connectivity [START_REF] Ouzounis | Mask-based second-generation connectivity and attribute filters[END_REF][START_REF] Wilkinson | a fast component-tree algorithm for high dynamic-range images and second generation connectivity[END_REF]). However, in case of simple 4-connectivity, one would typically work with connected components of the regions for the purpose of building the component trees from the regions.

A segmentation can also determine boundaries between the regions, or contain a residual. If the region set returned by an algorithm does then not cover the entire image domain and is not a partition, it can be handled in the framework of partial partitions introduced by Ronse [START_REF] Ronse | Partial Partitions, Partial Connections and Connective Segmentation[END_REF]. Similar to Equation (1), the elements of the set π * = {R 1 , . . . , R k }, k ≥ 1 partially partition the image if they are disjoint, but need not cover the image domain. In fact, the set:

supp(π * ) = ( R i ∈π * V R i ) (2)
is called the support of the partial partition, and π * partitions the image on its support supp(π * ).

Both the family of partitions and family of partial partitions of a set form a complete lattice, with the ordering between partitions given by:

π 1 ≤ π 2 ⇐⇒ ∀R i ∈ π 1 , ∃R j ∈ π 2 , R i ⊆ R j . (3)
This relation defines the refinement order on partitions, and an equivalent relation defined between any two partial partitions π * 1 and π * 2 gives the standard order. The greatest element of the lattices is the partition into one region containing the whole set, while the smallest element is the empty partition for the lattice of partial partitions, and a partition into singleton elements for the lattice of partitions. The lattices are studied in detail in [START_REF] Serra | A Lattice Approach to Image Segmentation[END_REF][START_REF] Ronse | Partial Partitions, Partial Connections and Connective Segmentation[END_REF].

Manipulating Image Components

A region boundary of a region R = (V R , E R ) is defined as the set of edges E bound (R) given by:

E bound (R) = {e p,q ∈ E|p ∈ V R , q ∈ V R }. ( 4
)
The sets of pixels of the inner and outer boundary are then made out of all the end-points of the boundary edges that belong (resp. do not belong) to the region R:

V inbound (R) = {p ∈ V R |e p,q ∈ E bound (R)} (5) V outbound (R) = {p ∈ V|p ∈ V R , e p,q ∈ E bound (R)}. (6)
All the image pixels not belonging to a connected region R (p ∈ V but p ∈ V R ) make a set of 0 or more connected regions of maximal size in the image domain I, R = {R 1 , . . . , R k }, k ≥ 0. If a R i does not contain any image boundary pixels, it is called a hole of the region R (cavity in case of 3D images). The operation of filling all the holes of a connected region, H(•), adds all the pixels contained in all the holes of a region R to that region R:

H(R) = R i R i , i ≥ 0 (7) such that ∀i, R i is a hole in R.
Flat zones of the image are connected components of the image I on the partial subgraph of G = (V, E) generated by the set of edges E 0 such that e p,q ∈ E 0 ⇐⇒ f (p) = f (q) ∧ e p,q ∈ E, that is connected regions of maximal size comprised only of pixels at the same gray level [START_REF] Serra | Connected operators and pyramids[END_REF][START_REF] Salembier | Flat zones filtering, connected operators, and filters by reconstruction[END_REF]. Flat zone F k at a gray level k can be described as:

F k = {p 1 , . . . , p l }, l ≥ 1 such that ∀p i ∈ F k , f (p i ) = k (8) and ∀p j ∈ F k , if e p i ,p j ∈ E then f (p j ) = k.
We call a flat zone of the image a local maximum F k if it is surrounded by pixels of strictly lower gray level:

∀p ∈ V, e p,q ∈ E, q ∈ F k , p / ∈ F k =⇒ f (p) < k. (9)
Local minima are flat zones surrounded by pixels of strictly higher gray level. Local minima and local maxima together make the local extrema of the image.

The upper and lower level sets (L k and L k , respectively) of an image are sets of image pixels with gray level values higher or lower than k:

L k = {p ∈ I| f (p) ≥ k} (10)
L k = {p ∈ I| f (p) ≤ k} (11)
We additionally define F k , L k , and L k as subgraphs generated by F k , L k , L k , respectively, while still referring to them as flat zones or level sets of the image, and note that they each comprise several connected components.

Component Trees

This section provides a framework for the definition and indexing of hierarchies as well as highlights the construction differences between two types of hierarchies. First, Section 4.1 recalls the definitions of hierarchies on partitions and partial partitions following the formalization in [START_REF] Ronse | Adjunctions on the lattices of partitions and of partial partitions[END_REF][START_REF] Ronse | Ordering partial partitions for image segmentation and filtering: Merging, creating and inflating blocks[END_REF]. Then, Section 4.2 highlights practical construction differences and region evolution within typical hierarchies, classifying them into partitioning and inclusion hierarchies. Finally, we describe the framework for indexing such hierarchies in Section 4.3 according to the specificities of the two classes.

Hierarchies of Partitions and Partial Partitions

Partitions and partial partitions form lattices, defined by the refinement order for partitions, or the standard order (containing the merging, inflating and inclusion orders) for partial partitions (cf. [START_REF] Ronse | Ordering partial partitions for image segmentation and filtering: Merging, creating and inflating blocks[END_REF] for a detailed study on these orders). Thus, in morphological image segmentation a hierarchy is typically defined as an increasing sequence of (partial) partitions going from the least to the greatest element of the lattice: π 0 ≤ ... ≤ π n = 1 E , where the least element is π 0 = 0 E (partition to singletons) for partitions and π 0 = ∅ (empty partition) for partial partitions [START_REF] Ronse | Ordering partial partitions for image segmentation and filtering: Merging, creating and inflating blocks[END_REF][START_REF] Meyer | Segmentation, minimum spanning tree and hierarchies[END_REF]. In practice, all the non-singleton regions at the hierarchy bottom can be treated as singleton elements.

However, the definition through a sequence of (partial) partitions does not decouple the shape and inclusion information from the scale inposed on the regions by indexing (i.e., assigning levels to) the hierarchy. We define a hierarchy without indexing it, similarly to [START_REF] Najman | On the Equivalence Between Hierarchical Segmentations and Ultrametric Watersheds[END_REF]:

1. G ∈ H, 2.
for each two elements R 1 , R 2 ∈ H the following holds: R

1 ∩ R 2 = ∅ ⇒ R 1 ⊂ R 2 or R 2 ⊂ R 1 .
Elementary regions do not need to be included, which allows the support of the partial partition to grow through the hierarchy. This definition imposes the partial ordering on the regions only, contrary to the one through a sequence of (partial) partitions imposing an order on the partitions building the hierarchy. In fact, any set of regions for which these rules hold defines a hierarchy, as we are only interested in the unique hierarchy components. We further justify it by the fact that in case of selecting optimal image segmentation from a hierarchy, one needs to consider the regions of the hierarchy separately rather than the (partial) partitions building it (studied in [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF][START_REF] Guigues | Scale-sets image analysis[END_REF][START_REF] Serra | Discrete Geometry for Computer Imagery[END_REF] with the most recent unifying theory by Kiran and Serra [START_REF] Kiran | Global-local optimizations by hierarchical cuts and climbing energies[END_REF][START_REF] Kiran | Scale space operators on hierarchies of segmentations[END_REF]). It corresponds to selecting optimal cuts in the hierarchies based either on externally imposed criteria (i.e., energy imposed to partitions) [START_REF] Kiran | Global-local optimizations by hierarchical cuts and climbing energies[END_REF][START_REF] Guigues | Scale-sets image analysis[END_REF] or ground truth images [START_REF] Kiran | Scale space operators on hierarchies of segmentations[END_REF][START_REF] Kiran | Ground truth energies for hierarchies of segmentations[END_REF].

To model the structure of a hierarchy, we deal with what berge [START_REF] Berge | Graphs and Hypergraphs[END_REF] called arborescences or rooted trees, which are defined on directed graphs. In directed graphs, the arcs are ordered pairs of elements and an arc a n,m from n to m does not imply the existence of a m,n . A quasi-strongly connected graph G is such a graph where for every pair of vertices p, q there exists a vertice r such that there is a path from r to p and from r to q, and a rooted tree T = (M, P) is a quasi-strongly connected acyclic graph. The definition of a path P in a tree T and a graph G is similar, except that the arcs have to be directed a p i ,p i+1 for all consecutive elements p i , p i+1 . If there exists an arc a m,n in a tree, m is called the parent of n and n a child of m. The vertex m is called an ancestor of n if there exists a path P in T from m to n. The only node which has no children in T is called the root of the tree, while the nodes that have no children are called leaf nodes. Let C = {n 1 , . . . , n k } be a set of nodes. C is a cut of the tree if every path P from the root to any leaf passes through exactly one node n j ∈ C.

In a tree T H = (M, P) which is a component tree, the nodes of the tree model the regions of the hierarchy and the arcs model their inclusion. The region represented by a node n ∈ M is denoted by R(n) = (V(n), E(n)). The root node r ∈ M corresponds to the whole image, while leaf nodes n ∈ M are such nodes for which m ∈ M s.t. V(m) ⊂ V(n). A hierarchy shown in Figure 1a is modeled by the component tree in Figure 1b.

The relation between the parent region and the regions represented by its children can be formalized as follows. If m is a parent node in the tree and n 1 , . . . , n k are all the children of m, the following rules describe how to construct m from its children:

V(m) = V(n 1 ) ∪ . . . ∪ V(n k ) ∪ S(m), (12)
where

S(m) = {p 0 , . . . , p l }, l ≥ 0 such that ∀i ∈ {0, . . . , l}, p i ∈ I (13) ∀j ∈ {1, . . . , k}, p i ∈ V(n j ).
The edge set of the parent can be represented as:

E(m) = {e p,q ∈ E|p ∈ V(m), q ∈ V(m)}, (14)
and the pixel set S(m) has to be such that the following holds:

R(m) = (V(m), E(m)) is a connected region of I. (15)
Equation ( 12) states that a pixel set of the parent can be written as a union of the pixel sets of all its children, and optionally a set of additional pixels S(m). Equation ( 15) ensures the connectedness of the resulting union, and Equation ( 14) that R(m) is indeed a region with the vertex set V(m). This describes the rules one needs to follow when constructing tree regions in a bottom-up approach.

To reconstruct an image from the associated component tree, an altitude or model needs to be assigned to each node n which introduces new pixels into the hierarchy, i.e., which is a leaf, or for which S(n) = ∅. When forming an image, gray level is assigned to all pixels as they are introduced to the hierarchy, at the altitude of the corresponding node. Scale information is imposed by indexing the hierarchy, discussed in Section 4.3. an indexed hierarchy corresponds to the definition through a sequence of (partial) partitions.

We also note that an extension to the framework of hierarchies of (partial) partitions has been proposed by Kiran and Serra [START_REF] Kiran | Braids of partitions[END_REF] through introducing braids of partitions. A braid is a family of partitions larger than a hierarchy, such that the pairwise supremum of any two partitions of the braid B forms a cut in some monitoring hierarchy H. A single braid can posses multiple monitoring hierarchies, while any hierarchy is a braid with itself as a monitor. By definition, dynamic programming properties valid on hierarchies are still valid on braids of partitions. Braids of partitions are a tool allowing to combine and fuse multiple hierarchies calculated on different modes of a multimodal image. This structure however lies outside of the framework of partitions and partial partitions [START_REF] Ronse | Ordering partial partitions for image segmentation and filtering: Merging, creating and inflating blocks[END_REF] (and in fact extends it), as it is more than a hierarchy. As such, further discussion exceeds the scope of this paper and the interested reader is referred to [START_REF] Kiran | Braids of partitions[END_REF][START_REF] Serra | Constrained Optimization on Hierarchies and Braids of Partitions[END_REF] for the theory of braids of partitions, and to [START_REF] Tochon | Segmentation of Multimodal Images based on Hierarchies of Partitions[END_REF] for their application to multimodal image segmentation. We also direct the reader interested in combining different hierarchies of the same image into a new hierarchy (rather than a braid or some other structure) to [START_REF] Cousty | Hierarchical segmentations with graphs: quasi-at zones, minimum spanning trees, and saliency maps[END_REF] where such a method was proposed for the hierarchies of partitions.

(a)

R 0 R 1 R 2 R 3 R 4 R 5 R 6 (b) Figure 1.
A hierarchy (a); and the corresponding component tree (b). The colors used to enclose the connected regions R i in the hierarchy are utilized in the tree as the colors of the corresponding nodes.

Construction Differences between Inclusion and Partitioning Hierarchies

Equations ( 12)-( 15) are general relations formalizing the hierarchy through a component tree. While the hierarchies are naturally divided into hierarchies of partitions and those of partial partitions, in current literature the hierarchies of partial partitions tend to be further restricted. We propose the names of partitioning trees for the hierarchies on the lattice of partitions, and inclusion trees for the subset of the hierarchies on the lattice of partial partitions, based on the nature of parent-child relations in the representations. Such a categorization was previously proposed in [START_REF] Bosilj | Hierarchical Image Representation Simplification Driven by Region Complexity[END_REF] and is explored here in more detail with added illustrations and explanations Any hybrid superclasses would necessarily be hierarchies of partial partitions. an example would be hierarchies of quasi-flat-zones or α-connected components constrained by minimal area threshold (the authors thank one of the reviewers for this example.) However, to the best of our knowledge, all the currently studied and used hierarchies can be assigned into one of the two proposed superclasses. This difference between the classes is shown in Figure 2.

Inclusion trees. The leaf nodes of inclusion trees hold small regions or points, such as local image maxima or minima [START_REF] Jones | Component trees for image filtering and segmentation[END_REF][START_REF] Salembier | Antiextensive Connected Operators for Image and Sequence Processing[END_REF][START_REF] Monasse | Fast Computation of a Contrast-Invariant Image Representation[END_REF], or markers on the image [START_REF] Najman | Geodesic saliency of watershed contours and hierarchical segmentation[END_REF]. In a typical bottom-up construction, nodes are formed by a region growing process starting from the leaves by adding one or more pixels (in Mathematical Morphology, this commonly means the image flat zones) to the existing regions. The new node becomes a parent of the nodes merged by this action and this continues until the root node is obtained covering the whole image domain. As the regions are only formed by adding new pixels to existing region(s), we constrain Equation ( 13) to a strict inequality, l > 0.

Basic image simplification or filtering [START_REF] Salembier | Connected Operators[END_REF] using an inclusion tree includes cutting branches from the leaves up to a region satisfying a desired criterion and collapsing all the removed regions into their closest surviving ancestor. Inclusion trees in literature are based on gray level or contrast between regions, and as such model dark and bright image structures. In this case, the filtering removes small contrasted structures in the image without changing the larger structures.

Partitioning trees. The principal difference with inclusion trees is that the leaves, as well as any cut, of a partitioning tree forms an image partition [START_REF] Guigues | Scale-sets image analysis[END_REF]. The initial partition can be any oversegmentation of the image such as image pixels, flat zones [START_REF] Vilaplana | Binary Partition Trees for Object Detection[END_REF][START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF] or watershed segmentation [START_REF] Lu | Binary partition tree analysis based on region evolution and its application to tree simplification[END_REF]. New regions of the inner nodes are formed as unions of two or more existing adjacent regions. To reflect this, a constraint k > 1 is added to Equation ( 12) and l = 0 to Equation [START_REF] Do | The Finite Ridgelet Transform for Image Representation[END_REF]. At the core of the partitioning tree construction are the notions defining iterative merging [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF], introduced by Garrido et al. [START_REF] Garrido | Extensive operators in partition lattices for image sequence analysis[END_REF]:

1.
Region model defines how regions and their unions are represented. It reflects the characteristics of the regions used in the construction process.

2.

Merging criterion or similarity (or dissimilarity) measure describes the interest of possible merges.

It is based on the region model.

3.

Merging order defines the rules used to merge the regions and which merge to perform next based on the merging criterion.

Simplifying or filtering an image using a corresponding partitioning tree corresponds to selecting a cut in the tree based on some criterion and assigning a model (or altitude) to each node in the selected cut to be used in image reconstruction. As partitioning trees are not typically extrema-oriented and can represent regions of intermediate gray levels, filtering the tree removes the small variations in the gray levels of regions perceived as uniform.

Indexing the Hierarchy

A component tree defines any hierarchy through its structure. To fully exploit the scale and semantic information provided by the different construction algorithms, the hierarchy is indexed by assigning an attribute λ, called the level (of aggregation), to each node of the component tree. It is always a non-negative function of the nodes, increasing along each branch from the leaves towards the root, meaning that if m is an ancestor of n, then λ(n) < λ(m). An indexed hierarchy corresponds to the definition [START_REF] Ronse | Ordering partial partitions for image segmentation and filtering: Merging, creating and inflating blocks[END_REF] through an increasing sequence of (partial) partitions. It can be equivalently defined as an erosion from the lattice of levels to the lattice of (partial) partitions, with an adjoint dilation assigning a level to each region of the hierarchy. This definition is given alongside the definition through an indexed component tree for each presented hierarchy in Section 5 for comparison.

A distance on a set of elements Ω is a function satisfying the conditions of non-negativity,

d(v 1 , v 2 ) ≥ 0, identity, d(v 1 , v 1 ) = 0, symetry, d(v 1 , v 2 ) = d(v 2 , v 1 ) and triangular inequality, d(v 1 , v 2 ) ≤ d(v 1 , v 3 ) + d(v 3 , v 2 ) for any elements v 1 , v 2 , v 3 ∈ Ω of the set.
A distance is an ultrametric distance if it obeys an ultratriangular inequality, a constraint stronger than the triangular inequality: for any three elements of a set,

v 1 , v 2 , v 3 ∈ Ω, it is true that d(v 1 , v 2 ) ≤ max(d(v 1 , v 3 ), d(v 2 , v 3 )).
A bijection between indexed partitioning trees and ultrametric distances [START_REF] Najman | On the Equivalence Between Hierarchical Segmentations and Ultrametric Watersheds[END_REF][START_REF] Johnson | Hierarchical clustering schemes[END_REF][START_REF] Jardine | The structure and construction of taxonomic hierarchies[END_REF] on the same set is established for the case where λ(n) = 0 if and only if n is a leaf node. This is in accordance with the construction algorithms of different partitioning trees, which tend to assign the same attribute value (usually λ = 0) to all the leaf nodes. The levels induce an ultrametric distance on all the vertices of an image graph G = (V, E) with a corresponding partitioning tree T , which can be expressed as:

d(v 1 , v 2 ) = min{λ(n)|n ∈ T , v 1 ∈ V(n), v 2 ∈ V(n)} (16)
A distance between any two image elements from I is given by the smallest level of a node n in the hierarchy representing a region containing both image elements. Such indexed trees are represented in a form of a dendrogram [START_REF] Sokal | The comparison of dendrograms by objective methods[END_REF] (introduced under the name taxonomic tree [START_REF] Sneath | The application of computers to taxonomy[END_REF] for hierarchical clustering), with node height corresponding to the level assigned to it (cf. Figure 3). For inclusion trees and hierarchies of partial partitions in general the identity and non-negativity constraints become d(v 1 , v 2 ) ≥ d(v 1 , v 1 ) ≥ 0. The dendrogram of an inclusion tree is more complicated as points can enter the support of the partial partition at levels above 0 [START_REF] Ronse | Ordering partial partitions for image segmentation and filtering: Merging, creating and inflating blocks[END_REF], which needs to be indicated even when they are entering the support by the process of growing (inflating) an existing region. An example of such dendrogram is shown in Figure 4c. Adding the corresponding sets S(n) as nodes at the lowest level of the hierarchy will allow us to construct a partitioning tree from an inclusion tree, however we will be unable to distinguish the original from the added singletons or reconstruct the original inclusion hierarchy. This is similar to the problem encountered in [START_REF] Ronse | Partial Partitions, Partial Connections and Connective Segmentation[END_REF] when trying to represent an output of a segmentation algorithm producing a residual in the framework of connective segmentations and partitions: adding the residual to the representation by supplementing the partial partition with singletons does produce a full partition, but makes the residual indistinguishable from the original partition components, promoting the introduction of the framework of partial partitions [START_REF] Ronse | Partial Partitions, Partial Connections and Connective Segmentation[END_REF]. To avoid the loss of information, we propose to uniquely map an inclusion tree onto a partitioning tree with a double image domain. We extend every pixel with a ghost pixel at the same gray level, connected only to the original pixel in the image. All the pixels and their ghost pixels form the leaves of the tree and partition the new domain. A ghost pixel merges into the hierarchy at the same level (in the same node) as its original pixel does, ensuring that every node in the tree is formed by merging two or more nodes. The singletons in the hierarchy correspond to the auxilary nodes present due to the ghost regions, making it possible to distinguish between them and the nodes of the original hierarchy. We can now impose an ultrametric distance on the nodes of this new hierarchy if we assign all the auxiliary nodes the level 0. To ensure λ(n) > 0 for all other nodes, we add an arbitrary constant to the level assigned by the construction algorithm, and then Equation ( 16) also holds for indexed inclusion hierarchies. This mapping is of general interest as it allows applying techniques developed for partitioning trees with inclusion trees, e.g., the technique of [START_REF] Maia | Evaluation of Combinations of Watershed Hierarchies[END_REF] on combining several hierarchies of the same image, and in general processing the inclusion trees in the more common framework of multiscale segmentations.

level ¡ ¡ 0 = 0 ¡ 1 ¡ 3 ¡ 2 ¡ 4 (c) 2' 1 2 0' 0' 0 3' 3 2' 2 2' 2 1' 1' 1 4' 4 0 (d) 0' 1' 0' 0 1 0 2' 2' 2' 2 2 2 2' 1' 3' 2' 2' 2 1 3 2 2 0' 1' 4' 2' 1' 3' 2' 2' 0' 0 1 4 2 1 3 2 2 0 0' 0' 0 0 1 1' 0 0 0' 2 3' 3 3 3' 1' 1 4 4' 0' 2 2' 2' 2 2' (e)

Analysis of Tree Characteristics

This section reviews the tree representations frequently used in current literature, offering their definitions as well as examining, summarizing and comparing their characteristics. First, the trees from the inclusion tree superclass are listed, followed by partitioning trees. The most efficient algorithms suited for implementation will be mentioned in Section 6.

Min and Max-Trees

We first explain the concept and give examples for the Min-tree, followed by explaining the implications of the duality relation with the Max-tree. The Min-tree is an inclusion tree representing the dark structures in the image, based on lower level sets with the leaves corresponding to local image minima. A connected component of the level set L k not present in the level set L k-1 makes a new node n k with a region R(n k ) = (V(n k ), E(n k )), which either becomes:

• a parent node to all the previously constructed nodes at lower levels which are included in the region of the new node: R(n

k ) ⊂ R(n k ), k < k; or •
a leaf node if it does not include the regions of any previous nodes.

At the highest gray level, there is only one connected component covering the whole domain and forming the root of the tree. The hierarchy corresponds to distinct connected components of the lower level sets: H min = {CC(L k )|k ≤ lMax}, shown in Figure 5b. The local minima of the dual image -I correspond to the local maxima of the original. Thus, considering the upper level sets of I or the lower level sets of the dual -I we obtain the dual Max-tree hierarchy, defined as

H max = {CC(L k )|k ≤ lMax}.
The Min-tree is suitable for manipulation of dark image structures, and the Max-tree of the bright ones. However, keeping both representations to handle both types of object simultaneously as the trees are redundant and ensuring consistency between them is difficult [START_REF] Caselles | Geometric Description of Images as Topographic Maps[END_REF]. The connected components of L k form a partial partition of the image, CC(L k ), thus the map k → CC(L k ) is an erosion from the lattice of levels to the lattice of partial partitions on the image defining the Min-tree. It assigns the level k to the connected component of L k forming a node in the hierarchy. The level k is also used as the altitude, carrying the information about the darkest region pixel. To index the Max-tree, the erosion and levels are defined using the dual image -I instead, example of which is shown in Figure 5d,e. The altitude of a node n k at level k is calculated as lMaxk.

The structure was introduced by Salembier et al. [START_REF] Salembier | Antiextensive Connected Operators for Image and Sequence Processing[END_REF] as a Max-tree and by Jones [START_REF] Jones | Component trees for image filtering and segmentation[END_REF] as a component tree, which only differ in how the representation is stored [START_REF] Berger | Effective component tree computation with application to pattern recognition in astronomical imaging[END_REF]. More complex hierarchies based on these trees were developed to use with advanced connectivity relations, such as the Dual-Input Max-Tree for mask-based connectivity [START_REF] Ouzounis | Mask-based second-generation connectivity and attribute filters[END_REF][START_REF] Wilkinson | a fast component-tree algorithm for high dynamic-range images and second generation connectivity[END_REF] and hierarchies for hyperconnectivity [START_REF] Perret | Hyperconnections and hierarchical representations for grayscale and multiband image processing[END_REF]. Min-trees have also been calculated on inclusion hierarchies instead of images, to perform filtering operations in shape spaces [START_REF] Xu | Connected Filtering on Tree-Based Shape-Spaces[END_REF].

Tree of Shapes

The Tree of Shapes (ToS) is an inclusion tree combining the Min and Max-tree [START_REF] Monasse | Fast Computation of a Contrast-Invariant Image Representation[END_REF][START_REF] Monasse | Scale-space from a level lines tree[END_REF] to represent both bright and dark structures simultaneously. The leaves correspond to all the local extrema, while the node regions hold shapes, obtained by applying the hole filling operator H(•) on all connected components of the lower and upper level sets. We can thus define the ToS hierarchy as H ToS = {H(R)|R ∈ H min } ∪ {H(R)|R ∈ H max }. These shapes are either nested or disjoint [START_REF] Song | Monotonic tree[END_REF][START_REF] Ballester | The tree of shapes of an image[END_REF]. A node n is the parent of node m if there is no shape R such that R(m) ⊂ R ⊂ R(n). For the original image in Figure 5a, the 5 distinct shapes obtained from upper and lower sets in Figure 6a,b is shown in Figure 6c, with the final hierarchy in Figure 6d. The ToS is a self-dual structure, as the sets of local minima and maxima as well as the upper and lower level sets are inverted in the dual image -I, which then produces the same ToS. The redundancy is eliminated by using the modified connected components (i.e., shapes) when combining the trees. To index the Tree of Shapes and obtain the dendrogram in Figure 6e, we rely on the notion of dynamics along a path (introduced as a contrast measure [START_REF] Grimaud | New measure of contrast: The dynamics[END_REF]) and the notion of region dynamics. The dynamics along the path PD(•) is defined as the sum of intensity differences of adjacent pixels along the path:

PD(P ) = n ∑ i=2 | f (p i ) -f (p i-1 )| (17)
Region dynamics RD(•) of a region R(n) is chosen between all minimal dynamics along the paths between pixels in the same branch of the tree, as the largest such path dynamic:

RD(R(n)) = max{min{PD(P )|P ∈ SP(p, q)}|p ∈ S(n), q ∈ R(n)}. ( 18
)
It can also be defined recursively:

RD(R(n)) = max{|p -q| + RD(R(m))|∀m child of n, p ∈ S(n), q ∈ S(m)} RD(R(n)) = 0 if n is a leaf node, (19)
which allows for easy level calculation in a bottom-up tree construction. The level of the node n associated to the region R(n) is then equal to the region dynamics of the region. To define the hierarchy as an erosion, we define the dynamic shapes at level k:

D k = {p ∈ V|R = (V, E) ∈ H ToS , RD(R) ≤ k}. (20)
We also define D k as the subgraph generated by D k , and obtain the map k → CC(D k ) as the erosion from the lattice of levels to the lattice of partial partitions indexing the ToS hierarchy. The ToS is a complete image representation, where the node altitudes correspond to the level h of the region from the upper or lower level set (resp. L h or L h ) which formed the shape R(n), assigned to the node n. The altitude can be calculated from the levels if the gray levels of the leaves and the sign of the region dynamic for the inner nodes in Equation ( 19) are stored.

This type of structure was independently presented by Monasse and Guichard [START_REF] Monasse | Scale-space from a level lines tree[END_REF] for a combination of 4-and 8-connectivity, and by Song and Zhang [START_REF] Song | Monotonic tree[END_REF] for 6-connectivity (proven equivalent in [START_REF] Song | a topdown algorithm for computation of level line trees[END_REF]). A reduced version of this hierarchy was also proposed by Song and Zhang [START_REF] Song | Monotonic tree[END_REF][START_REF] Song | a topdown algorithm for computation of level line trees[END_REF], aiming to represent only the changes in the topology of the image. The name "Tree of Shapes", used here, was chosen because it prevails in recent literature [START_REF] Géraud | A quasi-linear algorithm to compute the tree of shapes of nD images[END_REF][START_REF] Caselles | Geometric Description of Images as Topographic Maps[END_REF].

Binary Partition Tree

Binary Partition Tree (BPT) is a partitioning tree and is not extrema oriented [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF], making it suited for representing objects with low, high and intermediate gray levels. The construction starts with assigning a node to each region from the initial partition which is based on pixels, flat zones or precomputed partitions [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF][START_REF] Garrido | Extensive operators in partition lattices for image sequence analysis[END_REF]. The hierarchy depends on the choice of region model and merging criterion. The region model can be as simple as the average or median gray level of a region, and is typically assumed to be constant within a single region. A merging criterion is defined as a dissimilarity measure between the region models. The merging order used for the BPT is that of iterative region merging, and dictates the merging of the two regions most similar according to the merging criterion in each step (the order is not defined in the case of more than one pair of most similar regions). The merging sequence and the resulting tree for a BPT using a simple region model and criterion are shown in Figure 7.

The tree is not usually well balanced (cf. [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF][START_REF] Vilaplana | Binary Partition Trees for Object Detection[END_REF]) and can contain simple regions very close to the tree root. Thus, without any assumptions to the similarity measure used in merging, we propose an indexing in such a manner that the similarity measure of each merging step can always be recovered:

• if a node m of T is a leaf node, then λ(m) = 0, •
if a node m is created as a union of regions corresponding to the nodes n 1 and n 2 (i.e., R(m) = R(n 1 ) ∪ R(n 2 )), and the dissimilarity between the regions in the moment of merging was D(R(n 1 ), R(n 2 )), the level of the new node m is calculated according to:

λ(m) = max(λ(n 1 ), λ(n 2 )) + D(R(n 1 ), R(n 2 )). (21)
A corresponding dendrogram for the tree in Figure 7e is shown in Figure 7f. The most precise reconstruction of the original image equals to the precision provided by the initial partition. While the self-duality of the BPT depends on the used region model and merging criterion (if based on gray or color level), it is typically desirable (the merging criterion used in Figure 7 is one such example). As the BPT is the most generic out of all the presented trees and does not pose any restrictions to the merging criterion, we only define the indexing of the nodes recursively due to the complexity of the closed-form solution as an erosion from the lattice of levels to the lattice of partitions. The BPT is the most versatile hierarchy presented in this article, indroduced in Mathematical Morphology by Salembier and Garrido [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF] by keeping track of the merging steps of iterative merging [START_REF] Garrido | Extensive operators in partition lattices for image sequence analysis[END_REF]. This work was continued in [START_REF] Vilaplana | Binary Partition Trees for Object Detection[END_REF] by proposing a more suitable merging criterion and applying it to object detection, while the BPT and appropriate simplification methods were studied in [START_REF] Lu | Binary partition tree analysis based on region evolution and its application to tree simplification[END_REF]. Many developed extensions [START_REF] Cousty | Incremental Algorithm for Hierarchical Minimum Spanning Forests and Saliency of Watershed Cuts[END_REF][START_REF] Najman | Playing with Kruskal: Algorithms for Morphological Trees in Edge-Weighted Graphs[END_REF][START_REF] Jalba | a comparison of two tree representations for data-driven volumetric image filtering[END_REF][START_REF] Vichik | Self-dual morphology on tree semilattices and applications[END_REF] highlight the relations to other component trees and morphological techniques, and specialize it according to the application domain. Additionally, many hierarchical representations outside of the morphological community fit well into the BPT framework, using segmentation methods such as watershed variants and Felzenszwalb-Huttenlocher segmentation to determine the initial partition, and defining the region models and similarity measures based on region boundary, color, texture, size and depth information [START_REF] Arbelaez | Contour detection and hierarchical image segmentation[END_REF][START_REF] Hoiem | Recovering occlusion boundaries from an image[END_REF][START_REF] Uijlings | Selective search for object recognition[END_REF]. We mention here the two notable specializations of the BPT, which have been used to produce hierarchies over images represented by edge-weighted rather than vertex-weighted graphs considered in this work.

0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 4 4 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 (e) λ 12 0 (f)
Binary Partitioning Trees by Altitude Ordering establish the relation between min-trees (cf. Section 5.1) calculated on the edge graph of the image and α-trees (cf. Section 5.4). They are an intermediate step in the calculation of the α-tree (or quasi-flat-zone) hierarchy and other hierarchies when the edge values are calculated as the intensity differences between neighboring pixels, including additionally an imposed order between the edges of equal value, typically defined through Kruskal's Minimum Spanning Tree algorithm [START_REF] Kruskal | On the shortest spanning subtree of a graph and the traveling salesman problem[END_REF]. Such a hierarchy was first explored by [START_REF] Morris | Graph theory for image analysis: An approach based on the shortest spanning tree[END_REF] where different segmentation methods based on the principal hierarchy were also proposed, as well as a possibility of different valuations of the graph edges. The concept was reintroduced to the community and formalized under the name of BPT by Altitude Ordering by Najman et al. [START_REF] Najman | Playing with Kruskal: Algorithms for Morphological Trees in Edge-Weighted Graphs[END_REF] and Cousty et al. [START_REF] Cousty | Hierarchical segmentations with graphs: quasi-at zones, minimum spanning trees, and saliency maps[END_REF] where the relations to other hierarchies were established.

The Hierarchies of Minimum Spanning Forests establish the links with watersheds and segmentation from markers. They are also primarily defined on an edge-weighted graph of the image, but additionally require a set of markers ordered by importance. The markers are typically chosen as local minima of the weight map, when the MSF hierarchies correspond to watershed segmentation defined through the drop of water principle [START_REF] Cousty | Watershed Cuts: Minimum Spanning Forests and the Drop of Water Principle[END_REF]. If the minima are additionally ordered by their extinction values [START_REF] Salembier | Antiextensive Connected Operators for Image and Sequence Processing[END_REF][START_REF] Silva | New extinction values from efficient construction and analysis of extended attribute component tree[END_REF] based on attributes such as area, depth or volume, the resulting Hierarchies of MSF are called hierarchical watersheds [START_REF] Cousty | Incremental Algorithm for Hierarchical Minimum Spanning Forests and Saliency of Watershed Cuts[END_REF][START_REF] Cousty | Hierarchical segmentations with graphs: quasi-at zones, minimum spanning trees, and saliency maps[END_REF][START_REF] Najman | Geodesic saliency of watershed contours and hierarchical segmentation[END_REF]. Hierarchies of MSF allow reordering of the hierarchy according to the calculated or perceived importance of minima, and have as such been used as 2D and 3D segmentation tools as well as for processing of geographical data [START_REF] Cousty | Hierarchical segmentations with graphs: quasi-at zones, minimum spanning trees, and saliency maps[END_REF].

α-Tree

The second presented partitioning tree is the α-tree. Unlike for the BPT, which relies on a predefined merging order but can be customized by the choice of initial partition, region model and merging criterion, all of these parameters are strictly defined for the α-tree. We examine here the α-tree for gray level images in detail, while the proposed adaptations for multichannel images will be discussed briefly in Section 7.2, along with other open challenges.

The initial partition in the α-tree is always the partition to image flat zones. Using the notions introduced in Section 4.2 to describe the α-tree, the region model, merging criterion and merging order are defined as follows:

1.

The region model for each region R is the boundary of that region, E bound (R).

2.

The merging criterion defines the similarity between two neighboring regions as the lowest edge (valued by gray level difference) common to models of both regions:

D(R, R ) = min{| f (p) - f (q)| |e p,q ∈ E bound (R), e p,q ∈ E bound (R )}. 3.
The merging order dictates that, in the i-th step, all regions with the similarity equal to i should be merged.

We also give a more natural definition through α-connected components (also called quasi-flat zones). Image flat zones are considered as 0-connected components. To define the α-connected components for some α > 0, the connected components are considered on the image graph where the neighboring pixels are connected if their gray level difference is less than or equal to α. For increasing values of α, these regions form a hierarchy represented by a tree. If we denote an α-connected component to which a pixel p belongs to by α -CC(p), the hierarchical relation between the regions can be expressed as:

α -CC(p) ⊆ α -CC(p) ∀ α ≤ α ( 22
)
The α-connected components for an image in Figure 8a are shown in Figures 8b-e, with the α-tree shown in Figure 8f. To index the α-tree (cf. example in Figure 8g) we define the quasi-flat-zone partition at level t as QZFP t = {α -CC(p)|∀p ∈ I, α ≤ t}, and the map t → QZFP t as the corresponding erosion from the lattice of levels to the lattice of partitions.

The locality of the similarity metric which considers only the neighboring pixels can cause gray level variations within a single region to be higher than expected for a certain α. An example is shown in Figure 8f, where the level α = 2 contains both a region with 18 and 2 pixels. This is referred to as the chaining effect and the extreme case is shown in Figure 9. Different approaches have been proposed to address this issue [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF][START_REF] Najman | On Morphological Hierarchical Representations for Image Processing and Spatial Data Clustering[END_REF][START_REF] Soille | Constrained Connectivity and Transition Regions[END_REF][START_REF] Soille | Constrained connectivity for the processing of very-high-resolution satellite images[END_REF][START_REF] Soille | Preventing Chaining through Transitions While Favouring It within Homogeneous Regions[END_REF].

This tree is self-dual as the contrast information between neighboring pixels does not change in the dual image -I, and a complete image representation. Simplifying the images by approximating the regions in a partition formed by respecting a local range parameter was introduced in [START_REF] Nagao | Region extraction and shape analysis in aerial photographs[END_REF], studied further in [START_REF] Meyer | The levelings[END_REF], while the term α-connected component was first used by Soille in [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF]100] where the hierarchical properties of such regions were asserted.

(ω)-Tree

For the ease of understanding, we first provide the usual definitions of the (ω)-tree through the α-connected components of maximal size, followed by the more complex definition through the region model, merging criterion and merging order. The (ω)-tree is a partitioning tree aiming to solve the problems with chaining effect present with α-trees. If the parameter α restricts the maximal range between locally connected pixels, ω corresponds to the maximal global gray level range inside a connected component. The global gray level range of a component is denoted by GR(•) and is defined as the value difference between the highest and lowest pixel gray level value in the component. The notion of (α, ω)-connected components was introduced together with the notion of α-connected components by Soille [100], denoted by (α, ω) -CC(p) for a pixel p, and defined as the α -CC(p) with the maximal possible α ≤ α such that the global range is still lower or equal to ω:

(α, ω) -CC(p) = α -CC(p), (23)
where α = max{α | α ≤ α and GR(α -CC(p)) ≤ ω}.

Even though the following relation holds for every pixel p:

(α, ω) -CC(p) ⊆ (α , ω ) -CC(p) for α ≤ α and ω ≤ ω , (24)
the set of all (α, ω)-connected components can not form a hierarchy due to the unknown order between (α, ω) -CC(p) and (α , ω ) -CC(p) for α ≥ α and ω ≤ ω . For α ≥ ω, the local range parameter α does not play a role, as the (α, ω)-connected components are equivalent to those for α = ω [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF]. The (ω) -CC are considered the largest α -CC(p) with the global range less or equal to ω:

(ω) -CC(p) = (α ≥ ω, ω) -CC(p) = max{α -CC(p)| GR(α -CC(p)) ≤ ω}. ( 25
)
Unlike the components defined by Equation ( 23), the (ω) -CC define a hierarchy, called the (ω)-tree. an example of this hierarchy for the image in Figure 8a is depicted in Figure 10. To define the (ω)-tree through region model, region criterion and merging order, there are the following changes as when compared to the α-tree:

1.

The region model for R is the boundary of that region, E bound (R), and minimal and maximal pixel values: min{| f (p)f (q)||e p,q ∈ R}, max{| f (p)f (q)||e p,q ∈ R}.

2.

The merging criterion defines the similarity between all allowed sets of regions N = {R 1 , . . . , R n }, n ≤ 2 such that the subgraph of I generated by the union of all the region vertice sets: n i=1 V R i is connected. The weight of such a merge between a set of regions N is:

W(N ) = max(min{| f (p) -f (q)| | e p,q ∈ E bound (R i ), e p,q ∈ E bound (R j ), ∀i, j, i = j}, (26)
max{ f (p)|p ∈ R i ∀i} -min{ f (p)|p ∈ R i ∀i}).

3.

The merging order dictates that in the i-th step, all the sets of regions of maximal extent with the similarity equal to i should be merged.

Indexing the (ω)-tree is similar to indexing the α-tree since they are both constrained connectivity hierarchies [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF]: we define global range partitions as GRP t = {(ω) -CC(p)|∀p ∈ I, ω ≤ t} and t → GRP t as the corresponding erosion (cf. Figure 10g for dendrogram). The problems with the chaining effect are not completely solved since the (ω)-decomposition of the image can not contain regions not already present in the α-decomposition, however the (ω)-indexing better reflects the region complexity (compare ω = 8 with α = 1 for the full image in Figure 9c).

Since it is based on the α-tree, the (ω)-tree retains its self-dual property and other characteristics. The (ω)-tree of the same image always has more levels, and the number of regions decreases more slowly from the leaf levels towards the root. However, as both trees represent only the unique regions, the (ω)-tree representation always has fewer nodes than the α-tree since regions are removed from the α-tree when forming an (ω)-tree. Both of these effects can be observed by comparing the dendrograms from Figures 8g and10g.

Construction Algorithms

We discuss here the approaches to construct various trees, explain the main idea behind each algorithm and provide the references to the original approaches. The complexity is expressed in relation to the number of image pixels N, depending on quantization defined by the number of bits used to code pixel values q and the range of those values k = 2 q .

Min-and Max-tree construction. a recent comparison of Min-tree and Max-tree construction algorithms was offered by Carlinet and Géraud [101], dividing the construction algorithms into immersion algorithms, flooding algorithms and merge-based algorithms. The merge-based approaches are mainly used for parallelism, and are not further discussed here (for a recent parallel implementation of Max-tree combining the merge-based and flooding approach, cf. e.g., [102]).

The first efficient Min-tree computation algorithm by Salembier et al. [START_REF] Salembier | Antiextensive Connected Operators for Image and Sequence Processing[END_REF] is a flooding algorithm. It begins with the pixel at the gray level lMax which constitutes a root pixel, from which the depth-first propagation through image elements is performed, recursively [START_REF] Salembier | Antiextensive Connected Operators for Image and Sequence Processing[END_REF] or using a hierarchical queue [103]. For low quantization (q ≤ 16 bit) a linear complexity of O(kN) ∼ O(N) is achieved since k is small, but for larger q, the complexity becomes quadratic, O(N 2 ), making them unsuitable for generic pixel (e.g., float) values. To overcome this, Wilkinson [START_REF] Wilkinson | a fast component-tree algorithm for high dynamic-range images and second generation connectivity[END_REF] replaces the hierarchical queue with a priority-queue, resulting in a flooding algorithm running in O(N log N) complexity for any pixel type with a total order (e.g., high dynamic range integers and float values).

The first step of immersion algorithms is sorting all the N image elements according to the appropriate order (i.e., the intensity ordering), which then form N disjoint singleton sets. Those sets are then merged to form a tree in the second step, using Tarjan's union-find algorithm [104]. The complexity of the sorting step is bounded to O(N + k) for small integers (typically q ≤ 12 bits or q ≤ 16 bits), but increases to O(N log N) for generic data types. For low quantized data, i.e., q ≤ 12 bit, the union-find implementations with lowest complexity by Berger et al. [START_REF] Berger | Effective component tree computation with application to pattern recognition in astronomical imaging[END_REF] and Najman and Couprie [105] use techniques such as root path compression, union-by-rank and level compression (to the detriment of memory usage) to achieve a quasi-linear time complexity of O(N × α(N)) (α(N)-very slow growing inverse of the diagonal Ackermann's function, α(10 80 ) 4). For arbitrarily quantized data, the sorting step binds the complexity to O(N log N).

Tree of Shapes construction. Early approaches to ToS construction operated with worst-case time complexity of O(N 2 ) [START_REF] Caselles | Geometric Description of Images as Topographic Maps[END_REF][START_REF] Song | a topdown algorithm for computation of level line trees[END_REF] and were not easily extendible to multidimensional (nD) images [START_REF] Monasse | Fast Computation of a Contrast-Invariant Image Representation[END_REF]. A recent algorithm by Géraud et al. [START_REF] Géraud | A quasi-linear algorithm to compute the tree of shapes of nD images[END_REF] overcomes these drawbacks by using the immersion algorithms for Min-tree construction as a canvas, and replacing the sorting step.

The sorting step in an immersion algorithm should place the image elements from the external shapes before the elements from the internal shapes. For the ToS computation, representing the image as a set-valued map on a Kahlimsky grid [106] materializes the inter-pixel spaces and enables the computation of the correct shape order. The sorting step depends on a hierarchical queue, so can only handle quantized data, and runs in O(kN) considered linear for low quantized data (authors recommend q ≤ 12 bits). The immersion step has the same O(N × α(N)) complexity as for the Min-tree, resulting in the quasi-linear complexity of O(N × α(N) + kN) ∼ O(kN) for the whole algorithm.

Binary Partition Tree construction. The BPT computation starts with an initial partition, then merges the two most similar regions in each step (until reaching a single region), iteratively updating the similarity. We present here the complexity estimation of the construction algorithm for the case when updating the region model and calculating similarity between the models can be done in constant time, as studied by Guigues [107].

When no specific connectivity is imposed on the image, the iterative construction algorithm corresponds to hierarchical (agglomerative) clustering [108]. The detailed analysis of the algorithm identifies the advantages of using a hierarchical queue to keep the similarity information [START_REF] Garrido | Extensive operators in partition lattices for image sequence analysis[END_REF]. The initial partition is a segmentation into N separate pixels or regions. The similarities of the initial over-segmentation are sorted after calculation, which is bounded by O(N 2 log(N 2 )) ∼ O(N 2 log N) for up to to N 2 similarities. The construction proceeds by iteratively finding the pair of most similar regions, removing the similarity information related to those regions, merging them and re-calculating the similarity information for the new region. Determining the smallest similarity is a constant operation in a hierarchical queue, while the similarities are updated in O(N log N), with the number of iterations equal to the number of regions. Based on this, the construction complexity of BPT is bounded by O(N 2 + N 2 log N + N × (N + N log N)) ∼ O(N 2 log N). In the case of a specific connectivity, the speed of calculating and updating the similarity information can significantly decrease depending on the merging criterion used (4-connectivity analyzed in [109] approximates an upper bound to O( 23 N 2 ) ∼ O(N 2 )). The special cases of BPT based on the α-tree [40,53] can be constructed even faster, relying on their properties achieved by specializing the BPT parameters.

α-tree construction. The α-tree construction algorithm relies on its equivalence with a Min-tree defined on the edges valued with pixel intensity differences [START_REF] Najman | On Morphological Hierarchical Representations for Image Processing and Spatial Data Clustering[END_REF][START_REF] Najman | On the Equivalence Between Hierarchical Segmentations and Ultrametric Watersheds[END_REF], and can use any Min-tree algorithm. Extending the idea, Havel et al. [110,111] calculate the α-tree directly using a modification of Tarjan's union-find [104], presenting an algorithm suited for multithreading applications.

The algorithm by Najman et al. [START_REF] Najman | Playing with Kruskal: Algorithms for Morphological Trees in Edge-Weighted Graphs[END_REF], inspired by Kruskal's Minimum Spanning Tree algorithm [START_REF] Kruskal | On the shortest spanning subtree of a graph and the traveling salesman problem[END_REF] and using Tarjan's union-find [104], first constructs a BPT by Altitude Ordering, from which the α-tree can be obtained with a linear post-processing step [START_REF] Cousty | Constructive Links between Some Morphological Hierarchies on Edge-Weighted Graphs[END_REF][START_REF] Najman | Playing with Kruskal: Algorithms for Morphological Trees in Edge-Weighted Graphs[END_REF]. The complexity of the α-tree construction algorithms is the same as for the Min-trees, and is quasi-linear in the number of image pixels for low quantization, O(N × α(N)).

(ω)-tree construction. The first step in calculating the (ω)-tree and other constrained connectivity hierarchies is calculating the α-tree they are based on. The ultrametric watersheds by Najman [START_REF] Najman | On the Equivalence Between Hierarchical Segmentations and Ultrametric Watersheds[END_REF] enable visualizing these hierarchies and calculating them from the α-tree based on the Lowest Common Ancestor (LCA) [112] in constant time for every pair of neighboring elements in the ultrametric watershed. The transformation into the (ω)-tree is itself linear.

The (ω)-tree can be interpreted as an α-tree where the global component range is used as a region complexity measure according to Bosilj et al. [START_REF] Bosilj | Hierarchical Image Representation Simplification Driven by Region Complexity[END_REF], which proposes a filtering approach removing the nodes from the α-tree and indexing the hierarchy by assigning the complexity measure as the level (of aggregation) to the nodes. This is realized by a bottom-up traversal of the tree, linear in the number of nodes of the tree and the number of image elements. Using any of the proposed approaches, the (ω)-tree can be constructed in the same complexity as the α-tree, O(N × α(N)) for low quantized image data.

Applications and Future Directions

This survey offers a comparison of component trees which is inclusive, not application-dependent and in the widespread image processing framework on vertex-valued graphs equipped with 4-connectivity. After the structure and the basic idea behind the construction algorithms of the trees were presented, this section focuses on current applications, interesting research directions and application domains for component trees. Section 7.1 offers an overview and comparison of the presented trees in terms of image processing applications, while the open challenges are outlined in Section 7.2.

Comparative Summary

For each tree, the characteristics such as duality, completeness and types of regions held in the representation were determined. The most basic choice is the one between inclusion trees and partitioning trees. While both types of hierarchies are well suited for image simplification, filtering and object detection, the structure of inclusion trees resulted in their common usage when selecting prominent image regions (such as discriminating keypoints) while the partitioning trees lend themselves better to producing segmentations of the image according to given criteria. As all the presented trees are complete representations, they can be either used directly as a search space, or their filtered versions or reduced hierarchies can be used if a smaller search space is needed.

The region types of different trees are closely examined as content representation has a direct influence on the type of objects and scenes each representation is well suited for. When working with extremal regions of the image, one should choose an inclusion tree representation. A choice between the different inclusion trees will depend on whether the contrast of the object related to the background is known in advance (for processing bright or dark objects, one would choose a Max-tree or a Min-tree respectively, but if this information is not known the ToS can be used to process both types of objects at the expense of slightly higher construction times). On the other hand, partitioning trees can contain regions at intermediate gray levels and are better suited for processing complex scenes (e.g., a satellite image of a whole city) and identifying composite objects. The most flexibility is offered by the BPT and its many specializations, where the construction parameters can be determined with a specific application in mind.

The construction complexity is another important factor to consider, and was examined for different quantization and data types in Section 6. All these characteristics are summarized for inclusion trees in Table 1 and partitioning trees in Table 2. To provide a practical example of using these trees in image processing, a result of simple level-based filtering is shown in Figure 11. It shows the way different trees interact with image components, with the extrema-oriented inclusion trees processing the regions according to inclusion and gray-level order, and the partitioning hierarchies working on similarity-based regions with intermediate gray levels. On the one hand, a list of various application domains given in Table 3 shows that simplification, description of whole images (for remote and hyperspectral imaging) and, naturally, segmentation, are prevalent applications with partitioning trees. On the other hand, dealing with isolated image features (and applying them to image retrieval), as well as filtering out small details and noise, or segmenting and detecting specific objects on a contrasted background (e.g., in astronomical imaging) was mostly done using inclusion trees. Table 3. Some applications of the presented trees from the literature.

Application Domain Inclusion Partitioning

Min/Max ToS BPT α-Tree (ω)-Tree

Open Challenges

Hereafter, we identify some open challenges not discussed herein, which would provide viable directions for future research.

This article focuses mainly on monochannel images, but as the examined hierarchical structures have a primary goal of providing good estimated locations of objects contained in the image, the color (and any other kind of) information contained in multichannel images has to be considered. For a general partitioning tree, working with vectorial instead of scalar image element values is fairly easy, as the total order between the values of image elements is not required. As such, the BPT was originally defined with color in mind [START_REF] Salembier | Binary Partition Tree as an Efficient Representation for Image Processing, Segmentation, and Information Retrieval[END_REF], and the trend of including color information has persisted in current literature [START_REF] Vilaplana | Binary Partition Trees for Object Detection[END_REF][START_REF] Lu | Binary partition tree analysis based on region evolution and its application to tree simplification[END_REF]. For the α-tree, several adaptations for multichannel images exist [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF][START_REF] Soille | Constrained Connectivity and Transition Regions[END_REF]119,129,162] (https://github.com/pbosilj/trees-lib).

However, for the inclusion trees, due to a wide range of available total orderings on image element values [163] for multivariate data, this extension is not straightforward. Max-trees and Min-trees for multivariate data were first investigated for general applications [158]. The study of relations between these hierarchies and multivariate data in the context of connected filtering conducted by Passat and Naegel [164] and Kurtz et al. [159] define a more general structure called a component graph for multivalued images, as well as specific constraints under which a component graph preserves the tree structure and is instead referred to as multivalued component tree. An algorithm for extracting distinguished features from color images [165] also indirectly defines a Max-tree and Min-tree structure for color images. Extension of the Tree of Shapes to color images has been only very recently tackled by Carlinet and Géraud [166]. Let us note that when the tree is used solely for image description, processing multichannel data (e.g., hyperspectral images) can be simply achieved with a marginal strategy, i.e., building a tree for each image channel (see [141] for Max-trees and Min-trees, [START_REF] Cavallaro | Extended self-dual attribute profiles for the classification of hyperspectral images[END_REF] for the Tree of Shapes), or by an hybrid marginal/vectorial strategy [152].

We also note advances in the application domain of image filtering where the Max-tree hierarchy was used to implement connected operators [START_REF] Salembier | Antiextensive Connected Operators for Image and Sequence Processing[END_REF]. A whole variety of connected operators can be realized by replacing the Max-tree with other component trees, and this fundamental extension to the framework of connected operators was studied in [START_REF] Salembier | Connected Operators[END_REF]. Recently, Xu and co-authors [START_REF] Xu | Connected Filtering on Tree-Based Shape-Spaces[END_REF]139] have proposed defining the filtering in shape space, an image whose adjacency relation is given by the parental relations in its original Max-tree. A novel way of filtering and node selection is also proposed by Perret and Collet [114], which puts Mathematical Morphology in relation with stochastic models, relying on a Markovian algorithm to classify the nodes of a tree.

Other open problems include finding the solution to the chaining effect present in α-trees (cf. Subsec 5.4). This first led to defining logical predicate connectivity [100] and constrained connectivity [START_REF] Soille | Constrained Connectivity for Hierarchical Image Partitioning and Simplification[END_REF][START_REF] Najman | On Morphological Hierarchical Representations for Image Processing and Spatial Data Clustering[END_REF][START_REF] Soille | Constrained Connectivity and Transition Regions[END_REF][START_REF] Soille | Constrained connectivity for the processing of very-high-resolution satellite images[END_REF][START_REF] Soille | Preventing Chaining through Transitions While Favouring It within Homogeneous Regions[END_REF]153] and establishing the (ω)-tree (explained in Section 5.5). More recently, mask-based connectivity, hyperconnectivity and directed connectivity, as well as the advanced hierarchies based on them [START_REF] Perret | Hyperconnections and hierarchical representations for grayscale and multiband image processing[END_REF][START_REF] Wilkinson | a fast component-tree algorithm for high dynamic-range images and second generation connectivity[END_REF]167], were introduced as a way to handle both visually disconnected objects, overlapping or weakly connected objects in images.

An interesting challenge would also be to formalize the theoretical relations between the hierarchies. They are only mentioned here as implied by the construction algorithms in Section 6. Examples include building the α-trees as the Min-tree of the edges [START_REF] Najman | On the Equivalence Between Hierarchical Segmentations and Ultrametric Watersheds[END_REF]110], representing the α-tree as a BPT by imposing the order on its edges, and using the Max-tree algorithm as the canvas for the Tree of Shapes construction algorithm [START_REF] Géraud | A quasi-linear algorithm to compute the tree of shapes of nD images[END_REF]. Relations between some other hierarchies have also been explicated in [START_REF] Cousty | Constructive Links between Some Morphological Hierarchies on Edge-Weighted Graphs[END_REF], but relations between all the hierarchies examined herein are still unknown and merit further examination.

Conclusions

We present a unifying survey of hierarchies of partitions and partial partitions used in practice, and propose a framework which decouples the structural shape information from the scale information added by indexing. The paper further offers a unifying view on the taxonomy and indexing of image hierarchies through component trees, which correspond naturally to the way the hierarchies are constructed and explicitly define the parent-child (inclusion) information between the regions. We propose two distinct categories of image hierarchies: inclusion and partitioning trees, and identify the restrictions to the general component tree formalization implied by the categories. The formalization through component trees can also be applied to potential new hybrid classes of trees by imposing different restrictions to the general definition. An established framework for indexing the hierarchies by dendrograms was described, which allows enriching the structural representation of the hierarchy with scale information. We propose a mapping from indexed inclusion trees to indexed partitioning trees, allowing us to recover the original inclusion tree.

We have presented the details, characteristics and construction algorithms of a large number of component trees, offering an application-independent way of comparing them, which makes it the most comprehensive such study thus far. The current growing interest in processing techniques interacting with image regions or superpixels rather than individual image elements and requiring a representation extending through multiple scales, often modeled as a hierarchy, make such a paper of particular interest.

Figure 2 .

 2 Figure 2. This image demonstrates the difference between the superclasses of partitioning and inclusion trees. Cuts of the partitioning tree near its bottom and the middle, as well as the root node are displayed on the left. A set of nodes from the inclusion tree close to the bottom and middle of the tree, and the root of the tree are displayed on the right.

Figure 3 .

 3 Figure 3. A possible partitioning tree constructed for the image in (a) is shown in (b), and one possible indexing of the tree is displayed as a dendrogram in (c).

Figure 4 .

 4 Figure 4. A possible inclusion tree for the image displayed in (a) is shown in (b), with one possible dendrogram shown in (c). In this dendrogram, the gray nodes with represent new image elements entering the hierarchy, and do not belong to the support before then as indicated by the gray dotted line.The image extended by ghost pixels is shown in (d), with the links between original pixels shown in red and the links between the ghost and corresponding original pixels in violet. The extended tree shown in (e) is a partitioning tree for (d), with the auxiliary nodes (in green) identifiable as the singletons in the hierarchy.

Figure 5 .

 5 Figure 5. (a) The original image; (b) corresponding Min-tree; (c) the dendrogram; and (d,e) Max-tree and its dendrogram. Corresponding regions are shown next to the nodes.

Figure 6 .

 6 Figure 6. Upper and lower level sets of the image in Figure 5a (a,b); regions acquired by filling the holes of the level sets and forming the hierarchy (c); the Tree of Shapes (d); and the dendrogram (e).

Figure 7 .

 7 Figure 7. Creation of Binary Partition Tree on the flat zones of the original image in (a), using a constant gray level as the region model. The model is updated as the gray level of the larger of the child regions after a merge, or average in case of a tie. The merging criterion defines the dissimilarity as the difference between the region models. Merging order merges the region pair with the smallest dissimilarity first. Three merging steps are represented in (b-d). The constructed BPT is displayed in (e) and the numbers in the nodes indicate the merging order, with the indexed hierarchy dendrogram in (f).

Figure 8 .

 8 Figure 8. The original image (a); and partitions for α = 0 -3 (b)-(e), respectively, with edges between connected pixels shown in thin green lines and region borders in thick red; the α-tree (f); and the dendrogram (g).

= 1 Figure 9 .

 19 Figure 9. An example for the chaining effect for the image (a). The hierarchy of α-connected components has only two different levels (b,c). Although all pixel gray levels differ, the decomposition has no intermediate steps.

Figure 10 .

 10 Figure 10. The partitions by levels of the (ω)-tree, for the original image from Figure 8a. Partitions for ω = 0-5 are shown in (a)-(e), respectively. The tree is displayed in (f), with the indexed tree displayed in (g).

Figure 11 .

 11 Figure 11.Filtering the standard 256 × 256 grayscale Lena image using different trees. For all the trees except the BPT, the filtering was done by choosing a threshold level and keeping only the nodes above that level, using the library made by the authors1 . The images for the BPT were generated by the tool presented in [109], which uses a different indexing method and filtering strategy. For every tree, a weaker and stronger filtering were performed, with the number of remaining nodes displayed in the sub-caption (except for BPT). Weak and strong filtering of the Min-tree (originally 15652 nodes) is shown in (a,b) respectively; and for the Max-tree (originally 15048) in (c,d). Filtering using the ToS (starting with 23796 nodes) correspond to: (e) weak; and (f) strong. The images resulting from BPT are shown: (g) weak filtering; and (h) strong filtering. The α-tree (76710 nodes) filtering results are displayed: (i) weak; and strong (j). Finally, filtering using the (ω)-tree (75185 nodes before filtering) is depicted: (k) weak; and (l) strong.

Table 1 .

 1 Summary of characteristics for inclusion trees.

	Tree	Max Tree	Min Tree	Tree of Shapes
	Dual tree	Min tree	Max tree	self-dual
	Type of objects	dark objects	bright objects	shapes
	Complete representation? Yes	Yes	Yes
	Construction complexity	O(N

× α(N)) O(N × α(N)) O(kN)

	Additionalparameters	No	No	No

Table 2 .

 2 Summary of characteristics for partitioning trees.

	Tree	Binary Partition Tree	α-Tree	(ω)-Tree
	Dual tree	self-dual a	self-dual	self-dual
	Type of objects	unions of initial partition α-CC (quasi flat zones) (ω)-CC
	Complete representation? Yes b	Yes	Yes
	Construction complexity	O(N 2 log N)	O(N × α(N))	O(N × α(N))
		Initial partition,
	Additional parameters	region model,	No	No
		similarity measure

a Depends on region model and similarity measure, but usually desirable. b depends on the initial partition.

J. Imaging 2018, 4, 33; doi:10.3390/jimaging4020033 www.mdpi.com/journal/jimaging

Acknowledgments:

The authors would like to thank Laurent Najman for fruitful discussions leading to presented indexing schemes for inclusion trees (and specifically for inspiration concerning Tree of Shapes indexing), and the anonymous reviewers for their constructive suggestions.

Author Contributions: This paper builds upon the doctoral work of Petra Bosilj, jointly supervised by Sèbastien Lefèvre and Ewa Kijak. Petra Bosilj designed and performed the experiments; Sèbastien Lefèvre and Ewa Kijak interpreted the findings. The article was co-written by the three authors.

Conflicts of Interest:

The authors declare no conflict of interest.