Table of Contents
Fetching ...

Topology-Preserving Downsampling of Binary Images

Chia-Chia Chen, Chi-Han Peng

TL;DR

This work tackles the problem of downsampling binary images without altering their topology, defined by $Betti_0$ and $Betti_1$ of the black regions. It proposes a discrete optimization framework that encodes downsampling choices as Boolean variables subject to hard topology constraints derived from a boundary-corner formulation, ensuring the resulting image has the same region adjacency graph (RAG) as the input. A four-fold constraint set—coverage, non-emptiness, local neighborhood correctness, and boundary preservation—combined with a score-based objective yields topology-preserving downsampling with competitive pixel-wise similarity, and the solver can detect infeasible cases. The method is demonstrated on medical segmentation masks and auxiliary binary operations, enabling significant speedups for persistent homology and shortest-path computations while preserving topological fidelity; a baseline dilation method provides a topo-guaranteed reference but with worse similarity. The work offers practical impact for medical visualization and fast topology-aware processing in computer vision and graphics, and provides open-source code for broader adoption.

Abstract

We present a novel discrete optimization-based approach to generate downsampled versions of binary images that are guaranteed to have the same topology as the original, measured by the zeroth and first Betti numbers of the black regions, while having good similarity to the original image as measured by IoU and Dice scores. To our best knowledge, all existing binary image downsampling methods do not have such topology-preserving guarantees. We also implemented a baseline morphological operation (dilation)-based approach that always generates topologically correct results. However, we found the similarity scores to be much worse. We demonstrate several applications of our approach. First, generating smaller versions of medical image segmentation masks for easier human inspection. Second, improving the efficiency of binary image operations, including persistent homology computation and shortest path computation, by substituting the original images with smaller ones. In particular, the latter is a novel application that is made feasible only by the full topology-preservation guarantee of our method.

Topology-Preserving Downsampling of Binary Images

TL;DR

This work tackles the problem of downsampling binary images without altering their topology, defined by and of the black regions. It proposes a discrete optimization framework that encodes downsampling choices as Boolean variables subject to hard topology constraints derived from a boundary-corner formulation, ensuring the resulting image has the same region adjacency graph (RAG) as the input. A four-fold constraint set—coverage, non-emptiness, local neighborhood correctness, and boundary preservation—combined with a score-based objective yields topology-preserving downsampling with competitive pixel-wise similarity, and the solver can detect infeasible cases. The method is demonstrated on medical segmentation masks and auxiliary binary operations, enabling significant speedups for persistent homology and shortest-path computations while preserving topological fidelity; a baseline dilation method provides a topo-guaranteed reference but with worse similarity. The work offers practical impact for medical visualization and fast topology-aware processing in computer vision and graphics, and provides open-source code for broader adoption.

Abstract

We present a novel discrete optimization-based approach to generate downsampled versions of binary images that are guaranteed to have the same topology as the original, measured by the zeroth and first Betti numbers of the black regions, while having good similarity to the original image as measured by IoU and Dice scores. To our best knowledge, all existing binary image downsampling methods do not have such topology-preserving guarantees. We also implemented a baseline morphological operation (dilation)-based approach that always generates topologically correct results. However, we found the similarity scores to be much worse. We demonstrate several applications of our approach. First, generating smaller versions of medical image segmentation masks for easier human inspection. Second, improving the efficiency of binary image operations, including persistent homology computation and shortest path computation, by substituting the original images with smaller ones. In particular, the latter is a novel application that is made feasible only by the full topology-preservation guarantee of our method.
Paper Structure (23 sections, 1 theorem, 10 equations, 17 figures, 6 tables)

This paper contains 23 sections, 1 theorem, 10 equations, 17 figures, 6 tables.

Key Result

lemma thmcounterlemma

Faces of the opposite of all the half-edges in a boundary all belong to the same component.

Figures (17)

  • Figure 1: Downsampling a binary image of two connected components by a factor of 2 (i.e., turning each 2x2 block of pixels into a downsampled pixel). Bicubic filtering-and-thresholding (by OpenCV), average pooling (when tie choose foreground color), and the adaptive crossing number (ACN)-based method decenciere2007adaptive, all generate results with different topology. We show the ACNs in each original pixel. Our method finds a topologically correct result. A non-trivial pixel-color decision is marked in red.
  • Figure 2: (a) A binary image without any topologically correct downsampling solutions. (b) Three black regions with different Betti numbers (from left to right: (1,0), (2,1), (3,2)). However, their Euler characteristics all equal to 1. This can be verified by their numbers of vertices, edges, and faces: (32,52,21), (32,48,17), and (32,46,15). This is expected because Euler characteristic equals the number of connected components minus the number of holes for 2D graphs (jain1995machine).
  • Figure 3: Left: An input binary image of 3 black components (orange, blue, and green) and 4 white components (white, grey, goose-yellow, and light green). Middle: Its region adjacency graph (RAG). Right: a topologically correct downsampled solution with the same RAG. We draw the outer and inner boundaries of black components in red and purples, respectively. Observe that a black components' outer boundary can self-intersect. For inner boundaries, one cannot intersect itself but different ones can intersect with each other. We also show the type-index and distance of each corner on the first component's outer boundary. The corner with the "last" flag on is asterisked.
  • Figure 4: The 12 possible corner configurations and their type-indices. Each has one incoming half-edge and one outgoing half-edge, one or two left hand-side (LHS) big-pixels (black), and one or two right hand-side (RHS) big-pixels (white) defined. Each configuration has a "pointing-to" position defined, e.g., for the 0-th it is on the top.
  • Figure 5: We downsample a binary image of one black component and one white component by factor 4 in width and height. For the upper-left big-pixel of the black component, it's score value is 16, which is contributed by the four numbered black pixels with scores 6, 6, 3, and 1, respectively. To see this, the $4$-th pixel's window is shown in red. It overlaps with the big-pixel at one pixel, therefore contributing 1 to the big-pixel's score.
  • ...and 12 more figures

Theorems & Definitions (4)

  • definition thmcounterdefinition
  • lemma thmcounterlemma
  • proof
  • proof