
Image Topology 339
(a) (b)
FIGURE 11.28: Examples of Guo-Hall skeletonization
Skeletonization Using the Distance Transform
The distance transform can be used to provide the skeleton of a region R. We apply
the distance transform, using mask 1, to the image negative, just as we did for the circle
previously. Then the skeleton consists of those pixels (i, j) for which
d(i, j) ≥ max{d(i −1, j), d(i + 1, j), d(i, j − 1), d(i, j + 1)}.
For example, suppose we take a small region consisting of a single rectangle, and find the
distance transf orm of its negative:
MATLAB/Octave
>> c = zeros(7,9); c(2:6,2:8)=1;
>> mask = [Inf 1 Inf;1 0 Inf;Inf Inf Inf];
>> cd=disttrans(1-c,mask1) ...