0% found this document useful (0 votes)
57 views17 pages

Robust Skeletonization Through Exact Euclidean Distance Transform and Its Application To Neuromorphometry

This paper presents new algorithms for calculating the exact Euclidean distance transform and obtaining 1-pixel-wide skeletons simultaneously. The algorithms are based on exact dilation which allows assigning distances strictly according to sequences of increasing exact distances. This leads to robust skeletons that are insensitive to small distortions in object boundaries, avoiding a major limitation of traditional methods. Applications to neuromorphometry are also discussed.

Uploaded by

diwocix634
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views17 pages

Robust Skeletonization Through Exact Euclidean Distance Transform and Its Application To Neuromorphometry

This paper presents new algorithms for calculating the exact Euclidean distance transform and obtaining 1-pixel-wide skeletons simultaneously. The algorithms are based on exact dilation which allows assigning distances strictly according to sequences of increasing exact distances. This leads to robust skeletons that are insensitive to small distortions in object boundaries, avoiding a major limitation of traditional methods. Applications to neuromorphometry are also discussed.

Uploaded by

diwocix634
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Real-Time Imaging 6, 415–431 (2000)

doi:10.1006/rtim.1999.0177, available online at http://www.idealibrary.com on

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

Luciano da Fontoura Costa


Cybernetic Vision Research Group,
IFSC, USP, Caixa Postal 369,
São Carlos, SP, 13560-970, Brazil
E-mail: [email protected]

Introduction each pixel in the image background the respective


shortest distance to the contours of the objects, the
Distance transforms and skeletons have received special distance transform [1–3] provides a useful expanded
attention over the last decades as promising alternatives image representation which takes into account not only
for shape representation and analysis. By assigning to the proximity and symmetries intrinsic to each object,

1077-2014/00/120415+17 $30.00/0 # 2000 Academic Press


416 L. DA FONTOURA COSTA

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

B(x,y71)þB(x,yþ1)54. External border detection is


performed by applying the above described method to
the complement of the image. In Figure 1, the object
external contour is identified by ‘‘6’’ and the internal
contour by ‘‘þ’’. Both the internal and external contours
are 8-connected. An internal point is defined as any
foreground element not belonging to the object internal
contour. Any foreground element which has one or two
neighbours will be called a 1-pixel-wide element. In
Figure 1, the internal points correspond to the gray cells
without a ‘‘þ’’. The two right-most and left-most cells
are 1-pixel-wide elements.

Some Considerations about Exact Distances in


Orthogonal Grids

Let U be the orthogonal lattice having its elements


indexed by vectors (x, y), where x and y are integers. It is
possible to assign to every lattice element a real number Figure 2. All the Euclidean distances in a 767 square
corresponding to its distance to the lattice origin (0,0). centered at the lattice origin and the distance ball of radius 3
(shaded).
Although the results in this article can be immediately
extended to any type of distance, we can be readily observed that the number of equidistant
shall henceforth be constrained to the Euclidean points (symmetries) tends to increase with the distance.
distance,
q ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffias distE fðx1 , y1 Þ; ðx2 , y2 Þg ¼
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffirepresented At the same time, the difference between subsequent
ðx1 ÿ x2 Þ2 þ ðy1 ÿ y2 Þ2 . The digital ball of finite radius distinct distances tends to get smaller.
R (R is an integer value) is defined as the set of elements
of U such as distfðx, yÞ; ð0, 0Þg  R. The distance The distance transform of a binary image in a
digital ball of radius R corresponds to the representation continuous space is accurately defined as the process
of the distances within the digital ball of radius R. that assigns to each of the infinite points in the Cartesian
Figure 2 presents all the Euclidean distances within the space the minimal distance from this point to the objects
767 square centered at the lattice as well as the
distances in the digital ball of radius 3, represented by
the shaded region. The number of distinct distances
in a distance digital ball of radius R, henceforth
represented as NR , is plotted in terms of R (up to
R ¼ 30) in Figure 3. The plot also includes the total
number of distinct distances which is relatively small
when compared with the total number of cells (about
only 10%), which indicates a high degree of distance
symmetries and allows the distinct distances to be
treated individually as done in the present paper.

It is clear from Figure 2 that the number NðdÞ of


