NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A quasi-linear algorithm to compute the tree of shapes of nD images

Thierry Géraud, Edwin Carlinet, Sébastien Crozet, Laurent Najman

TL;DR

This paper introduces a novel, quasi-linear time algorithm for computing the "tree of shapes," a powerful morphological representation of images. The new algorithm is simpler, works for n-dimensional images, and is efficient for low-bit-depth data, overcoming limitations of previous methods.

What Problem Does This Paper Address?

The "tree of shapes" is a valuable self-dual representation in mathematical morphology, offering advantages like independence from object contrast and inherent redundancy elimination. However, existing algorithms for computing it suffer from poor time complexity (O(n²)) and are primarily limited to 2D images, hindering their practical application, especially for higher-dimensional data common in fields like medical imaging or computer vision. This paper aims to bridge this gap by providing an efficient, generalizable, and simpler algorithm.

Methods

The core of the paper lies in two main contributions:

  1. A "Canvas" Algorithmic Scheme: The authors leverage a well-established union-find algorithm, commonly used for computing max-trees, as a flexible "canvas." This meta-algorithm can be adapted for different morphological structures.
  2. A Novel Image Representation: To enable the union-find scheme to work for the tree of shapes and to handle nD images efficiently, a new discrete image representation is introduced. This representation, based on the Khalimsky grid and set-valued maps, exhibits continuity properties that are crucial for the algorithm's performance. It effectively interpolates between pixel values and allows for a more unified treatment of image features.

The algorithm then combines these elements: it interpolates the input image into this new representation, sorts the resulting "faces" (elements of the representation) using a hierarchical queue, applies the adapted union-find algorithm to build a tree structure, and finally "un-interpolates" the result to obtain the tree of shapes.

Datasets

Not discussed in the paper. The paper focuses on the algorithmic development and theoretical properties rather than empirical evaluation on specific datasets.

Key Insights and Ideas

  • Union-Find as a Universal Morphological Canvas: The paper demonstrates that a single, efficient algorithmic framework (union-find) can be adapted to compute different morphological trees, highlighting the power of abstracting common computational patterns.
  • Bridging Discrete and Continuous: The novel image representation ingeniously bridges the gap between discrete image data and the need for continuous properties (like continuity) required by advanced algorithms. This allows for more robust and generalizable image processing.
  • Quasi-Linear Complexity for nD Tree of Shapes: Achieving quasi-linear time complexity for nD tree of shapes computation is a significant practical improvement, opening doors for its use in larger and higher-dimensional datasets.
  • Simplicity of Implementation: The authors emphasize that their algorithm is simpler to write and implement compared to previous methods, which is a crucial factor for adoption in research and practice.

Key Results

The paper presents a quasi-linear time complexity algorithm for computing the tree of shapes. This complexity is achieved when the input image data has low quantization (typically 12 bits or less). The algorithm is shown to work for nD images, a significant improvement over previous 2D-specific methods. While quantitative results are not detailed in terms of specific speedups or accuracy metrics on benchmark datasets, the theoretical complexity analysis and the qualitative description of the algorithm's advantages (simplicity, generality) are the primary outcomes.

Limitations and Future Work

  • Low Quantization Assumption: The quasi-linear complexity is contingent on low data quantization. The paper acknowledges that the case of high bit-depths is not detailed.
  • "Pure" Self-Duality: The authors believe their novel representation is a step towards achieving "pure" self-duality, eliminating the need for separate dual connectivities (C2n and C3n-1) and the distinction between strict and large cuts. Future work could explore this further, potentially by replacing the maximum operator with a median operator in their interpolation equation to achieve a purely self-dual definition.
  • Broader Applications: The paper suggests that the novel representation and its continuity properties might have applications beyond just tree of shapes computation, hinting at future research directions in other areas of mathematical morphology and discrete topology.
  • Formal Proofs and Optimization: The paper mentions that formal proofs and optimized versions (e.g., using union-by-rank for guaranteed quasi-linear complexity) are omitted due to space constraints and will be presented in extended versions or related works.

Summary updated

BibTeX
@inproceedings{geraud2013quasi,
  author = {Thierry Géraud and Edwin Carlinet and Sébastien Crozet and Laurent Najman},
  title = {{A quasi-linear algorithm to compute the tree of shapes of nD images}},
  booktitle = {ISMM},
  year = {2013},
  doi = {10.1007/978-3-642-38294-9\_9},
}

Loading related content...

Figure