
192 Graphs and Images
P
T S
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
P
A
A
A
A
A
A
A
A
A
A
Figure 12.11: Illustration of Boykov–Kolmogorov max-flow algorithm.
The S-tree (red) and T-tree (green) built on a graph representing an
image. The active nodes are marked (A), passive nodes (P), and free
nodes are empty. A possible augmenting path is marked in yellow—note
that only one edge connecting the two trees creates a full path.
first stage. In the adoption stage, all orphan nodes try to find a
valid parent from their original tree. A valid parent is an active
node that has an edge connecting to the orphan node that is non-
saturated. If such a parent is found, the node is ...