lattice points exhibiting the same exact distance d to the
origin varies in terms of d. However, because of
symmetries in the orthogonal grid, this number is
always an integer power of 4. Forpinstance, the number
of lattice points having distance 5 is 8 (see Figure 2). Figure 3. The number NR of distinct distences in a digital ball
Figure 4 shows the number of equidistant points in (dots) and the total number of cells in the respective digital ball
terms of their respective distinct distances for R=30. It (circles) in terms of the radius R.
ROBUST SKELETONIZATION 419

Figure 4. Number N(d) of points in the digital ball of radius


R presenting the same distance d to the center.

in the image. For a single convex object and assuming


Euclidean distance (the type of distance considered
henceforth), it can be readily verified that the (infinite)
set of points with a specific distance d reproduces the
outline of the orginal shape at a larger scale. This Figure 5. The general structure of an SEDR.
inherent and important feature of the continuous
distance transform will be referred to as shape preserving Given a digital ball of radius R, its respective
property. The distance transform of binary shapes in sorted exact distance representation — SEDR — is
spatially quantized spaces is defined in exactly the same defined as being the data structure containing: (a) the
way, except that many (actually an infinite number) of sorted distinct distances; (b) the number of equidistant
the infinite distances in continuous spaces will not be (with respect to the lattice origin) elements for each
represented p — for instance, distances in the whole respective distinct distance; and (c) the coordinates of
interval (1, 2) will not be found on the lattice. For those equidistant elements relative to the lattice origin.
the same reason, the shape preserving property does not The word ‘‘exact’’ in SEDR stands for the fact that
perfectly hold for Euclidean distance transforms in every distance is stored with real accuracy and not
sampled spaces, where only approximations of the outer merged into intervals in order to achieve connected
boundaries of the shape can be obtained in terms of the circles or disks, as done in other studies [7,10]. Although
contours of the region defined by those points of the many alternative data structures could be used to
lattice with distances smaller or equal to a specific represent an SEDR (see Implementation and Perfor-
distance value. mance), we shall consider here an NR  3 array A such
as its element A(i, 1) contains the ith distinct distance in
The Sorted Exact Distance Representation — ascending order (observe that i is the distance index);
SEDR A(i, 2) contains the number of elements relative to the
ball center. Figure 5 illustrates the general structure of
When the NR distinct distances within a digital ball of an SEDR.
radius R are sorted in ascending order, the respective
position (starting from 0) of each distance in the list will
be called distance index. For example, the sorted Two Algorithms for Exact Euclidean Distance
distances and respective distance indexes for the digital Transform Determination
ball in Figure 2 is:
p p p Both algorithms described in this section accept as input
Sorted distinct distances : 0 1 2 2 5 2 2 3
the internal contour of the binary objects in the image;
Distance indexes : 0 1 2 3 4 5 6 represented in terms of a list (in any order) of their
420 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

Figure 7 illustrates the eight first steps (b–1) in the


exact dilation of the simple object in (a) as well as the for One of the main difficulties (if not the main one) in
first stages (j–m) in progressive distance transforms determining 1-pixel-wide skeletons is illustrated in
considering a digital ball or radius 1 (i.e. a cross). It is Figure 8. While it is easy to define the point that is
clear from this example that growing the frontier in equidistant to the points c and d in Figure 8(a), which is
terms of exact dilations is much more precise than represented by shading, a rather complex situation arises
successive distance transforms with a fixed-size digital in (b).
ball. As a matter of fact, the dilations with the cross is so
coarse that the interior of the shape is filled up soon at The two following solutions can be considered for
dealing with this problem: (i) to assign as middle point
both cells x and y; and (ii) give priority to one of the
pixels c or d and assign as the skeleton element the point
which is closer to the pixel with higher priority. For
example, if d is prioritized, only y would be assigned as
skeleton. While alternative (i) represents a more
balanced representation, alternative (ii) allows the
important advantage that a single point is obtained.
These results are immediately extensible to 2D binary
shapes, the second strategy guaranteeing 1-pixel-wide
skeletons. The current article adopts the above alter-
native (ii). In 2D images, the hierarchy of separate
object internal contours can be easily accomplished by
using any standard labeling algorithm [40,41].

Another important observation regards the proces-


