  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.
