Skeleton finding
Skeleton finding is the same as ridge
finding in the sense of finding the
centerline. The difference is,
skeletonization usually find the
centerline in an object described by
its boundary points, while ridge
finding seeks the centerline in an
volume. However skeletonization can
be done by finding ridges in the
distance map.
D = bwdist(BW) computes the Euclidean distance transform of the binary image BW. For each pixel in BW, the distance transform assigns a number that is the distance between that pixel and the nearest nonzero pixel of BW. bwdist uses the Euclidean distance metric by default. BW can have any dimension. D is the same size as BW.
Here is how CITY-BLOCK distance is calculated by bwDist.
NOTE: You might want to replace the circshift-call with a loop. Here's why.
GoodLUCK!!
CVS @ 2600Hertz