Davies: Computer Vision, 5th edition: Solutions to selected problems 9
shapes, as will be seen in the following figure. Snake shapes and spirals give similar
trouble.
· · · · · · · · · · · · · · · · · · · · · · · · · · · · ·
· · · · · · · · · 1 1 1 1 1 1 · · · · · · · · · · · · · ·
· · · 5 5 5 5 5 5 5 5 5 5 5 5 · · · · · · · · · · · · · ·
· · · 5 5 5 5 5 5 5 5 5 5 5 · · · · · · · · · · · · · · ·
· · · · 5 5 5 5 5 5 5 5 · · · · · · · 6 6 6 6 6 6 · · · ·
· · · · · · · · · · · · · · · · · · 6 6 6 6 6 6 6 6 · · ·
· · · · · · · · · · · · · · · · · 6 6 6 6 6 6 6 6 6 6 · ·
· · · · · · · · · · · · · · · · · 6 6 6 6 6 6 6 6 6 6 · ·
· · · 7 7 7 7 7 7 7 · · · · · · · 6 6 6 6 6 6 6 6 6 6 · ·
· · 7 7 7 7 7 7 7 7 · · · · · · · 6 6 6 6 6 6 6 6 6 6 · ·
(b) The solution is to accept the labels that are obtained by a single simple-minded
labelling scan, but to record all label adjacencies in a table; then to analyse the table,
noting all labels that are equivalent to each other, give the minimum (or maximum) value
to each such set; then relabel the objects.
We can also take it that the table must have diagonal entries, so we set up the table
(the one below is a minimal representation of a U, a W and an I) in the following way:
1 1 0 0 0 0