sing of binary objects containing 1-pixel-wide elements.
Although such portions could be understood as
skeletons of null width (which would imply the whole
internal contour of the skeleton to be considered as part
of the skeleton), we shall henceforth assume that the
Figure 6. Vector addition of distances as a means of binary objects in the original image have no 1-pixel-wide
determining the distance to an empty cell. &=object;
&=cells with distance assigned; &=empty cells; ;" relative element. Elements not satisfying this condition can
coordinates of internal contour points; ? distance between easily be made suitable by dilating these objects using
non-empty cell and empty cell. the 363 cross as the structuring element.
422 L. DA FONTOURA COSTA

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).

Obtaining High-Quality, 1-Pixel-Wide Dirichlet


Tessellations

Once the connected objects in the image have been


labeled, the respective generalized Dirichlet tessellation
can be immediately obtained at minimal additional
computational cost from any of the above two methods
for calculating the exact Euclidean distance map.
The underlying idea is simple and effective, consisting
of assigning as Dirichlet limiting contours all the
points where propagating distance-assigned regions
relative to two distinct objects collide. As a matter of
Figure 8. Two situations encountered in skeletonization. fact, Dirichlet frontiers correspond to the skeletons of
ROBUST SKELETONIZATION 423

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

ÿImf=ÿ1 f=fg ðtÞg:=fsðtÞg:ðj2 f Þg:=ÿ1 f½=fg ðtÞg:=fsðtÞg:ðÿ42 f 2 ފ gg


k ðtÞ ¼ ð1Þ
k ð=ÿ1 f=fg ðtÞg:=fsðtÞg:ðj2 f ÞgÞ k3

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

the in the conceptualization of the SAT in continuous


spaces, this criterion has been the main source of
complication in skeletonization. The problem arises
because it is virtually impossible to define tangent points
when shapes are represented in orthogonal lattices, for
parametrized versions of the object contours are not
even continuous, and thus not differentiable. Moreover,
digital straight lines which are tangent to a digital circle
often present two common points at the interface. In
practice, it becomes virtually impossible to identify
distinct tangent points in digital images. Strictly speak-
ing, every pair of subsequent points in a digital contour
is a potential candidate to define a maximal circle. The
skeletonization method advanced in the present article
avoids such complications simply by previously seg-
menting the object contour at its curvature extrema and
identifying as skeleton elements all the points where the
dilating frontiers meet, which can be immediately done
while computing the exact Euclidean distance trans-
form. Because these points still correspond to the center
of maximal disks (except for the fact that the
hierarchical labeling described earlier implies that some
of these centers will be skipped in order to achieve 1-
pixel-wide skeletons), there is not need to check for
tangents or any related concept.

Figure 10 illustrates the robustness of the proposed


approach to skeletonization achieved by segmenting and
labeling the shape contours. The original binary object is
show in (a), and a result which is typical of traditional
skeletonization is presented in (b). It is clear that the
small distortion in the contour of the shape propagates
towards the central axis, which is caused by the collision
of the dilating waves generated at the vicinity of the
distortion. The binary skeleton obtained by the method
described in this article, which is much more robust, is
presented in (c) superposed to a filtered version of the
original object.

Applications to Neuromorphometry

The techniques for exact Euclidean distance transform


and skeletonization proposed in this article are useful in
a wide range of situations in image processing and
vision. This section illustrates the application of those
techniques in neuromorphometry, namely the quantiza- Figure 10. Illustration of the robustness of the proposed
tion of shape properties of neural cells and structures. skeletonization: (a) original binary shape; (b) result typically
obtained by using traditional skeletonization methods; and (c)
binary skeletons obtained by the technique presented in this
Neural cells are characterized by a number of article.
prolongations (called processes) corresponding to the
dendrites and the axon. From the perspective of the
426 L. DA FONTOURA COSTA

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

contour) and subsequent merge by using a formal


