Table of Contents
Fetching ...

A General Ambiguity Model for Binary Edge Images with Edge Tracing and its Implementation

Markus Hennig, Marc Leineke, Bärbel Mertsching

TL;DR

The paper addresses ambiguity in binary edge images at intersections and junctions by introducing an ambiguity framework coupled with edge tracing. It defines SPAs and MPAs, and maintains three data structures (ambiguityMap, edgeIdMap, edgeList) to form an augmented edge map, implemented via a two-pass pipeline that first labels ambiguities and then traces edges while linking them to ambiguities. Key contributions include a compact pseudocode description (under 50 lines), a C++ implementation, explicit handling of SPAs/MPAs, and modular postprocessing for contour extraction and figure-ground tasks. Empirical evaluation on BSDS500-derived data demonstrates precise, non-redundant edge decomposition with real-time performance (<2 ms) across multiple edge detectors, highlighting practical impact for segmentation, recognition, and topology analysis.

Abstract

We present a general and intuitive ambiguity model for intersections, junctions and other structures in binary edge images. The model is combined with edge tracing, where edges are ordered sequences of connected pixels. The objective is to provide a versatile preprocessing method for tasks such as figure-ground segmentation, object recognition, topological analysis, etc. By using only a small set of straightforward principles, the results are intuitive to describe. This helps to implement subsequent processing steps, such as resolving ambiguous edge connections at junctions. By using an augmented edge map, neighboring edges can be directly accessed using quick local search operations. The edge tracing uses recursion, which leads to compact programming code. We explain our algorithm using pseudocode, compare it with related methods, and show how simple modular postprocessing steps can be used to optimize the results. The complete algorithm, including all data structures, requires less than 50 lines of pseudocode. We also provide a C++ implementation of our method.

A General Ambiguity Model for Binary Edge Images with Edge Tracing and its Implementation

TL;DR

The paper addresses ambiguity in binary edge images at intersections and junctions by introducing an ambiguity framework coupled with edge tracing. It defines SPAs and MPAs, and maintains three data structures (ambiguityMap, edgeIdMap, edgeList) to form an augmented edge map, implemented via a two-pass pipeline that first labels ambiguities and then traces edges while linking them to ambiguities. Key contributions include a compact pseudocode description (under 50 lines), a C++ implementation, explicit handling of SPAs/MPAs, and modular postprocessing for contour extraction and figure-ground tasks. Empirical evaluation on BSDS500-derived data demonstrates precise, non-redundant edge decomposition with real-time performance (<2 ms) across multiple edge detectors, highlighting practical impact for segmentation, recognition, and topology analysis.

Abstract

We present a general and intuitive ambiguity model for intersections, junctions and other structures in binary edge images. The model is combined with edge tracing, where edges are ordered sequences of connected pixels. The objective is to provide a versatile preprocessing method for tasks such as figure-ground segmentation, object recognition, topological analysis, etc. By using only a small set of straightforward principles, the results are intuitive to describe. This helps to implement subsequent processing steps, such as resolving ambiguous edge connections at junctions. By using an augmented edge map, neighboring edges can be directly accessed using quick local search operations. The edge tracing uses recursion, which leads to compact programming code. We explain our algorithm using pseudocode, compare it with related methods, and show how simple modular postprocessing steps can be used to optimize the results. The complete algorithm, including all data structures, requires less than 50 lines of pseudocode. We also provide a C++ implementation of our method.
Paper Structure (20 sections, 7 figures, 4 tables)

This paper contains 20 sections, 7 figures, 4 tables.

Figures (7)

  • Figure 1: Comparison of different standard methods for processing binary edge images with ours. a Input image. b--e Results of the different methods. Different colors represent different edges. Our model provides direct access to ambiguities, registers all pixels, and avoids redundancies.
  • Figure 2: Modeling idea and central data structures of our algorithm. a Binary edge image with two ambiguities. b, c Together, the ambiguityMap and edgeIdMap form an augmented edge map. d The traced edges are stored in the edgeList. e Combined result with shared pixels and connections to ambiguities.
  • Figure 3: Building blocks of our algorithm. a Naming of the 8-neighbors of the current point. b Mechanism for identifying ambiguity points. c--e Tracing with two, one, and no unvisited neighbors, respectively.
  • Figure 4: Example results for some fundamental test cases, where different colors represent different edges. a Tracing without ambiguities. b, c Single-pixel ambiguities. d Multi-pixel ambiguities. e Complex nested cases.
  • Figure 5: Results for different examples and postprocessing steps (see text and zoom in for details). In each subfigure: Left: Initial model output. Right: Resulting edges. a Four different postprocessing strategies based on the edge length and connection to ambiguities (free, dangling, bridged). b The individual rings are separated. c The spiral segments are connected. d The bear is represented as a single, closed contour. e The cross is extracted as a single contour. f The two figures are separated despite complex ambiguities. g The path of the pen stroke followed during the signature is traced (resulting path directions indicated by arrows). h The main branches of the vessels are identified.
  • ...and 2 more figures