K3M: A Universal Algorithm For Image Skeletonization and A Review of Thinning Techniques
K3M: A Universal Algorithm For Image Skeletonization and A Review of Thinning Techniques
K3M: A Universal Algorithm For Image Skeletonization and A Review of Thinning Techniques
2, 317–335
DOI: 10.2478/v10006-010-0024-4
∗
Faculty of Physics and Applied Computer Science
AGH University of Science and Technology, Al. Mickiewicza 30, 30–059 Cracow, Poland
e-mail: [email protected]
∗∗
Faculty of Computer Science
Białystok Technical University, ul. Wiejska 45 A, 15–351 Białystok, Poland
e-mail: {m.tabedzki,m.adamski}@pb.edu.pl
∗∗∗
Faculty of Mathematics and Informatics
University of Białystok, ul. M. Skłodowskiej-Curie 14, 15–097 Białystok, Poland
e-mail: [email protected]
This paper aims at three aspects closely related to each other: first, it presents the state of the art in the area of thinning
methodologies, by giving descriptions of general ideas of the most significant algorithms with a comparison between
them. Secondly, it proposes a new thinning algorithm that presents interesting properties in terms of processing quality
and algorithm clarity, enriched with examples. Thirdly, the work considers parallelization issues for intrinsically sequential
algorithms of thinning. The main advantage of the suggested algorithm is its universality, which makes it useful and versatile
for a variety of applications.
Keywords: skeletonization, thinning, digital image processing, parallelization, iteration, thinning methodologies, sequen-
tial thinning, parallel thinning.
$
%&
(%
)%
•
•
•
•
•
•
•
!
"
Fig. 1. Thinning algorithms taxonomy using two criteria: processing and methodology.
have been made to the whole criterion. The method sugge- This survey is mainly based on algorithms mostly
sted by the authors is universal and simple. It consists of known to the authors, available either as papers in inter-
several fast and easy-to-implement deleting phases. The national conference proceedings, periodical and journal
obtained experimental results have also shown a success- transactions or book chapters. The central role in the su-
ful application of the method in image pre-processing as rvey was played by Pavlidis (1982a), Lam et al. (1992),
well as image preparation for feature extraction and clas- Malina et al. (2002) and, finally, Klette and Rosenfeld
sification. The method proved its universality—not only (2004). This is in addition to lots of individual works sho-
does it work for printed words, but it has also shown a wing different methods and algorithms of thinning.
remarkable success rate on thinning handwritten scripts, Generally, each of the presented algorithms has its
signatures, numbers, characters of non-Latin-based alpha- own advantages and disadvantages, and each has its appli-
bets (Arabic, Japanese) and even biometric images such cations where it performs better than others. Therefore, it
as faces or fingerprints. The paper is organized as follows. is often difficult to directly compare the results.
Section 2 presents the state of the art in the following or-
der: the proposed taxonomy of thinning algorithms, a de-
scription of general ideas of the most significant ones and 2.1. Taxonomy. All thinning algorithms can be clas-
a short comparison in terms of efficiency. Section 3 pre- sified as either iterative or non-iterative. In iterative me-
sents the thinning algorithm proposed by the authors in thods, thinning algorithms produce a skeleton by exami-
detail. Section 4 presents the results of the K3M algorithm ning and deleting contour pixels through an iterative pro-
and the comparison with other algorithms. Section 5 de- cess in either sequential or parallel way.
scribes the concepts for the parallelization of intrinsically Parallel algorithms may also be further classified ac-
sequential thinning algorithms. Finally, Section 6 conclu- cording to their performance, i.e., in 4-, 2-, or 1-subcycle
des the work and shows perspectives for future develop- manners. The latter (1-subcycle parallel algorithms) ha-
ment. ve always received more considerable attention in the re-
search area of parallel thinning as they have reduced the
computation time in a number of iterations, and that is
2. State of the art
why they are sometimes called one-pass or fully parallel
The survey presented in this section introduces a historical algorithms (Chen and Hsu, 1989b; Chen, 1996; Guo and
review covering over 40 years of works on thinning algo- Hall, 1992).
rithms, together with their basic principles and the state of In sequential thinning algorithms, contour points are
the art. examined for deletion in a predetermined order, and this
can be accomplished by either raster scanning or follo- proach, in which he defined the ‘crossing number’—the
wing the image by contour pixels. In parallel thinning al- number of times one crosses over from a white point to
gorithms, pixels are examined for deletion on the basis of a black point when the eight neighbours of a tested pixel
results obtained only from the previous iteration. That is are traversed in sequence. The image is scanned from left
why parallel thinning algorithms are suitable for imple- to right and from top to bottom, and pixels are marked
mentation in parallel processors. for deletion under additional conditions to prevent ero-
Non-iterative (non-pixel based) thinning algorithms sion, maintain connectivity and preserve two-pixel wide
produce a certain median or centre line of the pattern to lines. This method was also used with gray-scale images.
be thinned directly in one pass, without examining all the Rosenfeld (1975) showed many new aspects and so-
individual pixels. lved serious problems commonly met in thinning algori-
The methods used in the works presented in this sec- thms. He was the first to evaluate the necessary and suf-
tion may also be categorized as one of the following me- ficient conditions for preserving topology while deleting
thodologies (Fig. 1). border points in parallel process. Thereby, he solved the
problem of erosion in the thinning of diagonal lines. In his
2.2. General ideas and examples. In this section a de- algorithms, he considered a 3×3 local neighbourhood. He
tailed description of most of the basic algorithms of thin- proved that ‘a border pixel is removed only if its neighbo-
ning is presented in order to show how others attack the urhood has only one black component (i.e., the Hilditch
problem of skeletonization. Some of them are explained crossing number is 1) and has at least two black neighbo-
in detail in (Saeed, 2004). urs.’
Rutovitz (1966) proposed a parallel algorithm that Arcelli’s parallel behaviour algorithm (Arcelli and
formed a basis for many thinning algorithms. Image pixels di Baja, 1978) uses two 3 × 3 thinning windows toge-
are examined for deletion in an iterative process (not divi- ther with their 90◦ rotations as masks for pixel deletion.
ded into subcycles). Contour pixels with at least two black It removes pixels from eight borders in the following or-
neighbours, and where all its neighbours are 4-connected der: north-west, west, and so forth. However, it does not
(sticking together with its edge), are marked for deletion. remove all deletable pixels.
This may result in excessive erosion, it does not reduce Dyer and Rosenfeld (1979) introduced the algorithm
diagonal lines to a unit pixel width and the skeleton is not for thinning gray-scale pictures. It is based on a generali-
located centrally (due to the asymmetric nature of its con- zed concept of pixel connectivity: two pixels are “connec-
ditions). ted” if there is a path joining them with no pixel lighter
Blum (1967) presented skeletonization as transfor- than either of them. Using this idea, the thinned version
mation for the aim of shape description. He called this on an image can be obtained by changing each pixel gray
transformation MAT—Medial Axis Transformation. Figu- level to the minimum of its neighbor’s gray levels.
re 2 shows examples of obtaining skeletons from some Pavlidis (1980; 1981; 1982a; 1982b) introduced the
objects by this method. definition of “multiple pixels” for the first time—points
that are traversed more than once during contour tracing,
points with no neighbours in the interior and points on
two-pixel-wide lines. If only the “multiple pixels” from
every tracing are retained, the result may not be a connec-
ted skeleton. Therefore, “multiple pixels” are called ske-
letal, as well as eight neighbours of skeletal pixels from
a previous iteration. This does not result in a one-pixel-
wide skeleton. Contour pixels are traced sequentially.
Then, Pavlidis (1982a) proposed a combination of
parallel and sequential operations—a pattern could be di-
vided into fields, which are processed independently by
parallel processors, each operating sequentially on its own
segment.
Arcelli’s algorithm (Arcelli, 1981) is of a sequential
type. It uses contour tracing to find the pixels for deletion.
This approach allows reducing the computational time ne-
eded to obtain the skeleton. Contour analysis is performed
Fig. 2. Illustration of the result of thinning shapes by Blum’s to find regions to be represented by the skeleton branches.
algorithm. The method of Arcelli and di Baja (1981) is also a se-
quential algorithm—successive iterations consider the re-
Hilditch (1968; 1969) worked out a sequential ap- moval of contour elements. Regions that can be regarded
as significant protrusions are detected before applying the geometric features of the image (see Fig. 3(b)).
removal operations. In (Arcelli and di Baja, 1987), the au- Chen and Hsu worked out an interesting algorithm
thors used the Pavlidis concept of ‘multiple pixels’ (pixels modifying it through a series of papers (1989b; 1989a;
are placed where the contour self-interacts). The paper gi- 1990; 1988). Chen (1996) reached a 1-subcycle parallel
ves a necessary definition to satisfactorily detect such pi- thinning algorithm producing a one-pixel-wide skeleton
xels. Then Arcelli and di Baja (1989) developed a sequ- that preserves significant geometric features of patterns
ential algorithm that used a 4-distance transform to find (Fig. 3(c)). He developed a method embedded in a pa-
a set of skeletal pixels (two-pixel wide, at most) within rallel algorithm (Chen and Hsu, 1989b) to produce bias-
one raster scan of the image. Then, another inspection of reduced skeletons using, as a major factor, what he defined
the picture removes the unnecessary pixels. the HDP—Hidden Deletable Pixel detected by algorithms
The algorithm of Favre and Keller (1983) covers one- of vector analysis. The HDP is detected and removed, so
subcycle parallel thinning using syntactic rules and a ca- that the bias skeleton can be reduced. Despite the satis-
scade of tables to determine a new pixel code, on the factory results of thinning, Chen’s algorithm did not show
basis of the distance to the background. Two-scan post- any significant application to object-images, handwritten
processing is applied to obtain the final skeleton. words or at least machine-written alphabets of a cursive
Ammann and Sartori-Angus (1985) proposed a fast character. The results of thinning curved parts of machine-
thinning algorithm where the image is compressed to a re- written English letters, for example, are not as good as
duced gray-scale representation. This is then thresholded those of straight lines. This is demonstrated by the thin-
(with connectivity constraints) to a binary image to which ning results of this algorithm in Fig. 3(c).
an existing thinning algorithm (Arcelli and di Baja, 1981)
was applied. The resulting skeleton is then expanded to its
original scale.
Chin et al. (1987) wrote a paper presenting a one-
subcycle thinning algorithm and its parallel implementa-
tion. They called it a ‘one-pass algorithm’. They paid at-
tention to the idea of bias skeletons, the basic approach
used later by Chen (Chen and Hsu, 1989b; Chen, 1996) in
his modified algorithm. Bias skeletons appear in the junc-
tion of lines that form angles less than 90◦ (Fig. 3(a)).
They mentioned two reasons behind generating bias ske-
letons. One is that the restoring templates are of an even
size and hence the pixel removal process is not symme-
trical, unless we are dealing with systematic design, as re-
storing templates are only used in maintaining the connec-
tivity of the final skeleton. The other factor is due to the (a) (b) (c)
side effect of the thinning templates, that is, they remove
pixels from convex corners faster than from concave cor- Fig. 3. Thinning by CWSI (Chin et al., 1987) (a), AFP3 (Guo
ners. A sample of thinning results using this algorithm is and Hall, 1992) (b), CYS (Chen, 1996) (c).
given in Fig. 3(a).
Baruch (1988) presented a noniterative, non-pixel ba- Parker et al. (1994) introduced the force-based ap-
sed algorithm, which produces a skeleton in one pass, by proach with a new idea for thinning strategy based on a de-
line-following. The line is followed by a window of va- finition of a ‘skeletal pixel’ as being as far from the object
riable size, the skeleton is the line connecting centres of outline as possible while maintaining basic connectivity
successive windows. The method is less sensitive to noise properties. Accordingly, the basic idea is that a skeleton is
than conventional thinning algorithms. a global property of a binary object, and that the boundary
The algorithm of Guo and Hall (1989; 1992) is ano- should be used to locate the skeleton pixels. The criterion
ther example of parallel thinning. The contour pixels are is summarized as follows: the background pixels which
examined for deletion in an iterative process. The decision are adjacent to the boundary act as if they exerted a for-
is based on a 3 × 3 neighbourhood. Each iteration is di- ce; the skeletal pixels lie in areas having the ridges of this
vided into two subcycles—one deleting the north and east force field and are located by searching where directions
pixels and the other for south and west. This algorithm do- of the force vectors change significantly. Figure 4 shows
es not give a one-pixel-wide skeleton. Although it shows how to compute the force at a pixel location and the vector
very good results in thinning and provides a rather good sum of forces.
skeleton, the algorithm and its 1-subcycle modified ver- Zhang and Wang (1996) created the 2-Subiteration
sion (Guo and Hall, 1992) do not preserve all significant Parallel-Thinning Algorithm with Templates—PTA2T.
1
1
2
‘Invisible’ pixels
3
Object pixels
(a) (b)
Fig. 6. Altuwaijri’s thinning of images with added noise com-
Fig. 4. Force-based thinning: computing the force acting at a gi- pared with thinning by Zhang’s algorithm.
ven pixel (a), vector sum of forces (b).
Fig. 7. Redundant loops may transform the script Seen into ano-
(a) (b) (c) ther one—Ssad.
Fig. 5. Thinning results of the image in (a) using Guo and Hall Andreadis et al. (2000) proposed a method for obta-
(b) and Zhang (c) methods. Empty rectangles indicate ining a skeleton from a color image using morphological
the places of the removed pixels operations on vectors defined in the HSV color space. In
the presented method the extraction of a skeleton is pre-
The Altuwaijri algorithm—ART2 NN (Altuwaijri and ceded by the ordering of vectors based on their individual
Bayoumi, 1998) is a data-image-clustering based thinning components (hue, saturation and value).
algorithm that employs neural networks and adaptive reso- KMM (Saeed and Niedzielski, 1999; Saeed, 2001;
nance theory for image clustering. The image is an Arabic Saeed et al., 2001) is the authors’ original contribution
character (Altuwaijri and Bayoumi, 1998). Altuwaijri cla- based on an original approach described in (Saeed and
ims the algorithm produces skeletons which are superior Niedzielski, 1999) and modified in a series of works
to the outputs of the conventional algorithms. He com- (Saeed, 2001; Saeed et al., 2001). The algorithms acro-
pared it (Fig. 6) with Zhang’s algorithm given in (Zhang nym comes from the initials of the authors: Khalid, Marek
and Wang, 1996). ART2 showed higher data-reduction ef- and Mariusz. Basically, the algorithm is a sequential itera-
ficiency and much simpler skeletons with less noise spurs tive one. It produces a one-pixel-wide continuous skeleton
and reduced time complexity. from an image. The details of the thinning algorithm are
The main advantage of this method, however, is its given in (Saeed et al., 2001). The main goal of the algori-
ability to remove the redundant loops appearing in the fi- thm was
nal thinned shape in many thinning algorithms. This pro- 1. to obtain a continuous line of symmetry (the name
blem may not seem particularly important for the prese- given by Blum to the skeleton (Blum, 1967)), and
rvation of essential geometric features in most alphabe-
tical scripts. However, in Arabic and many other cursive 2. to thin all kinds of images to their skeleton—digits,
alphabet letters, signatures, pictures and medical 4 × 3 windows. In order to reduce the loss of informa-
images in their two-dimensional views. tion when thinning shapes like in Fig. 9(a), the authors
introduce a parameter R,
The ideal skeleton was not the aim of the criterion. In
fact, there is no algorithm that yields an ideal skeleton in A(s1 )
R= , (1)
any case. The most important thing is usually the retaining A(s2 )
of pixels that preserve the significant geometric features
of the given pattern in all kinds of images. Figure 8 shows where A(s) is the area of s pixels, s1 is the image skeleton,
KMM thinning results when applied to the same figures s2 is the image contour.
given in (Malina et al., 2002) and shown earlier in Fig. 2. Based on its value, the algorithm returns either a thin-
Notice that the two circles differ from each other by one ned image (Fig. 9(b)) or its contour (Fig. 9(c)). If R is less
pixel-length in their diameters. The circle of a diameter
with an even number of pixels is thinned to a dot, while
that of a diameter with an odd number of pixels is thinned
to an angular shape. Note also that a rectangle is thinned
to a line and seems to be more appropriate than Blum’s
skeleton (Blum, 1967).
(a) (b) (c)
KMM was under continuous modification. Its latest
version for universal use will be given in Section 3 as Fig. 9. Image (a), its thinned shape (b) and its contour (c).
K3M—Khalid, Marek, Mariusz, Marcin.
than the threshold, the image contour is retained. The thre-
shold value used by the authors was 0.4.
Ji and Feng (2004) created a method that interprets
the image as a 2D thermal conductor that consists of pi-
xels, where pixel intensity represents the temperature. Pi-
xels with a higher intensity value have higher temperature,
while the background pixels have the lowest temperature.
The thinning task is considered as an inverse process of
heat conduction. The thinning process follows the inverse
of the temperature flow, from cooler (background pixels)
to warmer areas (object pixels with higher intensity), as in
Fig. 10.
(c) (d)
(a) (b)
Iterative part overview • Decision: If any modification was made during the
current iteration, return to Phase 0.
• Phase 0: Mark borders for examination.
• Phase 1: Delete the borders that have 3 neighbours Thinning to a one-pixel width skeleton. This phase
sticking each other. aims at producing skeletons consisting of pixels with only
two neighbours unless located at a junction. This is a si-
• Phase 2: Delete the borders that have 3 or 4 neighbo- gnificant advantage of a one-pixel width skeleton as it po-
urs sticking each other. tentially allows producing structural graphs of the exami-
ned image.
• Phase 3: Delete the borders that have 3, 4 or 5 neigh- The essential property of each pixel, which is used
bours sticking each other. for quick determination of its neighbourhood configura-
tion, is the neighbour weight. It is an 8-bit number, where
• Phase 4: Delete the borders that have 3, 4, 5 or 6
subsequent bit values correspond to neighbours, starting
neighbours sticking each other.
from the pixel above and going clockwise. It is calculated
• Phase 5: Delete the borders that have 3, 4, 5, 6 or 7 with the use of the neighbourhood bit values matrix (3),
neighbours sticking each other. as in (2), where w(x, y) is the neighbour weight of pixel
(x, y) and img(x, y) is the binary value of the image pixel
• Phase 6: Unmark the remaining borders. at coordinates (x, y).
!
"
#
$%
%
Fig. 17. K3M algorithm simplified flowchart.
3.3. Neighbourhood lookup arrays. In this section • A3 : lookup array for Phase 3—deleting pixels having
some specific neighbourhood lookup arrays are given. 3, 4 or 5 sticking neighbours,
143, 159, 191, 192, 193, 195, 199, 207, 223, 224,
225, 227, 231, 239, 240, 241, 243, 247, 248, 249,
251, 252, 253, 254},
• A1 = {7, 14, 28, 56, 112, 131, 193, 224},
• A2 = {7, 14, 15, 28, 30, 56, 60, 112, 120, 131, 135,
193, 195, 224, 225, 240},
• A3 = {7, 14, 15, 28, 30, 31, 56, 60, 62, 112, 120,
124, 131, 135, 143, 193, 195, 199, 224, 225, 227,
240, 241, 248},
• A4 = {7, 14, 15, 28, 30, 31, 56, 60, 62, 63, 112, 120,
124, 126, 131, 135, 143, 159, 193, 195, 199, 207,
224, 225, 227, 231, 240, 241, 243, 248, 249, 252},
• A5 = {7, 14, 15, 28, 30, 31, 56, 60, 62, 63, 112, 120,
124, 126, 131, 135, 143, 159, 191, 193, 195, 199,
207, 224, 225, 227, 231, 239, 240, 241, 243, 248,
249, 251, 252, 254},
• A1pix = {3, 6, 7, 12, 14, 15, 24, 28, 30, 31, 48, 56,
60, 62, 63, 96, 112, 120, 124, 126, 127, 129, 131,
135, 143, 159, 191, 192, 193, 195, 199, 207, 223,
224, 225, 227, 231, 239, 240, 241, 243, 247, 248,
249, 251, 252, 253, 254}.
3.4. Modifications to KMM. K3M may be seen as
an evolved KMM algorithm as both of them are based
on iterative sequential thinning. K3M is more systematic.
KMM, however, was essentially based on a single lookup
array while K3M uses many of them in an understandable
pattern. Therefore, K3M involves more iterative phases,
namely, six, in comparison with KMM, which contains
only four. The main motivation to develop a new K3M
algorithm comes from the fact that the previous attempt
(KMM) was to develop a more systematic approach to
image thinning. As was verified by experiments, the re-
sults are subjectively better so the attempt has proved its
success rate.
Fig. 19. Flowchart of Phase i (i ∈ {1, 2, 3, 4, 5}) deleting pi- 4. K3M results and comparison
xels. In this section the most interesting thinning results of the
K3M algorithm are presented and discussed. We will the-
• A4 : lookup array for Phase 4—deleting pixels having refore test the algorithm on a variety of inputs—isolated
3, 4, 5 or 6 sticking neighbours, letters, handwritten words and, finally, graphics and sym-
bols, regarding skeleton continuity, shape preservation
• A5 : lookup array for Phase 5—deleting pixels having and a 1-pixel-wide skeleton. The goal is to verify if the
3, 4, 5, 6 or 7 sticking neighbours, performance complies with the expectations.
• A1pix : lookup array used for thinning to a one-pixel
width skeleton. 4.1. Isolated letters. As can be observed in Fig. 20,
K3M preserves the letter shapes. For numerous applica-
tions it is especially important and essential to maintain
Components of neighbourhood lookup arrays
the original connectivity of the script lines as well as the
• A0 = {3, 6, 7, 12, 14, 15, 24, 28, 30, 31, 48, 56, 60, straight angles. K3M does an excellent job here, as can be
62, 63, 96, 112, 120, 124, 126, 127, 129, 131, 135, seen in the letter ‘B’, for example.
(a) (b)
As seen in Fig. 21, the overall shapes of the examined 4.5. Advantages and drawbacks of K3M. K3M has
words are well preserved. However, for possibly closed- the following feasible advantages:
Table 2. Results of thinning by Guo and Hall’s, Zhang’s, A-W, KMM and K3M algorithms.
Image
Method
K3M
1. The algorithm preserves right angles at the lines in- Despite the fact that these drawbacks do not affect
terconnections, which result in better correspondence the shape preservation, the authors are currently working
between the original and the modified image. on reducing the algorithm complexity and computational
power requirements. The new results will be the matter of
2. It produces a one-pixel-wide skeleton.
a future publication after proving their validity.
3. The iterative phases are clearly aimed at deleting pi-
xels in a specific neighbourhood, therefore a general
5. Parallelizing sequential algorithms
idea of this thinning method is easily found.
Non-one-pass iterative thinning algorithms (sequential al-
4. The universality of the algorithm allows wide and di-
gorithms with one or more subcycles) are not intrinsical-
versified applications.
ly suitable for parallel processing. Therefore, they tend to
Although the K3M algorithm has successfully pro- have difficulties with successful utilisation of modern pa-
ved its universal performance over many other algorithms, rallel data processing techniques like multi-core proces-
it is intrinsically iterative in nature, and hence it requires sors or processor grids (hardware or network implemen-
more computing power than other, non-iterative algori- ted). With the growing of the usage and popularity of pa-
thms. Moreover, each iteration contains seven sequential rallel processing hardware and its techniques, it is basic
phases. This increases the computational complexity and to develop solutions that would allow such algorithms to
makes the parallelization attempts difficult. profit from the use of multi-processors.
In Fig. 24 one can see scanline-type sequential pro- dependence is non-existent or irrelevant. This is not
cessing, where rows are processed sequentially. For each always possible.
pixel, a decision is made based on the state of the neigh-
bours. • Division with overlapping regions—regular division
while providing indispensable information (informa-
tion dependence areas from the area of division) for
each parallel processor.
Fig. 25. Dependence area growth due to information dependen-
ce.
gorithm. That would result in lowering the computational Chen, Y.-S. and Hsu, W.-H. (1988). A modified fast parallel
effort as well as improving the parallelization possibility algorithm for thinning digital patterns, Pattern Recognition
of the algorithm. Letters 7(2): 99–106.
Chen, Y.-S. and Hsu, W.-H. (1989a). A 1-subcycle parallel thin-
Acknowledgment ning algorithm for producing perfect 8-curves and obta-
ining isotropic skeleton of an l-shape pattern, Proceedings
This work is supported by the Rector of Białystok Tech- of the International Conference on Computer Vision and
nical University (grant no. W/WI/10/07). Pattern Recognition, San Diego, CA, USA, pp. 208–215.
The authors are indebted to the anonymous referees Chen, Y.-S. and Hsu, W.-H. (1989b). A systematic approach for
for their constructive and valuable comments, and for their designing 2-subcycle and pseudo 1-subcycle parallel thin-
extremely helpful suggestions that improved the quality of ning algorithms, Pattern Recognition 22(3): 267–282.
the presented work. Chen, Y.-S. and Hsu, W.-H. (1990). A comparison of some
one-pass parallel thinnings, Pattern Recognition Letters
References 11(1): 35–41.
Ahmed, M. and Ward, R. (2002). A rotation invariant rule- Chin, R.T., Wan, H.-K., Stover, D.L. and Iverson, R. D. (1987).
based thinning algorithm for character recognition, IEEE A one-pass thinning algorithm and its parallel implemen-
Transactions on Pattern Analysis and Machine Intelligen- tation, Computer Vision, Graphics, and Image Processing
ce 24(12): 1672–1678. 40(1): 30–40.
Altuwaijri, M.M. and Bayoumi, M.A. (1998). A thinning algori- Dinnen, G. (1955). Programming pattern recognition, Proce-
thm for arabic characters using art2 neural network, IEEE edings of the Western Joint Computer Conference, Los An-
Transactions on Circuits and Systems II: Analog and Digi- geles, CA, USA, pp. 94–100.
tal Signal Processing 45(2): 260–264. Dyer, C. and Rosenfeld, A. (1979). Thinning algorithms for
Ammann, C.J. and Sartori-Angus, A.G. (1985). Fast thinning gray-scale pictures, IEEE Transactions on Pattern Analy-
algorithm for binary images, Image Vision and Computing sis and Machine Intelligence 1(1): 88–89.
3(2): 71–79. Favre, A. and Keller, H. (1983). Parallel syntactic thinning by
Andreadis, I., Vardavoulia, M., Louverdis, G. and Papamarkos, recoding of binary pictures, Computer Vision, Graphics,
N. (2000). Colour image skeletonisation, Proceedings of and Image Processing 23(1): 99–112.
the 10th European Signal Processing Conference, Tampe- Gonzalez, R.C. and Woods, R.E. (2007). Digital Image Proces-
re, Finland, Vol. 4, pp. 2389–2392. sing, 3rd Edition, Prentice Hall, Upper Saddle River, NJ.
Arcelli, C. (1981). Pattern thinning by contour tracing, Compu- Guo, Z. and Hall, R.W. (1989). Parallel thinning with two-
ter Graphics Image Processing 17(2): 130–144. subiteration algorithms, Communications of the ACM
Arcelli, C. and di Baja, G.S. (1978). On the sequential appro- 32(3): 359–373.
ach to medial line transformation, IEEE Transactions on Guo, Z. and Hall, R.W. (1992). Fast fully parallel thinning algo-
Systems, Man and Cybernetics 8(2): 139–144. rithms, CVGIP: Image Understanding 55(3): 317–328.
Arcelli, C. and di Baja, G.S. (1981). A thinning algorithm ba- Hilditch, C.J. (1968). An application of graph theory in pattern
sed on prominence detection, Pattern Recognition 13(3): recognition, Machine Intelligence 3: 325–347.
225–235. Hilditch, C.J. (1969). Linear skeletons from square cupboards,
Arcelli, C. and di Baja, G.S. (1987). A contour characterization Machine Intelligence 4: 403–420.
for multiply connected figures, Pattern Recognition Letters Huang, L., Wan, G. and Liu, C. (2003). An improved paral-
6(4): 245–249. lel thinning algorithm, ICDAR ’03: Proceedings of the Se-
Arcelli, C. and di Baja, G.S. (1989). A one-pass two-operation venth International Conference on Document Analysis and
process to detect the skeletal pixels on the 4-distance trans- Recognition, Washington, DC, USA, pp. 780–783.
form, IEEE Transactions on Pattern Analysis and Machine Jaisimha, M.Y., Haralick, R.M. and Dori, D. (1994). Quantita-
Intelligence 11(4): 411–414. tive performance evaluation of thinning algorithms under
Baruch, O. (1988). Line thinning by line following, Pattern Re- noisy conditions, Proceedings of the IEEE Conference on
cognition Letters 8(4): 271–276. Computer Vision and Pattern Recognition (CVPR), Seattle,
Blum, H. (1967). A transformation for extracting new descrip- WA, USA, pp. 678–683.
tors of shape, in W.W. Dunn (Ed.), Models for the Percep- Jang, B.K. and Chin, R.T. (1992). One-pass parallel thinning:
tion of Speech and Visual Form, MIT Press, Cambridge, Analysis, properties and quantitative evaluation, Trans-
MA, pp. 362–380. actions on Pattern Analysis and Machine Intelligence
Chen, Y.-S. (1996). The use of hidden deletable pixel detec- 14(11): 1129–1140.
tion to obtain bias-reduced skeletons in parallel thinning, Ji, X. and Feng, J. (2004). A new approach to thinning ba-
ICPR ’96: Proceedings of the 13th International Con- sed on time-reversed heat conduction model, International
ference on Pattern Recognition, Washington, DC, USA, Conference on Image Processing (ICIP), Singapore, Vol. 1,
pp. 91–95. pp. 653–656.
Ju, T., Baker, M.L. and Chiu, W. (2007). Computing a family Rockett, P. I. (2005). An improved rotation-invariant thinning
of skeletons of volumetric models for shape description, algorithm, IEEE Transactions on Pattern Analysis and Ma-
Computer-Aided Design 39(5): 352–360. chine Intelligence 27(10): 1671–1674.
Kirsch, R.A., Cahn, L., Ray, C. and Urban, G.H. (1958). Expe- Rosenfeld, A. (1975). A characterization of parallel thinning
riments in processing pictorial information with a digital algorithms, Information and Control 29(3): 286–291,
computer, IRE-ACM-AIEE ’57 (Eastern): Papers and Di- http://theory.lcs.mit.edu/
scussions Presented at the December 9-13, 1957, Eastern ~iandc/ic75.html
Joint Computer Conference: Computers with Deadlines to Rutovitz, D. (1966). Pattern recognition, Journal of Royal Stati-
Meet, New York, NY, USA, pp. 221–229. stical Society 129(4): 504–530.
Klette, R. and Rosenfeld, A. (2004). Digital Geometry: Geo- Saeed, K. (2001). Text and image processing: Non-interrupted
metric Methods for Digital Image Analysis, Morgan Kauf- skeletonization, Proceedings of the 1st International
mann, San Francisco, CA. IEEE Conference on Circuits, Systems, Comunications and
Lam, L., Lee, S.-W. and Suen, C.Y. (1992). Thinning Computers—IEEE-CSCC’01, Crete, Greece, Advances in
methodologies—A comprehensive survey, IEEE Trans- Scientific Computing, Computational Intelligence and Ap-
actions on Pattern Analysis and Machine Intelligence plications, World Scientific Engineering Society Press,
14(9): 869–885. pp. 350–354.
Lee, S.-W., Lam, L. and Suen, C. Y. (1991). Performance evalu- Saeed, K. (2004). Image Analysis for Object Recognition, Bia-
ation of skeletonizing algorithms for document image pro- łystok Technical University Press, Białystok.
cessing, Proceedings of the First International Conference Saeed, K. and Niedzielski, R. (1999). Experiments on thinning
on Document Analysis and Recognition, Saint-Malo, Fran- of cursive-style alphabets, International Conference on In-
ce, pp. 260–271. formation Technologies for Education, Science and Busi-
Malina, W., Ablemeyko, S. and Pawlak, W. (2002). Funda- ness ITESB’99, Minsk, Belarus, pp. 45–49.
mentals of Digital Image Processing, Akademicka Oficyna Saeed, K., Rybnik, M. and Tabedzki, M. (2001). Implementation
Wydawnicza EXIT, Warsaw, (in Polish). and advanced results on the non-interrupted skeletoniza-
Mallat, S. (1989). A theory for multiresolution signal decompo- tion algorithm, in W. Skarbek (Ed.) Computer Analysis of
sition: The wavelet representation, IEEE Transactions on Images and Patterns, Lecture Notes in Computer Science,
Pattern Analysis and Machine Intelligence 11(7): 674–693. Vol. 2124, Springer-Verlag, Heidelberg, pp. 601–609.
Parker, J., Jennings, C. and Molaro, D. (1994). A force-based Wan, Y., Yao, L., Xu, B. and Zeng, P. (2008). A distance map
thinning strategy with sub-pixel precision, Vision Interface based skeletonization algorithm and its application in fiber
Conference, Banff, Alberta, Canada. recognition, International Conference on Audio, Language
Pavlidis, T. (1980). A thinning algorithm for discrete binary and Image Processing, Shanghai, China, pp. 1769–1774.
images, Computer Graphics Image Processing 13(2): 142– You, X. and Tang, Y. Y. (2007). Wavelet-based approach to cha-
157. racter skeleton, IEEE Transactions on Image Processing
Pavlidis, T. (1981). A flexible parallel thinning algorithm, Proce- 16(5): 1220–1231.
edings of the International Conference on Pattern Recogni- Zhang, Y. Y. and Wang, P. P. (1996). A parallel thinning algo-
tion and Image Processing, Dallas, TX, USA, pp. 162–167. rithm with two-subiteration that generates one-pixel-wide
Pavlidis, T. (1982a). Algorithms for Graphics and Image Proces- skeletons, International Conference on Pattern Recogni-
sing, Springer, Computer Science Press, Rockville, MD. tion, Vienna, Austria, Vol. 4, pp. 457–461.
Marek Tab˛edzki received his M.Sc. degree in param N - number of sticking neighbours needed
computer science from Białystok Technical Uni-
versity (Poland) in 2001. He is presently with {classic 1-stage}
the same university, at the Faculty of Computer
Science. His research interests include informa- mark image pixels as 1
tion processing systems, particularly digital ima- mark background pixels as 0
ge processing and pattern recognition. repeat
thinned = true
for each pixel in image
if pixel = 1 then
if (pixel.N mod 2 = 0) or
(pixel.S mod 2 = 0) or
Mariusz Rybnik received his M.Sc. degree in (pixel.W mod 2 = 0) or
computer science from Białystok Technical Uni- (pixel.E mod 2 = 0) then
versity (Poland) in 2001, and the Ph.D. degree pixel := 3
in engineering in biology and medicine from the end if
University of Paris XII—Val de Marne (France) end if
in 2004. He is currently an assistant professor at end for
the Faculty of Mathematics and Computer Scien- for each pixel in image
ce of the University of Białystok. His research if pixel = 3 then
interests include image processing, pattern reco- { DLA - deletion lookup array }
gnition, biometrics and artificial intelligence. if weight(pixel) in DLA then
pixel := 0
thinned = false
Marcin Adamski received his M.Sc. degree else
in computer science from Białystok Technical pixel := 3
University (Poland) in 2001, where he curren- end if
tly works at the Faculty of Computer Science. end if
His research interests concern image processing end for
and image recognition methods, and their appli- for each pixel in image
cations in biometric systems. if pixel = 3 then
pixel := 1
end if
end for
until thinned
Appendix mark even pixels as background
mark odd pixels as image
Pseudocodes of the implemented computer programs
{neighbour weight calculation}
{creating N-lookup arrays}
function weight(pixel) : integer
{alternate to weight calculation} return 1*(pixel.N mod 2) + 2*(pixel.NE mod 2)+
function lookup(N:integer) : boolean 64*(pixel.W mod 2) + 4*(pixel.E mod 2)+
vector = [pixel.N, pixel.NE, pixel.E, 32*(pixel.SW mod 2) + 16*(pixel.S mod 2)+
pixel.SE, pixel.S, pixel.SW, 8*(pixel.SE mod 2) + 128*(pixel.NW mod 2)
pixel.W, pixel.NW] end function
changes := 0
for i := 1 to 7 {single-for 1-stage}
if vector[i] <> vector[i+1] then
changes := changes + 1 mark image pixels as 1
end if mark background pixels as 0
end for phase := 1
if changes <= 2 then repeat
ones := 1 thinned = true
for i := 1 to 8 for each pixel p in image
if vector[i] = 1 then if p mod 2 = 1 then
ones := ones + 1 { checking if border pixel }
end if if (p.N <> 2*phase and p.N mod 2 = 0) or
end for (p.S <> 2*phase and p.S mod 2 = 0) or
if ones = N then (p.W <> 2*phase and p.W mod 2 = 0) or
return true (p.E <> 2*phase and p.E mod 2 = 0) then
end if { DLA - deletion lookup array }
end if if weight(p) in DLA then
return false p := 2 * phase
end function thinned = false
else
pixel.N - north neighbour of actual pixel p := 2 * phase + 1
pixel.NE - northeast neighbour of actual pixel end if
and so on... end if
end if
end for
phase := phase + 1
until thinned
mark even pixels as background
mark odd pixels as image