Robust Skeletonization Through Exact Euclidean Distance Transform and Its Application To Neuromorphometry
Robust Skeletonization Through Exact Euclidean Distance Transform and Its Application To Neuromorphometry
T
his paper presents how robust 1-pixel-wide and 8-connected skeletons can be obtained
simultaneously with exact distance transform calculation. The proposed approach is based
on the new concept of exact dilation. Two alternative algorithms for exact Euclidean
distance transform calculation allowing exact dilation are described: a simpler approach based on
the SEDR (sorted exact distance representation) data structure, which allows exact distance
transform calculation; and a more effective strategy based on border propagation. In both
techniques the distances are assigned strictly according to sequences of increasing exact distances
in the orthogonal lattice. Because of the high accuracy allowed by such procedures, progressive
dilations, high quality and accurate 1-pixel-wide and 8-connected skeletons can be obtained
corresponding to the frontiers between previously labelled distinct connected objects. Although
this method can be useful for determining generalized Dirichlet tessellations, which is also
illustrated in this article, its full potential is harnessed by previously segmenting the contours of
connected objects by removing their points corresponding to curvature peaks, which are obtained
by using an effective multi-scale curvature estimation technique. In such a way, not only high-
quality 1-pixel-wide and 8-connected skeletons are obtained for any shape, but also the whole
approach becomes considerably robust to small distortions in the object contours, thus avoiding
one of the great shortcomings in traditional skeletonization methods. The application of such
methods to an important problem in computational neuroscience and neuromorphometry,
namely the automated extraction of tapered dendrograms, is described and illustrated.
Considerations regarding distances in orthogonal lattices, typical problems in skeletonization,
and the practical implementation of the proposed techniques are also included.
# 2000 Academic Press
but also between distinct objects. The importance of the (i.e. distance zero) are included as part of the respective
distance transform as a technique for image processing skeleton, but this becomes pointless because the object
and analysis has been reflected in many applications, contour alone is already shape preserving.
including skeletonization and reconstruction [1,3–10].
Dirichlet tessellations [3,11], mathematical morphology The main skeletonization algorithms have been
[1,3], geodesic distance calculation and robot trajectory classified [9] as: thinning [26,27], wave propagation [8],
planning [3,12–14] and matching [3,15]. Although many distance transform-based, and analytical techniques. A
types of distance have been considered, the Euclidean new class of approaches based on potential fields has
distance is by far the most natural to humans and visual been described more recently in [30]. The present work
information. The restrictions to the representation of addresses the third category, i.e. distance transform-
Euclidean distances in the orthogonal lattice, as well as based skeletonization approaches. Previous develop-
the anysotropies implied by its discrete geometry, have ments in this area include [1,4,5,7–10,32–34]. The
motivated much effort toward defining alternative and pioneering work by Rosenfeld and Pfaltz [1] used city
more suitable distances [2,3,16,17]. At the same time, block distance and determined skeletons by ridge
fewer works and applications have considered the exact finding. Danielsson [6] devised a distance based skele-
Euclidean distance transform [10]. tonization technique which looks for the center of
maximal disks by using tables supplying the largest disk
The interest in skeletons has to a great extent been contained in each specific disk. The developments of
fostered by the pioneering developments by Blum [18– Arcelli and di Baja [4,5] have focused on non-Euclidean
20], who proposed this concept in 1967 as a means of distances. In Klein and Kübler [7], disks of increasing
expressing shape symmetry, while also establishing the sizes are superposed onto every object element in order
now broadly known grass-fire analogy. This interesting to simulate grass-fire propagation. A nice approach to
analogy provides a powerful conceptualization of many skeletonization, called SKIZ (skeletonization by influ-
types of skeletons as the position where the propagating ence zone) simultaneous with Euclidean distance calcu-
fire (actually any wave) fronts, initiated at the object lation has been proposed [32] and improved by using a
contours, meet. An additional reason behind the better Euclidean distance technique [33,34]. That tech-
relevance of skeletons in visual processing is provided nique propagates not only the distances, but also the
by the important role symmetry is known to play in labels respective to distinct connected objects in the
human visual perception [18–22]. In a study by Wright image, in such a way that the skeletons can be obtained
[9] skeletons have been divided into four main classes: (i) by edge detection in the final labeled image. More recent
symmetry axis transform — SAT, where the contour approaches include those advanced by Leymarie and
elements correspond to the center of all the circles Levine [8], where skeletons are obtained through the
inscribed in the shape; (ii) smoothed local symmetries — evolution of snakes taking into account distance maps;
SLS; (iii) process-inferring symmetry analysis — PISA the use of level set methods [35] the search for distance
[23]; and (iv) symmetry set [9,24]. SAT skeletons, the ridges by suing matched filters [9]; and the accurate but
type considered henceforth, correspond to the centers of relatively complex method of finding maximal disks
maximal inscribed disks within the object (or between proposed [10]. Most of these approaches exhibit very
objects), including at least two contact points. Despite high sensitivity to small distortions and detail in the
the considerable potential application of skeletons in object boundaries (see later in this paper). Attempts at
image processing and computer vision, the issue of coping with such a problem have included the simpli-
obtaining high quality contours has remained a compli- fication of contours [25].
cated and challenging one [9,25,26], even though multi-
resolution and gray-level versions of skeletonization The underlying motivation of the present paper
have also been considered in the literature [27–30]. The derives from the concept of exact dilations of spatially
following qualities are expected from a suitable skeleton: sampled frontiers. Given a digital ball (i.e. a ball of
(a) [3] centered within the shape and retains its topology; specific radius in an orthogonal lattice), only a finite set
(b) be a thin subset of the shape; and (c) allows of distinct distances to its center are permitted. By
reconstruction of the shape. While relatively trivial in sorting these distances in ascending order, it is possible
continuous spaces, such properties are often rather to perform region dilation with the maximum accuracy
difficult (in some cases impossible) to be guaranteed in allowed by the spatially sampled representation in
orthogonal lattices. Property (c), for instances, can not images, which is called exact dilation. As described in
be achieved unless the object internal countour elements this article, this concept provides the key not only to
ROBUST SKELETONIZATION 417
effective exact Euclidean distance transform calculation to distortions in the object boundaries, a problem
but also paves the way to robust and high-quality which has severely constrained the application of
skeletonization. Two algorithms are considered for traditional skeletonization algorithms. This important
distance transform: one operating by repeatedly scan- result is a direct consequence of the fact that the
ning the object internal contour, and another which collision of the frontiers (in the grass-fire sense), caused
follows the sorted distances of the elements of the by the same segmented portion of the object, is
dilated region and requires vector addition. While the completely avoided.
first algorithm is verified to be simpler and allow exact
results, the second algorithm is faster and provides the The present paper also includes the application of the
interesting property of allowing compositions of dis- developed algorithms to a relevant problem in neuro-
tance transform. The execution speed allowed by the morphometry and computational neuroscience, namely
sequential versions are reasonably high (about 15s for the derivation of tapered dendrograms. While standard
2566256 images using interpreted MATLAB — better dendrograms are extremely important in modeling the
performance should be achieved by using compiled electrochemical behavior of neural cells [37,38] and in
languages) allowing real-time applications in many synthesizing morphologically realistic artificial neural
image processing and vision problems. cells [39], the enhanced version presented in this paper
allows not only the lengths of the dendritic segments to
Since both the described algorithms for Euclidean be taken into account, but also their respective local
distance transform calculation are capable of imple- width (i.e. the width at each point along the dendritic
menting exact dilations of binary objects, they can be segment) instead of the average width traditionally used.
easily modified in order to allow the skeletons (SAT)
corresponding to the axis between distinct objects to be The basic terms used in this article are illustrated
generated simultaneously with the distance transform in Figure 1. Let B be an N6N binary image and let
calculation. As in the SKIZ method [32–34], labels are its foreground and background elements have values 0
assigned to the surrounding region as the distance and 1, respectively. The object (shape, or foreground)
transform is being computed, the respective skeletons elements, which will henceforth have value 1, are
being obtained by a special edge detection algorithm. represented in gray, and the background elements (value
However, unlike those approaches, more accurate 0) are identified in white. The process for internal border
skeletons are here obtained because of the exact dilation detection considered here consists in marking as a
procedure and a hierarchical labeling of the propagating contour element every foreground element with co-
areas. While this methodology immediately allows the ordinates (x, y) for which B(x71,y)þB(xþ1,y)þ
determination of high-quality, 1-pixel-wide and 8-con-
nected generalized Dirichlet tessellation, its potential is
only fully harnessed when the contours of connected
shapes are previously segmented (opened) at curvature
extrema. As described in Leyton [36], an interesting
relationship has been known to exist between symmetry
axes and curvatures. More specifically, Leyton has
advanced the symmetry-curvature duality theorem,
which implies that the curvature extrema correspond
to the terminations of local symmetry axes. The idea
underlying the skeletonization method proposed in the
present article reflects the symmetry-curvature theorem
in the sense that only the more robust and meaningful
skeletons (avoiding the noise implied by the image
spatial quantization), namely those induced by opening
the smoothed object contour at its curvature extrema,
are obtained. In addition, by varying the Gaussian
standard deviation, a multiscale family of skeletons
can be obtained. It is shown in this article that this
approach not only guarantees high-quality 1-pixel-wide,
8-connected skeletons, but is also substantially robust Figure 1. Illustration of the terms adopted in this article.
418 L. DA FONTOURA COSTA
coordinates, i.e. C ¼ ½ðx1 , y2 Þ; ðx2 , y2 Þ; ; ðxL , yL Þ; robust and high-quality skeletonization method pro-
producing as output the respective distance maps. posed in this article. As a matter of fact, it also has
important implications for achieving fully precise
The first algorithm resembles the approach described operations in mathematical morphology and even the
by Klein and Kübler [7], where 8-connected disks of calculation of geodesic distances.
increasing sizes are superposed into the object contours.
However, that approach considers neither the sorted We shall also consider an alternative algorithm for
distinct distance nor the exact dilation principles exact Euclidean distance calculation. This method
adopted in the present article, which proved to be differs from the above described one in the sense that
essential. The Euclidean distance transform calculation the distance assignments proceed directly by scanning
proceeds by updating an N6 N binary image D, starting the outer contour of the dilated region instead of
with all its pixels set to 0, in the following way. For each repeatedly following the list of the object inner contour
of the subsequent distance index i in the SEDR (its components, allowing optimal hit rate at the expense of
radius R should be defined by the maximum distance of some overhead corresponding to finding the smallest
interest), a total of A(i, 2) vectors are generated by distances (as explained below). Related approaches have
adding each of the respective coordinates in the linked been reported [33–35] where values are assigned as the
list pointed by A(i, 3) to each element (x, y) in the list C. object external frontier is dilated. Let us refer to the list
Every time these vectors point to a cell in D which is of current distances in the dilating external contour as S.
empty (i.e. has value 0), the value A(i, 1) is assigned to As with the first algorithm, the alternative approach
that cell. As a matter of fact, the distance index instead starts with the inner contours of the objects in the image,
of the exact distance value can be stored in order to and the distance map is constructed in D. The external
allow an integer, rather than real, array to be used. The contour elements have their distances calculated and
process stops after all the distinct distances in the SEDR stored into S, always in ascending order. At each
have been considered. At the end of such processing, the subsequent step, each of all the lattice points exhibiting
image D contains the exact Euclidean distance trans- the smallest distance value in S are updated with the
form up to the maximum considered distance R. The respective value and removed from the stored list. The
ratio between the total distance assignments (i.e. when distance between the shape contour and each of the
an empty cell is found) and the total of tested cells will eight neighboring cells of each updated cell which is still
be henceforth called hit rate. empty are computed, its value and relative coordinated
of the equidistant points matching the shape contour is
The above described incremental expansion of the assigned to the respective cell in D, and the cell
distance-assigned area while considering each subse- representation is stored in the stored list. The determi-
quent distinct distance in the SEDR will be denominated nation of the relative coordinates matching the original
exact dilation. This concept is particularly important countour can be obtained by using the SEDR and the
when interpreted from the perspective of wavefronts method for distance index determination that is
propagating from the contour, such as in the grass-fire described in the Appendix. The process continues until
analogy. The basic idea here is that the exact dilation no distance smaller than R remains in S.
allows the representation in the orthogonal lattice of all
the possible distinct wavefronts that would be obtained Of course, the important step here regards the
by strictly monotonic increasing distances (along the computation of the distances between each empty cell
normal field induced by the objects internal contours) in the external contours and the image objects. This can
even at infinitesimal displacements. In other words, be achieved by storing into each element of the image D
considering the grid-intersecting quantization of the not only the distances, but also the relative coordinates
continuous border of the dilating area, the frontiers of the object points related to that distance. This
generated by the exact dilation corresponds to the finest additional information can be incorporated at little
evolution in the orthogonal lattice of the wavefronts computational expense during the exact distance trans-
emmanating from the contours. form calculation at the moment of updating the empty
cells. Once such information is available, the distance to
This feature, which is closely related to the shape a new empty cell can be straightforwardly determined as
preserving property described earlier, provides the key that corresponding to the smallest distance obtained by
not only for effective and exact Euclidean distance vector addition of all the relative coordinates in all the
transform calculation, but also paves the way to the adjacent (8-neighborhood) non-empty cells and the
ROBUST SKELETONIZATION 421
distance from the sea cells to the empty cell. This process the fourth dilation, represented in Figure 7(m). On the
is illustrated in Figure 6 with respect to one of the other hand, the successive frontiers obtained during the
neighboring non-zero cells, where the dark gray squares exact distance transform are very special in the sense
correspond to the object, the light gray squares indicate that they represent all the frontiers which can be
cells to which their respective distance has already been obtained in the orthogonal grid by dilating the original
assigned the white squares represent empty cells, the two shape with respect to the whole succession of increasing
dashed arrows indicate the relative coordinates of the exact distinct distances. This allows the external and
two equidistant internal contour points, and the solid internal borders of the dilated shape to correspond
arrow indicates the distance between the chosen non- much more closely to its original shape, i.e. the exact
empty cell and one of the empty cells. The empty cells in distance transform provides better quality regarding the
question receives as distance the smallest vector sum of shape preserving property. Compare, for instance, the
the dashed and solid arrow (this process includes every external boundaries of the dilated areas in Figures 7(i)
neighboring non-empty neighboring cell), indicated by a and (m).
solid thin arrow in the figure. The thus obtained distance
is exact to the level of round-off noise implied by vector
addition in real precision.
Some Considerations about Skeletonization
p p
Figure
p 7.p Original
p binary image (a) and the eight first steps (b–i) in its exact dilation corresponding to the distances 1, 2, 2, 5,
2 2, 3, 10 and 13. The four first progressive distance transforms (j–m) with R = 1, starting with the image in (a). In all images
darker gray levels correspond to higher distance values (white = zero distance).
the background region between two distinct image distinct objects in the image, i.e. the obtained skeletons
objects. The method for determining the Dirichlet are of the SAT type. This can be easily verified by
tessellation takes advantage of the laveling procedure considering that the dilating regions meet each other at
discussed in the previous section and is described in the middle point along the shortest distance to each pair
detail in the following. of objects. Of course, the adopted hierarchical labeling
assumption implies that one of the centers of maximal
Firstly, the distinct regions in the binary image are disks corresponding to otherwise 2-pixel-wide skeletons
labeled by using any suitable labeling/region growing are left out.
algorithm [40,41]. Let us represent the thus obtained M
distinct labels by the set ^ ¼ fl1 , l2 , . . . , lM g. In addition Let us illustrate the above described concepts and
to the image D where the distance transform is technique through a real example. Consider the image in
calculated, an auxiliary image W with the same size is Figure 9(a), whose initial labeled regions are shown in
also kept at all times. This image W should initially Figure 9(b). The final configuration of W is shown in (c)
contain the labeled internal borders of the objects in the and the respective Dirichlet tessellation considering R =
image. Now, the exact Euclidean distance transform is 30 superposed onto the original image (in gray) is
calculated by using any of the two algorithms described presented in (D). High-quality 1-pixel-wide and 8-
for exact distance transform determination. In order to connected borders are thus obtained.
reflect the hierarchical assignments strategy described in
the previous section, the contour elements of the region
with level l1 are processed before those belonging to Towards High-Quality, Robust, and 1-Pixel-Wide
region l2 , and so on (or vice versa). This processing Skeletons
schedule can be easily achieved by storing the contour
elements respective to the labeled regions subsequently Though the skeletons obtained by the method for
into list C. Every time a cell (x, y) is updated into D, the Dirichlet tessellation discussed in the previous section
label of the respective object being processed is also correspond to the tessellation among the distinct
stored at the same coordinates (x, y) in W. At the end of connected objects in the image, the excellent features
the distance transform calculation, image W will contain of the obtained skeletonization can indeed be extended
the influence areas of each distinct object in the image, and generalized to single binary objects in the image.
identified in terms of the original labels. Because of the Indeed, such a segmentation allows not only high-
adopted processing order, as well as the exact dilation quality contours (1-pixel-wide, 8-connected, good con-
and the single-point assumptions (i.e. the second tinuation), but also a high level of robustness to
strategy outlined earlier), the borders between the distortions in the object contour. Considering that one
respective influence regions result clear and with of the most problematic aspects of skeletonization is
excellent continuation. As a matter of fact, these precisely a high level of sensitivity to such distortions,
properties allow the Dirichlet tessellation to be imme- the technique proposed herein represents an especially
diately obtained which is characterized by 1-pixel-wide, relevant alternative to effective skeletonization. The key
8-connected, contours. This final processing step, here for such an important property relies on the fact that the
called special edge detection, is presented in terms of the previous segmentation of the object contours effectively
following pseudo-code: prevent skeletons to arise within each labeled region. In
order to take advantage of such important properties
For each labeled region identified by li , starting with l1 : allowed by the above strategy, it is essential to use an
effective technique for contour segmentation. This
Consider a Dirichlet border element every foreground article adopts the multiscale curvature-based technique
cell with coordinates (x, y) for which ðWðx ÿ 1, yÞ ¼
6 described in [42–44], which calculates the first and
Wðx,yÞÞ or ðWðx ÿ 1, yÞ 6¼ Wðx, yÞÞ or ðWðx ÿ 1, yÞ ¼ 6 second derivates needed for curvature calculation in
Wðx, yÞÞ or ðWðx ÿ 1, yÞ ¼6 Wðx,yÞÞ; terms of the Fourier transform of the shape internal
contours represented parametrically, as indicated in Eqn
Assign label li to every pixel Wðx, yÞ whose value is (1). Here k(t) is the parametrized point curvature; = and
larger or equal to li . =71 stand for the Fourier transform and its inverse; sðtÞ
is the complex Peano representation of the object
The so obtained Dirichlet frontiers correspond to the internal contour; g ðtÞ is the Gaussian with standard
center of the maximal circles inscribed between any two deviation , * stands for complex conjugate; and Imfg
424 L. DA FONTOURA COSTA
Figure 9. Illustration of Dirichlet tessellation by exact dilations: (a) original binary image; (b) labeled image; (c) labeled images
after label spreading by the exact Euclidean distance transform; and (d) Dirichlet tessellation with R = 30 superposed onto the
original image.
means imaginary part. This technique is particularly than about 10% of maximum curvature in contour.
effective, demanding OðLlogLÞ basic operations (L is the Actually, this parameter can vary — see Cesar and
number of contour elements) and allowing multiscale Costa [42] for a discussion on the application of
behavior controlled by . For L ¼ 800, the curvature this methodology. The standard deviation of the
estimation takes about 0.3s in MATLAB. Gaussian has been set to 2. Once the positive curvature
Once the contour curvature is calculated, higher points have been identified, they are removed from
positive values (actually, this sign depends on the way the contour to be labeled and processed by the distance
in which the contour is pursued — it is henceforth transform.
adopted counter-clockwise sense) indicate vertices (con-
vex) of the original contour. Such curvature extremes The SAT concept assumes that the maximal inscribed
are identified by taking the first derivative of the disks are tangent to the object on at least two of its
curvature and selecting the points with value higher points. However, it is argued here that, by originating
ROBUST SKELETONIZATION 425
Applications to Neuromorphometry
transmission cable model, the function of each neuron is approach), each process is approximate as a series of
specified by the extensions and widths of the neural cylinders with fixed width. The data structure represent-
processes [37,38]. Actually, each process is understood ing such connected cylinders is called a dendrogram [45–
as a passive or active transmission line whose para- 47]. While in neuroscience dendrograms have tradition-
meters are determined by the above mentioned shape ally been derived by hand, the first and only automated
properties of the respective cells. The evolution of the approach (as far as we know) for dendrogram genera-
electrical signal in such cables is modeled in terms of tion was described in Costa et al. [48], where the
partial differential equations having the its parameters dendrogram is extracted by using curvature-based
determined by the extension and width of the neural identification of branch points and extremities in the
processes. As traditionally done (the compartmental dendritic arborization (represented by its internal
Figure 11. Illustration of the process of determining tapered dendrograms for electrical neural simulation: (a) the original binary
representation of the neuron; (b) segmented and labeled internal contours; (c) the distance transform of the contours of the shape
in (a); (d) dilated regions obtained by using exact dilations; (e) the internal and external skeletons; and (f) the isolated internal
skeleton, separated from the external skeleton by performing a logical ‘‘and’’ between the original binary shape and the skeletons
in (e) and weighted by the distance transform of the contour of the shape in (a).
ROBUST SKELETONIZATION 427
Figure 13. Reconstruction of the neuron in Figure 11(a) from its respective skeleton before (a) and after (b) filling.
Figure 14. The processes (italics) and data involved in the The effectiveness of the first proposed approach to
proposed skeletonization approach. exact distance transform calculation is a direct
ROBUST SKELETONIZATION 429
consequence of its respective hit rate. The higher this The potential of the proposed techniques has been
number, the better the performance. It has experimen- illustrated with respect to an important application in
tally verified that the hit rate, which is a function of the neuromorphometry and computational neuroscience,
shape of the object internal contour and R (worse for namely the determination of tapered dendrograms
higher values), can be as low as 1/80. Yet, sequential capable of representing not only the extension of the
implementations of this approach in MATLAB 5.1 on dendritic (an eventually axonal) segments, but also their
an IBM-PC Pentium II (300 MHz, 256 Mbytes RAM) respective local width. Such neural representations have
have allowed reasonably good execution speeds. The enormous potential for allowing not only the synthesis
average total execution item for binary images such as in of morphologically more realistic neural cells, but also
Figure 11(a) has been verified to be about 15 s. Contra- for paving the way for more complete and detailed
riwise, the second alternative to distance transform differential electrophysilogical models.
calculation allows optimal hit rate, and took about 1s to
execute. Undergoing related developments to be reported
when the opportunity arise include the extension of
the techniques to 3-D shapes, use of other monotonic
distances, propagation of labels assigned to each
contour element, calculation of geodesic distances, as
Concluding Remarks well as other applications in neuromorphometry and
computational neuroscience.
The important concepts of sorted distinct distances,
represented by the proposed SEDR data structure, and
exact dilations, as well as the hierarchical labeling of the Acknowledgment
contours, have provided the key to the interesting
features achieved for the proposed methods for distance Luciano da Fontoura Costa is grateful to FAPESP
transform and skeletonization. Two algorithms for exact (Proc. #96/05497-3) and CNPq (Proc. #30142/92-3) for
Euclidean distance transform have been presented and financial help.
illustrated which allow sequential execution speed
compatible with many applications in image processing
and vision. Considerations about the performance of References
these algorithms in terms of the required data structures
and allowed execution speeds have also been included. 1. Rosenfeld, A. & Pfaltz, J. L. (1996) Sequential operations
The second algorithm allows faster execution times. By in digital picture processing. Journal of the Association for
being capable of implementing exact dilation, both these Computing Machinery, 13(4): 471–494.
algorithms can be slightly modified in order to allow 2. Borgefors, G. (1986) Distance transformations in digital
images. Computer Vision, Graphics, and Image Processing,
simultaneous determination of high-quality SAT skele- 34: 344–371.
tons between distinct labeled regions of the image. This 3. Borgefors, G. (1994) Applications using distance trans-
possibility was applied first for determining Dirichlet forms. In: Aspects of Visual form Processing (C. Arcelli,
tessellations between distinct connected objects in L. P. Cordella and G. S. di Baja, Eds.), 84–108, World
binary images and then extended and generalized to Scientific.
4. Arcelli, C. & Baja, G. S. (1994) Ridge points in Euclidean
single objects in binary images and then extended and distance maps. Pattern Recognition Letters, 13:
generalized to single objects by performing previous 237–243.
contour segmentation (namely opening the contour at 5. di Baja, G. S. (1994) Well-shaped, stable, and reversible
its peaks of curvature). The adopted multiscale method skeletons from the (3, 4)-distance transform. Journal of
for curvature estimation has proven to be decisive in Visual Communication and Image Representation, 5:
107– 115.
achieving proper identification of the critical points for 6. Danielsson, P. E. (1980) Euclidean distance mapping.
opening the contours. The proposed skeletonization Computer Vision, Graphics, and Image Understanding, 14:
methodology has allowed high-quality, 1-pixel-wide and 227– 248.
8-connected skeletons which are also fully robust to 7. Klein, F. & Kübler, O. (1987) Eucliden distance transfor-
discrepancies in the contours of the labeled regions. In mations and model-guided image interpretation. Pattern
Recognition Letters, 5: 19–29.
addition, the proposed methodology can be straightfor- 8. Leymarie, F. & Levine, M. D. (1992) Simulating the
wardly applied to gray-scale images by using the slicing grassfire transform using an active contour model. IEEE
strategy [28]. PAMI, 14: 56–75.
430 L. DA FONTOURA COSTA
9. Wright, M. W. (1995) The extended Euclidean distance 28. Gauch, J. M. (1993) Multiresolution image shape descrip-
transform, PhD Thesis, University of Cambridge. tion. Springer-Verlag.
(Available at http://svrwww.eng.cam.ac.uk/reports/peo- 29. Pizer, S. M. Oliver, W. R. & Bloomberg, S. H.
ple/mwww.html). (1987) Hierarchical shape description via the multiresolu-
10. Ge, Y. & Fitzpatrick, J. M. (1996) On the generation of tion symmetric axis transform. IEEE PAMI, 9 (4):
skeletons from discrete Euclidean distance maps. IEEE 505–511.
PAMI, 18(11): 1055–1066. 30. Dill, A. R. Levine, M. D. & Noble, P. B. (1987) Multiple
11. Arcelli, C. & di Baja, G. S. (1986) Computing Voronoi resolution skeletons, IEEE PAMI, 9(4): 495–504.
diagrams in digital pictures. Pattern Recognition Letters, 4: 31. Ahuja, N. & Chuang, J.-H. (1997) Shape representation
383–389. using a generalized potential field model. IEEE PAMI 19:
12. Piper, J. & Granum, E. (1987) Computing distance 169–175.
transformations in convex and non-convex domains. 32. Lantuéjoul, C. (1980) Skeletonization in quantitative
Pattern Recognition, 20: 599–615. metallography, In Issues of Digital Image Processing. R.
13. Chong, K. S. & Kleeman, L. (1996) ‘‘Indoor Exploration M. Haralick and J.-C. Simon Eds., Sijthoff and Noordhoff.
Using a Sonar Sensor Array: A Dual Representation 33. Cuisenaire, O. (1999) Distance Transformations:
Approach,’’ Technical Report MECSE-1996-12, Depart- Fast Algorithms and Applications to Medical Image
ment of Electrical and Computer Systems Engineering, Processing. PhD Thesis, Laboratoire de Telecommunica-
Monash University. (Available at http.//calvin.eng.mona- tions at Teledetection, Universite Catolique de Louvain,
sh.edu.au/*cks/publication.html) Belgium.
14. Chong, K. S. & Kleeman, L. (1997) ‘‘Indoor Exploration 34. Vincent, L. (1991b) Distances defined by neighborhood
Using a Sonar Sensor Array: A Dual Representation sequences. Proc. IEEE CVPR 91, Hawaii, USA, pp.
Approach’’, 1997 IEEE/RSJ International Conference on 520–525.
Intelligent Robots and Systems, Grenoble (France). 35. Sethian, J. A. (1996) Sethian. Level Set Methods. Cam-
15. Bengtsson, M. (1990) Stochastic optimization algorithms – bridge University Press.
an application to pattern matching. Pattern Recognition 36. Leyton, M. (1987) Symmetry-curvature duality. Computer
Letters, 11: 717–724. Vision, Graphics, and Image Processing, 38: 327–341.
16. Yamashita & Ibaraki (1986) Distances defined by 37. Kandel, E. R. Schwartz, J. H. & Jessel, T. M. (1991)
neighborhood sequences. Pattern Recognition, 19(3): Principles of Neural Science. Appleton & Lange.
237–246. 38. Koch, C. & Segev, I. (1998) Methods in Neuronal
17. Arcelli, C. & di Baja, G. S. (1988) Finding local maxima in Modeling. The MIT Press.
a pseudo-Euclidean distance transform. Computer Vision, 39. Coelho, e L. R. C. & Costa, da F. (1997) Morphologically
Graphics, and Image Processing, 43: 361–367. Realistic Neural Netoworks. IEEE International Confer-
18. Blum, H. (1967) A transformation for extracting new ence on Complex Computer Systems, Como, Italy,
descriptors of shape. In: Models for the Perception of 223–228.
Speech and Visual Form. (Wathen-Dunn, W. (Ed.), The 40. Schalkoff, R. J. (1989) Digital Image Processing and
MIT Press, pp. 362–380. Computer Vision. John Wiley and Sons.
19. Blum, H. (1973) Biological shape and visual science. 41. Gonzalez, R. C. & Woods, R. E. (1992) Digital Image
Journal of Theoretical Biology, 38: 205–287. Processing. Addison-Wesley.
20. Blum, H. & Nagel, R. N. (1978) Shape description using 42. Cesar Jr., R. M. & Costa, L. da F. (1995) Piecewise linear
weighted symmetric axis features. Pattern Recognition, 10: segmentation of digital contours in O(N. LogN) through a
167–180. technique based on effective digital curvature estimation.
21. di Gesu, V. & Valenti, C. (1995) The discrete symmetry Journal of Real-Time Imaging, 1: 409–417.
transform in computer vision. Technical Report DMA 011 43. Cesar Jr., R. M. & Costa, L. da F. (1996) Towards
95, University of Palermo. Available at http://hpdma2.- effective planar shape representation with multiscale
math.unipa.it/Valenti/html/dstrep.html. digital curvature analysis based on signal processing
22. di Gesu, V. Valenti, C. & Strinati, L. (1997) Local techniques. Pattern Recognition, 29(9): 1559–1569.
operators to detect regions of interest. Pattern Recognition 44. Cesar Jr., R. M. & Costa, L. da F. (1997) The application
Letters, 18: 1077–1081. and assessment of multiscale bending energy for morpho-
23. Leyton, M. (1988) A process-grammar for shape. Artificial metric characterization of neural cells. Review of Scientific
Intelligence, 34: 213–247. Instruments, 68(5): 2177–2186.
24. Giblin, P. J. & Bruce, J. W. (1992) Bruce. Curves and 45. Sholl, D. A. (1953) Scholl. Dendritic Organization in the
Singularities. Cambridge University Press. Neurons of the Visual and Motor Cortices of the Cat.
25. Attali, D. & Montanvert, A. (1997) Computing and Journal of Anatomy, 87: 387–406.
simplifying 2D and 3D continuous skeletons. Computer 46. Poznanski, R. (1992) Modeling the electrotonic structure
Vision and Image Understanding, 67: 261–273. of starburst amacrine cells in the rabbit retina: functional
26. Lam, L. Lee, S.-W. & Suen, C. Y. (1992) Thinning interpretation of dendritic morphology. Bull. Math. Biol.,
methodologies - A comprehensive survey. IEEE PAMI, 54: 905–928.
14: 869–885. 47. Velte, T. J. & Miller, R. F. (1995) Dendritic integration in
27. Abe, K., Mizutani, F., & Wang, C. (1994) Thinning of ganglion cells of the mudpuppy retina. Visual Neurosci.,
gray-scale images with combined sequential and parallel 12: 165–175.
conditions for pixel removal. IEEE Trans. Systems, Man, 48. Costa, L. da F. Cesar Jr., R. M. Coelho, R. C. & Sawaki,
and Cybernetics 24 (2): 294–299. J. T. (1998) Perspective on the analysis and synthesis of
ROBUST SKELETONIZATION 431
morphologically realistic neural networks. In: Modeling in Firstly, the smallest distance dmin between any
the Neurosciences: From Ionic Channels to Neural adjacent distances in the sequence of exact Euclidean
Networks (R. R. Poznanski, Ed.), Harwood Academic distinct distances is determined (e.g. by checking all
Publishers.
49. Arcelli, C. & Serino, L. (1997) From discs to parts of subsequent distances in the SEDR). This smallest
visual form. Image and Vision Computing, 15: 1–10. distance determines the size of the look-up table, which
50. Borgefors, G. & Nyström, I (1997) Nyström. Efficient will be vector T with dimension R=dmin . It should be
shape representation by minimizing the set of centres of observed that although only a fraction of this vector is
macimal discs/spheres, Pattern Recognition Letters. 18: actually used, this does not generally pose serious
465– 472.
51. Costa, L. da F. & Velte, T. (1999) Automatic character- computational problems since the size of this vector is
ization and classification of ganglion cells from the small compared with the other data structures involved
salamander retina. Journal of Comparative Neurology, in the distance transform and skeletonization. Anyway,
404 (1): 33–51. more effective allocation schemes such as hashing can
52. Xia, Y. (1989) Skeletonization via the realization of the always be used in critical applications. Having allocated
fire front’s propagation and extinction in digital binary
shapes. IEEE PAMI, 11 (10): 1076–1086. the vector T, the SEDR is completely scanned and for
each distance index id the integer indexing value
i ¼ roundfSEDRðid , 1Þ=dmin is calculated, and to the
Appendix cell of T indexed by i is assigned the value id , i.e.
TðiÞ ¼ id . Once the look-up table T is so constructed,
Determining distance indexes from the respective distance given a distance d, belonging to the set of all possible
distinct distances represented with real precision, the
An interesting and practical problem involving exact respective distance index is supplied by T{round(d/
distance concerns how to obtain the distance index for a dmin)}. This strategy has been verified to work even for
specific distance value represented in real precision. the vector additions implied by the second technique for
Basically, there are at least the following two alter- exact Euclidean distance transform calculation. The
natives for addressing such a problem: (i) to interpolate noise margin allowed by this look-up table is dmin =2,
a function over the matrix (distance)6(distance index); which has been verified to be fully sufficient in all the
and (ii) to use a look-up table. the second alternative is considered practical applications.
described in the appendix.