grammar approach. That approach, however, uses
formal grammar methods which are not completely
objective and demands additional processing for deter-
mining the width of the dendritic segments and
skeletons. This section shows how the skeletonization
methodology developed in the present paper can be
effectively applied to determine a better representation
of the neural processes in terms of tapered dendrograms
(including also the width of each of the points along the
dendritic segments), from which more complete models Figure 12. The tapered dendrogram respective to the neural
of neural activity can be obtained. Such improved shape in Figure 11(a). While the hierarchical structure of the
dendrograms are also extremely important for the dendritic arborization is represented by the tree structure, the
respective width of the segments is indicated by the width of
derivation of statistical description of shapes to be used each vertical segment.
in the synthesis of artificial neural cells [39,48]. Although
we shall be restricted to 2-dimensional neural cells, it
should be observed that many biological neurons, such between the original and reconstructed object are caused
as ganglion and Purkinje cells, are characterized by by the two following reasons: (i) the skeleton has not
planar organization of the dendritic arborization. included the contour elements (i.e. zero distance); and
(ii) the hierarchical assignment strategy described in
The methodology will be illustrated for the neuron in Section 7 may imply a displacement of one pixel for the
Figure 11(a). The respective labeled segmented (parti- skeletons which would otherwise have non-unitary
tioned by curvature) contours are shown in (b). It width.
should be observed that the two shorter extremities
(upper and right portion of the cell) have been
deliberately disconsidered in order to illustrate the
possibility of selecting the skeleton branches (this has Implementation and Performance
been done by re-joining the contour segments at the
respective high curvature points). The distance trans- This section includes some considerations about the
form is shown in (c) and the exact dilation of the implementation and performance of the proposed
contour portions are shown in (d). The obtained internal techniques for exact Euclidean distance transform
and external skeletons are shown in (e), and the isolated calculation. Special attention is paid to characterizing
internal skeleton, obtained by a logical ‘‘and’’ between the described techniques in terms of their execution
the original shape and the skeletons in (e) and graded by speed and required data structures.
the distance transform of the original shape contour is
presented in (f). The respectively obtained tapered The block diagram in Figure 14 illustrates the
dendrogram, obtained through a simple recursive principal operations and data involved in the proposed
tracking of the skeleton (which is facilitated by the fact skeletonization method. Virtually every process in-
that the skeleton segments are one-pixel-wide) is shown volved is simple and suitable for sequential or parallel
in Figure 12. execution. At each successive stage (except the distance
transform), only two images are needed: the previous
It is also observed that the obtained skeleton can be one and another containing the respective results (i.e.
used to recover a reasonable reconstruction of the operations such as binary edge detection are not
original shape. This can be straightforwardly achieved possible to be executed ‘‘in-place’’ by using only one
by updating into an initially empty image all its points image). Even the distance transform extended for
covered by the relative coordinates of the SEDR skeletonization requires only two images, because it
indexed by the distance value of each skeleton element. receives as input the elements of the list C. Conse-
Figure 13 presents the reconstruction of the object in quently, the data structures needed during the whole
Figure 11(a) obtained by this procedure. the small holes process includes only two images, the list C, and
inside the image can be easily filled up by standard the SEDR. As a matter of fact, the image used to store
morphological techniques, as illustrated in Figure 13(b). the distance maps does not need to have real precision,
It should also be observed that the small differences since the distance index instead of the exact distances
428 L. DA FONTOURA COSTA

Figure 13. Reconstruction of the neuron in Figure 11(a) from its respective skeleton before (a) and after (b) filling.

can be stored (there is a one-to-one relationship between


each exact distance and the distance index). Also, in
cases where only the skeletons are needed, the image
D and respective computation can be completely
skipped.

There is an interesting possibility regarding the


storage of the SEDR. As observed earlier, the number
of relative coordinates with respect to each distinct
distance is always a multiple of 4. This can be
immediately used for implementing the SEDR in a
standard array rather than an array involving a linked
list for representation of the relative coordinates. the
idea is to represent the SEDR for a specific radius R in
terms of an array with dimension NR  6, such as its
element A(i, 1) contains the ith distinct distance in
ascending order (observe that i is the distance index);
A(i, 2) contains the number of elements in the lattice
with that distance to the origin; and A(i, 3) to A(i, 6)
contains the respective relative coordinates of the
elements having the distance indicated in A(i, 1). The
point here is to repeat the line A(i, j) as many times as
needed to accommodate the whole set of relative
coordinates. While the fact that such subsequent cells
A(i, j) will consequently have the same value poses no
problem to the distance transform and skeletonization,
it will not be compatible with the technique for distance
index determination described in the Appendix.

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.

You might also like