Jordan-Segmentatable Mask in Digital Segmentation
- The paper introduces a topology-aware criterion using the digital Jordan Curve Theorem to ensure a binary mask splits an image into exactly two connected regions.
- It presents an O(N) algorithm leveraging BFS/DFS and Euler characteristic computations to verify Betti numbers, ensuring a single 4-connected boundary curve.
- The approach is unsupervised and critical for applications like medical imaging, where preserving global shape and detecting subtle topological defects are essential.
A Jordan-segmentatable mask is a binary image segmentation mask whose structure guarantees a rigorous topological separation of the digital image domain into exactly two connected components—interior (foreground) and exterior (background)—as mandated by the discrete analogue of the Jordan Curve Theorem. This definition provides a topology-aware, mathematically rigorous criterion for evaluating whether a predicted segmentation partition preserves global shape and connectivity, addressing critical limitations of traditional metrics that are insensitive to subtle but topologically significant defects such as leaks, holes, or fragmentation. The Jordan-segmentatability property is certified by the existence of a simple closed digital curve—specifically, a simple 4-connected curve with exactly one connected component and one loop (Betti numbers , )—whose presence ensures that the mask separates the image into two 8-connected regions. This framework is unsupervised, requires no ground truth, and is rooted in digital topology and simplicial homology theory (Benedictis et al., 15 Jan 2026).
1. Motivational Context and Deficiencies of Standard Metrics
Widely used segmentation evaluation metrics—including pixel-wise (IoU, Dice), region-based, and boundary-focused measures—fail to capture the global topological structure of predicted masks. Small imperfections along boundaries or within object regions may negligibly affect these metrics while fundamentally disrupting the correct separation between interior and exterior regions. Classical metrics treat all pixel misclassifications equivalently, regardless of their structural impact. For example, a mask with boundary "leaks" may have high IoU yet lose the essential partition between object and background; similarly, fragmented segmentations that split a single object into multiple disconnected maps may lure traditional metrics into high scores. Jordan-segmentatable masks resolve these issues by imposing a discrete Jordan Curve Theorem constraint, thus providing a topology-aware, unsupervised certification of segmentation quality. The approach is especially pertinent in domains where topological preservation is paramount, such as medical imaging and precise object delineation (Benedictis et al., 15 Jan 2026).
2. Digital Topology and Homological Preliminaries
2.1. Adjacency and Connectivity
Let denote the pixel grid. For , the 4-neighbors are and ; the 8-neighbors additionally include the diagonal pixels . A set is 4-connected if any pair of pixels in can be joined by a sequence of 4-adjacent pixels within ; 8-connectedness is defined analogously.
2.2. Digital Curves and the Jordan Curve Theorem
A simple -curve () is a subset that is -connected, every has exactly two -neighbors in , and for (or for ). The digital Jordan Curve Theorem (Theorem 2.1) asserts that if is a simple 4-curve of at least 8 points, then its complement splits into exactly two 8-connected components—interpreted as interior and exterior—such that every point of is 8-adjacent to both components. The converse (Theorem 2.2) states that if separates the grid into exactly two 8-connected components and every touches both, then is a simple 4-curve (Benedictis et al., 15 Jan 2026).
2.3. Homology and Betti Numbers
Endowing the adjacency graph with a simplicial-complex structure, let denote the -th simplicial homology group and the -th Betti number. Under 4-adjacency, a simple digital curve satisfies (one connected component) and (one loop). The complement , under 8-adjacency, has , reflecting the interior/exterior dichotomy.
3. Formal Definition and Extraction of a Jordan-Segmentatable Mask
Given a grayscale image and its binary segmentation , the foreground mask is . The process for extracting the candidate boundary curve is:
- Define (foreground points adjacent to background).
- Form .
- Set ; targets a "thickened" foreground-background boundary.
A binary mask is Jordan-segmentatable if its extracted satisfies either:
- (A) Betti numbers under 4-adjacency: , ;
- (B) Complement under 8-adjacency: .
These are equivalent by digital topology theorems (Benedictis et al., 15 Jan 2026).
4. Algorithmic Verification
The paper provides an (linear in image size) algorithm for certifying Jordan-segmentatability:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
Input: binary mask M on grid I
Output: True iff M is Jordan‐segmentatable
1. Zero-pad M to avoid boundary degeneracies.
2. (Optional) Morphological clean-up:
for each pixel p in I:
if M[p]=1 and (# of 8-neighbors with M=0)>7 then M[p]=0
if M[p]=0 and (# of 8-neighbors with M=1)>6 then M[p]=1
3. Build P = {p∈M : ∃8-neighbor q with M[q]=0}
4. Let U = (I \ M) ∪ P
5. Build S = {p∈U∩M : ∃8-neighbor q∉U}
If |S|<8 return False
6. Compute connected components and loops on S under 4-adjacency:
• Run BFS/DFS or Union-Find for 4-adjacency to get β₀_S.
• Compute β₁_S by Euler characteristic: χ=V−E ⇒ β₁=E−V+β₀.
If not (β₀_S=1 and β₁_S=1) return False
7. Compute connected components on I \ S under 8-adjacency ⇒ β₀_compl.
If β₀_compl≠2 return False
8. Return True |
All steps, including BFS/DFS, union-find, and edge counting, admit complexity.
5. Illustrative Case Studies
Several segmentation scenarios analyzed via the above procedure demonstrate the range of topological validity:
| Scenario | Boundary Topology | Segmentatable? |
|---|---|---|
| Single simply-connected blob | , ; (complement) | Yes |
| Multiple disconnected blobs | merges into one 4-connected curve; , | Yes |
| Fragmented, holed object | Boundary extraction links breaks; , | Yes |
| Annular (donut) shape | Outer and inner boundaries; homology , | Yes |
| U-shape with disconnected holes | No |
In all positive scenarios, the extracted boundary curve forms a single simple 4-curve whose complement admits exactly two 8-connected components, as required. Cases with additional holes or insufficiently connected boundaries fail the Betti number or complement connectedness criteria, and thus are not Jordan-segmentatable (Benedictis et al., 15 Jan 2026).
6. Foundational Theorems and Mathematical Guarantees
The Digital Jordan Curve Theorem (Theorem A) establishes that a simple 4-connected digital curve of at least 8 points partitions the grid into exactly two 8-connected components and each boundary pixel is adjacent to both. The converse (Theorem B) proves that if a set separates the grid into precisely two such components and every boundary pixel touches both, the set forms a simple 4-curve.
This characterization is equivalent to the satisfaction of the Betti number conditions under 4-adjacency for and for its complement under 8-adjacency, providing both an algebraic and combinatorial perspective on topological soundness in digital segmentation (Benedictis et al., 15 Jan 2026). The homological approach, grounded in simplicial theory, further ensures that these criteria are strictly necessary and sufficient for topology-aware certification, independent of mask pixel accuracy or overlap metrics.
7. Implications, Scope, and Applications
Jordan-segmentatable masks provide an unsupervised, topology-aware certificate of segmentation, crucially supplementing or replacing classical metrics in applications demanding preservation of global structure. The approach is particularly impactful in medical image analysis and other safety-critical domains where topological defects are unacceptable regardless of pixel-level accuracy. The algorithm is simple and efficient, leveraging classical BFS/DFS techniques and Euler characteristic-based Betti number calculations, thus making it suitable for routine deployment in robust segmentation pipelines. A plausible implication is the extension of this framework to multi-object or multiclass segmentation, provided the extraction and analysis of multiple non-intersecting boundary curves are handled explicitly. The precise linkage between digital topology, homological invariants, and practical segmentation assessment marks a significant advance in rigorous, implementation-ready evaluation protocols (Benedictis et al., 15 Jan 2026).