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.
