Triangle refinement in a constrained Delaunay triangulation skeleton

12
Pattern Recognition 40 (2007) 2754 – 2765 www.elsevier.com/locate/pr Triangle refinement in a constrained Delaunay triangulation skeleton Paul Morrison , Ju Jia Zou School of Engineering, University of Western Sydney, Locked Bag 1797, Penrith South DC, NSW 1797, Australia Received 20 November 2005; received in revised form 29 July 2006; accepted 19 December 2006 Abstract This paper presents an algorithm with the purpose of improving upon the already successful constrained Delaunay triangulation (CDT) skeletonisation technique. Using such a triangulation to construct a skeleton has proven very effective, that can sometimes, however, produce triangles that do not represent the true nature of the underlying shape. The contour pixels chosen for triangulation are of significant importance, as they determine the triangle edges that define the skeleton. The algorithm described in this paper deals with this problem by inserting new triangulation points in strategic locations in end, normal and junction triangles. Results show that the skeletons produced by this algorithm are accurate, robust against noise and, above all, comply much better with a human’s perception of the image than the original triangulation method. 2007 Pattern Recognition Society. Published by Elsevier Ltd. All rights reserved. Keywords: Skeletonisation; Constrained Delaunay triangulation; Skeleton refinement; Thinning; Medial axis; Binary image processing; Cartoon image processing 1. Introduction Skeletonisation is a common and important pre-processing procedure, implemented at the front end of many image pro- cessing systems. Through removing the aspect of width or thickness from the foreground of an image, skeletonisation al- lows subsequent processes to concentrate on the shape of the image, its composition and orientation. The problems faced by a skeletonisation algorithm in today’s environment are to: (1) produce the skeleton of an image in an efficient and timely manner, that is (2) robust against noise and, more importantly, (3) that conforms to a human’s perception of the image shape and composition [1,2]. This last property refers to the accuracy of the final skeleton, and is unfortunately also the most difficult to measure. The skeleton is the one-pixel-thick line that passes through the centre of an image, also known as the medial axis. There currently exist many skeletonisation methods, most of which can be placed in one of a few broad categories. These cate- gories include thinning [3–7] and distance transform [8–10], and non-pixel-based methods such as Voronoi diagram [11,12], Corresponding author. Tel.: +61 2 4736 0154; fax: +61 2 4736 0833. E-mail addresses: [email protected] (P. Morrison), [email protected] (J.J. Zou). 0031-3203/$30.00 2007 Pattern Recognition Society. Published by Elsevier Ltd. All rights reserved. doi:10.1016/j.patcog.2006.12.021 wavelets [2] and constrained Delaunay triangulation (CDT) [1,13,14]. All define an image skeleton differently, and use dif- ferent techniques for its computation. Each method will there- fore produce a different skeleton for the same image. All re- sults will be perfectly valid, and each can be argued to be more accurate than another. This problem of finding the exact skeleton will possibly never be solved. A more productive task is to define a set of rules for a particular skeletonisation method that optimise its results for a particular application. The goal of this paper is to refine the CDT skeletonisation method described in [1,13,14], in or- der to produce a more accurate skeleton for cartoon-like im- ages, and other images composed primarily of strokes. Strokes are the long, thin shapes commonly seen in drawings and Chi- nese characters. Skeletonisation is most effective when applied to stroke-based images due to strokes having a well-defined skeleton that, disregarding stroke width, can describe the shape extremely well. One notion that can be used to link a stroke-based image to its skeleton is that of symmetry. The main principle behind the use of the CDT for image skeletonisation is the concept of discrete local symmetry (DLS), first proposed in Ref. [13]. Within each stroke of an image is a medial axis. This is the imaginary line that runs through the centre of the stroke, which the skeleton is attempting to approximate. A pair of points,

Transcript of Triangle refinement in a constrained Delaunay triangulation skeleton

Pattern Recognition 40 (2007) 2754–2765www.elsevier.com/locate/pr

Triangle refinement in a constrained Delaunay triangulation skeleton

Paul Morrison∗, Ju Jia ZouSchool of Engineering, University of Western Sydney, Locked Bag 1797, Penrith South DC, NSW 1797, Australia

Received 20 November 2005; received in revised form 29 July 2006; accepted 19 December 2006

Abstract

This paper presents an algorithm with the purpose of improving upon the already successful constrained Delaunay triangulation (CDT)skeletonisation technique. Using such a triangulation to construct a skeleton has proven very effective, that can sometimes, however, producetriangles that do not represent the true nature of the underlying shape. The contour pixels chosen for triangulation are of significant importance,as they determine the triangle edges that define the skeleton. The algorithm described in this paper deals with this problem by inserting newtriangulation points in strategic locations in end, normal and junction triangles. Results show that the skeletons produced by this algorithm areaccurate, robust against noise and, above all, comply much better with a human’s perception of the image than the original triangulation method.� 2007 Pattern Recognition Society. Published by Elsevier Ltd. All rights reserved.

Keywords: Skeletonisation; Constrained Delaunay triangulation; Skeleton refinement; Thinning; Medial axis; Binary image processing; Cartoon image processing

1. Introduction

Skeletonisation is a common and important pre-processingprocedure, implemented at the front end of many image pro-cessing systems. Through removing the aspect of width orthickness from the foreground of an image, skeletonisation al-lows subsequent processes to concentrate on the shape of theimage, its composition and orientation. The problems faced bya skeletonisation algorithm in today’s environment are to: (1)produce the skeleton of an image in an efficient and timelymanner, that is (2) robust against noise and, more importantly,(3) that conforms to a human’s perception of the image shapeand composition [1,2]. This last property refers to the accuracyof the final skeleton, and is unfortunately also the most difficultto measure.

The skeleton is the one-pixel-thick line that passes throughthe centre of an image, also known as the medial axis. Therecurrently exist many skeletonisation methods, most of whichcan be placed in one of a few broad categories. These cate-gories include thinning [3–7] and distance transform [8–10],and non-pixel-based methods such as Voronoi diagram [11,12],

∗ Corresponding author. Tel.: +61 2 4736 0154; fax: +61 2 4736 0833.E-mail addresses: [email protected] (P. Morrison),

[email protected] (J.J. Zou).

0031-3203/$30.00 � 2007 Pattern Recognition Society. Published by Elsevier Ltd. All rights reserved.doi:10.1016/j.patcog.2006.12.021

wavelets [2] and constrained Delaunay triangulation (CDT)[1,13,14]. All define an image skeleton differently, and use dif-ferent techniques for its computation. Each method will there-fore produce a different skeleton for the same image. All re-sults will be perfectly valid, and each can be argued to be moreaccurate than another.

This problem of finding the exact skeleton will possibly neverbe solved. A more productive task is to define a set of rulesfor a particular skeletonisation method that optimise its resultsfor a particular application. The goal of this paper is to refinethe CDT skeletonisation method described in [1,13,14], in or-der to produce a more accurate skeleton for cartoon-like im-ages, and other images composed primarily of strokes. Strokesare the long, thin shapes commonly seen in drawings and Chi-nese characters. Skeletonisation is most effective when appliedto stroke-based images due to strokes having a well-definedskeleton that, disregarding stroke width, can describe the shapeextremely well.

One notion that can be used to link a stroke-based imageto its skeleton is that of symmetry. The main principle behindthe use of the CDT for image skeletonisation is the conceptof discrete local symmetry (DLS), first proposed in Ref. [13].Within each stroke of an image is a medial axis. This is theimaginary line that runs through the centre of the stroke, whichthe skeleton is attempting to approximate. A pair of points,

P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765 2755

each lying on opposite contours of the stroke, is symmetricalabout a point on the medial axis. This seems simple enough, butbecomes complicated when discrete pixels are used. RealisingDLS between two points on opposite contours allows the medialaxis to be approximated. CDT is the method used in this paperfor establishing DLS in an image.

CDT works by first selecting a set of contour pixels, calledCDT points, from the boundary of the image. These are thepoints chosen to represent the image and form the basis for thetriangulation, and the skeleton derived from the triangulation. ACDT point is chosen based on its straight-line distance from theprevious CDT point on the same contour, where the placementof the initial CDT point is arbitrary. This distance between eachCDT point is a function of the median stroke width of the image,and possibly the curvature of the contour. Once each contourhas been parsed, and the CDT points extracted, the image istriangulated.

The details of the triangulation process can be found in Ref.[13]. The triangulation attempts to create DLS between CDTpoints by connecting CDT points, so that the entire image isrepresented by triangles and merged triangles (see Ref. [1]).When the CDT points are placed very close together, the re-sulting skeleton accurately resembles the medial axis, and ahuman’s perception of the image. The disadvantage of havinga short spacing between CDT points is of course an excessiveprocessing time and reduced efficiency.

To solve this problem, the CDT points can be spread furtherapart. This, however, can result in the triangle edges no longerrepresenting DLS throughout the entire image. An algorithm ispresented in this paper that aims to insert extra CDT points inplaces that allow DLS to be re-established. This algorithm iscomposed of three sub-algorithms, corresponding to the threedifferent types of triangles constructed by Zou and Yan’s [1]CDT technique: end-triangles, normal triangles and junctiontriangles. When working together, the three sub-algorithms al-low an accurate skeleton to be constructed, while retaining theoriginal speed and efficiency inherent in the original CDT tech-nique. Connectedness is guaranteed in the original techniquebecause the triangulation, and resulting skeleton, is based onthe connected contours of the image. The proposed algorithmdoes not remove CDT points from the contour, and thereforealso guarantees connectedness.

This paper is organised as follows. Section 2 describes therefinement of end-triangles. Sections 3 and 4 deal with therefinement of normal and junction triangles, respectively. InSection 5, the three sub-algorithms are combined to form theproposed algorithm. In the same section, how the refinementalgorithm fits into the overall skeletonisation technique is alsodiscussed. The results obtained from the proposed algorithmare presented in Section 6 and a conclusion is given in Section7, which discusses possible improvements and the future of thepresented algorithm.

2. Refinement of end-triangles

An end-region is a portion of an object that protrudes fromthe main body of the object. It is a stroke that ends abruptly.

Fig. 1. Refinement of end triangle.

The skeleton that results from such a region exhibits the samecharacteristics of the underlying stroke; it follows the same pathand ends at, or near, the end of the stroke. After the stroke hasbeen triangulated, there will be a singular end-triangle situatedat the end of the stroke, which determines the finishing pointof this portion of the skeleton. The discussion in this section isconcerned with the refinement of such end-triangles, with thegoal of producing more accurate skeletons in end-regions.

The final skeleton point of an end-region is found by com-puting the centroid of the end-triangle. The three CDT pointsdefining this triangle must therefore resemble the end of thestroke as closely as possible. Fig. 1 shows a typical end-region,and its corresponding end-triangle T . If this triangle were tobe used for skeletonisation, an erroneous skeleton would surelyresult. This triangle therefore requires some refinement, in or-der to make it more suitable for skeletonisation.

The three vertices of T are labelled⇀p1 ,

⇀p2 and

⇀p3. The two

constrained edges lie between⇀p1 and

⇀p2, and

⇀p2 and

⇀p3 . These

two edges are labelled e1 and e2, respectively. A constrainededge is an edge that represents a portion of the contour of anobject, as opposed to an edge connecting opposite contours.The triangle T is refined by subdividing the edge e1, such thatthe new constrained edge of the new end-triangle, e′

1, is equal tothe existing constrained edge e2. This produces an end-trianglewhose centroid lies much closer to the medial axis of the object.

In order to refine the end-triangle, the algorithm must firstdetermine which constrained edge is to be modified. This issimply a matter of selecting the longer edge and inserting a CDTpoint such that the new edge is equal in length to the unmodifiedconstrained edge. After a new CDT point has been inserted, theentire object is re-triangulated. Following is a derivation of theformula used in positioning the new CDT point.

The constrained edge joining vertices⇀p1 and

⇀p2 can be mod-

elled by the parametric equation

⇀p = ⇀

p2 +t (⇀p1 − ⇀

p2), (1)

2756 P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765

where⇀p is any point on the edge. Each point on the edge,

⇀p ,

⇀p1 and

⇀p2, can be represented by their x- and y-components.

Eq. (1) then becomes

x = x2 + t (x1 − x2),

y = y2 + t (y1 − y2), (2)

where⇀p =(x, y),

⇀p1 =(x1, y1) and

⇀p2 =(x2, y2). In order to

refine an end-triangle, the point⇀p must be inserted such that

the two constrained edges are equal. That is√(x − x2)

2 + (y − y2)2 =

√(x3 − x2)

2 + (y3 − y2)2, (3)

where (x3, y3) represents the point⇀p3. Upon substitution of

Eq. (2) into Eq. (3), and some re-arrangement, an expressionfor the parameter t is found to be

t =√

(x3 − x2)2 + (y3 − y2)

2

(x1 − x2)2 + (y1 − y2)

2 . (4)

Using Eqs. (4) and (2), a CDT point is inserted in each end-triangle in the image. When the image is subsequently re-triangulated, each end-triangle will consist of two constrainededges of equal length. The centroid of these triangles will liecloser to the medial axis of the image, and a more accurateskeleton will result. Fig. 1 illustrates the movement of the orig-

inal end-triangle centroid,⇀c1, to it’s new location at

⇀c2, as a

result of this refinement.

3. Refinement of normal triangles

After an image is triangulated using CDT, the majority oftriangles will typically be normal triangles. These are the tri-angles that represent the body of each stroke, and are situatedbetween end and junction triangles. The accuracy of the skele-ton in these regions is critical in determining the accuracy ofthe entire image skeleton.

Normal triangles are used to construct the skeleton by con-necting the midpoints of each triangle edge crossing the fore-ground of the image. For each triangle, two of its vertices (CDTpoints) will lie on one contour, while the third lies on the op-posite contour. It is the edges that meet at this latter vertex thatcross the image’s foreground, and thus determine the image’sskeleton.

The goal in refining each normal triangle is to insert a CDTpoint into the constrained edge of the triangle such that thenewly inserted point and the vertex of the triangle on the oppo-site contour form a symmetric pair. This is illustrated in Fig. 2.As described in the introduction, symmetry and symmetric pairsof points form the basis of Skeletonisation using CDT. Thisportion of the algorithm ensures that symmetry is establishedthroughout the image, resulting in a more accurate skeleton.

In Fig. 2, the triangle formed by vertices⇀p1,

⇀p2 and

⇀p3 is

the original triangle to be refined. Another vertex,⇀p0, is shown,

which forms an adjacent triangle with vertices⇀p1 and

⇀p3. Three

edges, e1, e2 and e3 are also shown on the diagram. Vertices

Fig. 2. Refinement of normal triangle.

⇀p2 and

⇀p3 are points on the same stroke contour, while

⇀p1 is

located on the opposite contour. Therefore, the new point,⇀p ,

will be placed at a location such that⇀p and

⇀p1 form a symmetric

pair. Making the angle between edges e1 and e2 equal to theangle between e2 and e3 fulfils this condition. This angle, �, isshown in Fig. 2.

When these angles are equal, a local symmetry will be es-

tablished between points⇀p and

⇀p1. A local symmetry means

that the two points on opposite contours are symmetrical aboutthe line passing through the centre of the stroke. This is the

condition that allows the location of the new CDT point,⇀p , to

be found. Let the vector⇀a represent the edge e3, from

⇀p1 to

⇀p0. Let the vector

b represent the edge e1, from⇀p2 to

⇀p3. Also

let the vector⇀v represent the edge e2, from

⇀p1 to

⇀p . Eq. (5)

can then be produced, by evaluating that the dot product of the

vectors at points⇀p and

⇀p1.

⇀a · ⇀

v

| ⇀a || ⇀

v |=

b · ⇀v

| ⇀

b || ⇀v |

. (5)

The point⇀p lies on the triangle edge between

⇀p2 and

⇀p3,

and may be represented by the parametric equation

⇀p = ⇀

p2 +t (⇀p3 − ⇀

p2). (6)

The value of t can be found by combining Eqs. (5) and (6).This produces Eq. (7).

(c24 · | ⇀

a |2 − c22 · | ⇀

b |2) · t2 + 2(c3c4 · | ⇀a |2 − c1c2 · | ⇀

b |2) · t

+ (c23 · | ⇀

a |2 − c21 · | ⇀

b |2) = 0, (7)

where

c1 = ⇀a ·(⇀

p2 − ⇀p1),

c2 = ⇀a ·(⇀

p3 − ⇀p2),

c3 = ⇀

b ·(⇀p2 − ⇀

p1),

P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765 2757

c4 = ⇀

b ·(⇀p3 − ⇀

p2).

Letting A=c24 ·| ⇀

a |2−c22 ·| ⇀

b |2, B=2(c3c4 ·| ⇀a |2−c1c2 ·| ⇀

b |2)and C = c2

3 · | ⇀a |2 − c2

1 · | ⇀

b |2 expressions for the value of t canbe found. There are three possible conditions that determinethe value of t:

Condition 1:

If A �= 0, t1,2 = −B ± √B2 − 4AC

2A.

Condition 2:

If A = 0 and B �= 0, t1 = t2 = −C

B.

Condition 3: If A = 0 and B = 0, then C = 0 and the edges

e2 and e3 are parallel. In this case, there is no need to insert⇀p .

Using the above three conditions, a value for t, or multi-

ple values, can be found. This provides the coordinates of⇀p

through the use of Eq. (6). Of course, if condition 3 is satisfied,⇀p cannot be placed and the triangle is not refined.

Before the CDT point is inserted, however, its usefulness inimproving the DLS of the triangulation should be ascertained.Firstly, the value of t must be between 0.1 and 0.9. This en-

sures that⇀p is placed between

⇀p2 and

⇀p3, and that is not ex-

tremely close to either of these existing points. Inserting a newCDT point outside this range would not be useful in refiningthe current triangle, and it may indeed cause errors in the over-all skeleton. Placing the point extremely close to an existingpoint would create a very thin triangle, and would therefore be

obsolete. The angle � must also be between 0◦ and 180◦ for⇀p

to be valid.Providing all these conditions are satisfied, the point is

inserted and the image is re-triangulated. Using this sub-algorithm, DLS will be ensured throughout the normal regionsof the image and a more accurate skeleton will result.

4. Refinement of junction triangles

Junction triangles reside where three strokes come together.They typically consist of three internal edges, and vertices thatlie on different contours of the image. The purpose of a junctiontriangle is to define the point where the skeletons of the threeadjoining strokes meet.

The method of finding the skeleton point of a junction tri-angle is borrowed from Ref. [1]. Each edge of the junction tri-angle represents the entry point of a stroke into the junction.The direction of the skeleton of a particular stroke is calculatedbased on the average of the directions of the two contours onopposite sides of the stroke at the junction triangle edge. Eachintersecting stroke’s direction is determined in this way. Usingthe least squares method, a point is found inside the junctiontriangle that has a minimum distance to the projected skele-tons of the three adjoining strokes. This process is described inmore detail in Ref. [1].

Fig. 3. Refinement of junction triangle.

From this discussion, it is evident that the accuracy of theskeleton point within the junction triangle is dependent on howaccurately the triangle edges represent each of their respec-tive strokes. Junctions in images are used extensively in post-skeletonisation processing, and their accuracy is of great impor-tance. If the junction triangle does not represent the true junc-tion, the skeleton will be inaccurate. The goal of this section,the refinement of junction triangles, is to ensure that junctiontriangles represent the true junction of strokes.

Fig. 3 illustrates the case of a ‘T’ junction consisting of onejunction triangle, three end-triangles and two normal triangles.

The junction triangle is formed from CDT points⇀p1,

⇀p2 and

⇀p3.

The three edges of the junction triangle are also shown, and arenamed e1, e2 and e3. Clearly, the edge e3 does not adequatelyrepresent the right-hand stroke. As explained previously, in de-termining the skeleton point of the junction triangle, the direc-tion of the projected skeleton into the triangle must be deter-mined. In the case of edge e3, the direction will surely be in-correct. As for the left-hand stroke, the direction will be correctby chance, due to the fact that the stroke’s contours are paral-lel at the endpoints of the junction triangle edge e1. In order to

refine this junction triangle, point⇀p will be inserted. After re-

triangulation, a new triangle will be formed, which will consist

of edge e2, and the broken lines emanating from point⇀p .

The method of determining the location of the new CDTpoint is described as follows. Each edge in a junction triangleis analysed separately, by calculating the intersection of itsperpendicular bisector with the opposite contour. This is shownin Fig. 3 as the intersection of lines l1 and l2, for the edgee2. The perpendicular bisector, l1, can be represented by the

vector⇀v extending from the midpoint of internal edge e2 to

the intersection point,⇀p , with line l2. The equation of line l1

can be determined using the fact that the dot product of twoperpendicular vectors is zero

⇀v · ⇀

a =vxax + vyay = 0, (8)

2758 P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765

where⇀a is the vector joining points

⇀p2 and

⇀p3. Eq. (8) also

shows the two vectors split into their respective x- and y-components. The vector components are

vx = x − x3 + x2

2,

vy = y − y3 + y2

2,

ax = x3 − x2,

ay = y3 − y2

and, when Eq. (8) is re-arranged, the equation for line l1 isfound to be

a11x + a12y = c1, (9)

where a11 = x3 − x2, a12 = y3 − y2 and c1 = (x3+x2

2

)(x3 −

x2)+ ( y3+y22

)(y3 − y2). In order to find the equation of line l2,

its endpoints must first be determined. The opposite junctiontriangle CDT point (the point not defining the edge currentlybeing analysed) is selected as the first endpoint of line l2. In

Fig. 3, this point is denoted⇀p1.

Each CDT point lies on the contour of the image. Therefore,

the point⇀p1 has two adjacent CDT points that form constrained

(contour) edges to its left and right. These two edges are anal-ysed separately and, if conditions are right, a CDT point willbe inserted in one or the other.

The equation describing an edge is first determined. This is

done using⇀p1, and the CDT point lying at the other end of

the constrained edge. In Fig. 3, this point is named⇀p0. Using

simple line geometry, this equation is found to be

a21x + a22y = c2, (10)

where a21 =y0 −y1, a22 =x0 −x1 and c2 = (y0 −y1)x1 − (x0 −x1)y1. Solving Eqs. (9) and (10) simultaneously, the intersectionpoint of lines l1 and l2 are found to be

x = c1a22 − c2a12

a11a22 − a21a12,

y = c2a11 − c1a21

a11a22 − a21a12. (11)

Before this location becomes a valid CDT point, a test is made

to determine if it lies between⇀p0 and

⇀p1 and, if it does, how

close it is to either of these points. This is similar to the testperformed in Section 3, when refining a normal triangle. It isdone using the parametric equation shown below.

⇀p = ⇀

p1 +t (⇀p0 − ⇀

p1) (12)

which can be expressed in terms of x- and y-components:

x = x1 + t (x0 − x1),

y = y1 + t (y0 − y1). (13)

The value of t may then be determined.

t = x − x1

x0 − x1if x0 − x1 �= 0,

t = y − y1

y0 − y1if y0 − y1 �= 0. (14)

If t lies between 0.1 and 0.9, then⇀p lies between

⇀p0 and

⇀p1,

and it is far enough away from both points to ensure that a newCDT point is not inserted extremely close to an existing CDTpoint. As mentioned previously, if this were allowed, a verythin triangle would be formed which would be redundant. Ifthis condition is not satisfied, a new CDT point is not inserted

and the other constrained edge joining⇀p1 is analysed in the

same way. If no CDT points can be inserted, the next edge ofthe junction triangle is processed, starting at Eq. (8). Each timea CDT point is inserted, the entire image is re-triangulated,so that the new information is immediately reflected in thetriangulation. Each junction triangle is then processed again.This is repeated until no new CDT points can be inserted. Eachjunction triangle in the image will at this point be refined.

5. Composition of algorithm

The three sub-algorithms presented in the previous sectionsare applied to a digital image in sequential order. The overallskeletonisation process can be summarised as follows, wherestep 5 corresponds to the refinement algorithm:

1. Binarise image if required.2. Extract contours from binary image.3. Extract CDT points from contours of image.4. Perform triangulation based on CDT points, establishing a

base from which to apply the refinement algorithm.5. Refine triangulation. For each object in the image,

(a) Iterate over end-triangles until refinements can nolonger be made.

(i) If end-triangle needs refinement, refine triangle andre-triangulate the object using new information. Re-start the iteration.

(b) Iterate over junction triangles until refinements canno longer be made.

(i) If junction triangle needs refinement, refine triangleand re-triangulate the object using new information.Re-start the iteration.

(c) Iterate over normal triangles until refinements canno longer be made.

(i) If normal triangle needs refinement, refine triangleand re-triangulate the object using new information.Re-start the iteration.

6. Process periphery and intersection artifacts.7. Construct skeleton.

Many techniques may be used in the extraction of CDT pointsfrom the image contours (Step 3 of the skeletonisation process).Zou, et al. [13] uses a simple method by which an initial pointon the contour is chosen arbitrarily, and other points are chosensuch that the distance between successive CDT points is uni-form. This distance may be based on the median stroke widthfound in the image, or other such measures. More advancedtechniques may extract a greater number of CDT points from

P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765 2759

the contours’ dominant points, providing a higher resolution ofCDT points in more detailed areas of the image.

While inaccuracies in the skeleton arising from misplacedCDT points will be greatly reduced by the proposed refinementalgorithm, the original selection of CDT points restricts the in-sertion of new CDT points. Once the initial CDT points havebeen extracted from the contour, the lines connecting the CDTpoints form the new image contour, for the purposes of the re-finement algorithm. This means that the refinement algorithmmust insert new CDT points in the lines connecting initial CDTpoints, rather than the image’s true contours. If these lines donot accurately reflect the image’s contours, the refinement al-gorithm may be ineffective.

The proposed algorithm will always apply its refinementsto the three types of triangle in the same order: end, junctionthen normal triangles. This ordering is based on the contribu-tion the triangles make to skeletonisation artifacts. Skeletoni-sation artifacts, described in more detail in Ref. [1], can appearafter the initial triangulation of an image. Periphery artifactscorrespond to shape protrusions in the image, that are insignif-icant and do not conform to a human’s perception of the shape.End-triangles are the main cause of periphery artifacts, and aretherefore refined first.

The other kind of skeletonisation artifact is an intersectionartifact, which refers to a junction in an image that may be rep-resented as multiple junctions by the initial triangulation. Therefinement of junction triangles is therefore also of high impor-tance, as they are the main contributors to intersection artifacts.Refining end and junction triangles first serves to minimise er-rors prior to the refinement of normal triangles, which typicallyrepresent the majority of the image. Any artifacts remaining af-ter refinement are dealt with using techniques described in Ref.[1].

During the refinement of a particular triangle type, manyrefinement iterations may be executed, as indicated in the al-gorithm summary. If a triangle needs refinement during an it-eration, the entire object is re-triangulated and the iteration isrestarted. Doing this may have a slight impact on the algo-rithm’s performance, which is discussed in the next section,but it ensures that the impact of each refinement is immedi-ately reflected in the triangulation of the object. If a completeiteration can be made for a particular triangle type where norefinements are possible, the refinement algorithm moves on tothe next triangle type, or exits if all triangles have been refined.

Periphery artifacts are removed through a process known aspruning. Pruning attends to the problem of short protrusionsthat may appear in a shape. Such a protrusion is identified ashaving a length that is less than its width, and it is generallynot desirable to have protrusions represented in the skeleton.Zou and Yan [1] remove these artefacts by merging a protrud-ing triangle with an adjacent non-protruding triangle, using thetriangle’s dimensions as the determining factor.

Junction processing, which aims to remove intersection arti-facts from the image, may also involve the merging of triangles,this time with the aim of finding the correct intersection pointof strokes entering a junction region. The intersection point ofthree or more skeleton segments entering a junction region (a

junction region is a junction triangle before this processing isbegun) is the point that reduces the combined perpendiculardistances to the projections of each entering stroke to a mini-mum. If the calculated intersection point lies outside the junc-tion region, the junction region is merged with its adjacent tri-angles in the direction of the intersection point until it is con-tained within the region. If the intersection point lies outsidethe foreground of the shape, adjacent triangles are merged untilthe region approaches the intersection point as closely as pos-sible. Two junction regions are merged if they are adjacent toone another, or are separated by a single normal triangle. Thepruning and junction processing algorithm described above canhave a dramatic effect on the appearance of the final skeleton.A more detailed description of these algorithms can be foundin Ref. [1]. The triangulation of an image is processed usingthe pruning and junction processing algorithms following therefinement algorithm presented in this paper.

6. Results

This section presents the results obtained through applyingthe refinement algorithm, discussed in previous sections, tosome real images. These images have been chosen based onsome of the major applications of skeletonisation, and the im-age processing field in general. Emphasis is placed on the im-provements the refinement algorithm has made on the existingCDT technique. If a comparison of the existing CDT techniquewith other skeletonisation methods is required, the reader isreferred to Refs. [1,13,14].

One of the most widely researched sub-classes of image pro-cessing is the area of character recognition, due to the obviousimpact this area has made, and will continue to make, on our ev-eryday lives. The recognition of Chinese characters has formeda large part of this research. Chinese characters are comprisedalmost exclusively of strokes, which make them good candi-dates for skeletonisation. Fig. 4 illustrates the CDT of threeChinese characters before and after refinement. The skeletonsproduced by these triangulations are shown overlayed in bold.Keeping symmetry in mind, and its effect on skeleton accu-racy, the improvements exhibited by the refinement algorithmsare apparent. Fig. 4 indicates the refinement of end regions,normal regions and junction regions, marked by ‘E’, ‘N’ and‘J’, respectively. For comparative purposes, the triangulationsare shown before and after the pruning and junction processingalgorithms described earlier are applied.

Observe that most of the refinements are a result of large,elongated triangles being produced in the original triangulation.Elongated triangles affect the accuracy of all three region types:end, normal and junction regions. A large end-triangle reducesthe likelihood of the skeleton end-point being placed at the trueend of the stroke. Refinement using the sub-algorithm presentedin Section 2 brings the three vertices of the end-triangle closerto the stroke’s end point, allowing the skeleton segment to finishcloser and more towards the centre of the stroke. An exampleof this is shown on the first character of Fig. 4, marked by an“E” in parts (a) and (c).

2760 P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765

Fig. 4. Triangulation and skeleton of three Chinese characters: (a) unrefined, before pruning and junction processing; (b) unrefined, after pruning and junctionprocessing; (c) refined, before pruning and junction processing and (d) refined, after pruning and junction processing.

Some of the strokes in both the refined and unrefined skele-tons of Fig. 4 have a tendency to end in a small curve, ratherthan a straight line segment. This is an area where improvementto the end-triangle refinement sub-algorithm can be made. Asdescribed in Section 2, the end point of the skeleton segment isthe centroid of the end-triangle. The accuracy of the end-pointis therefore a function of the three vertices of the end-triangle.The optimum end-triangle will consist of one vertex at the verytip of the stroke, with the two other vertices on either side, andof an equal distance from the vertex at the tip. The centroid ofsuch a triangle will be located in the exact centre of the stroke.

When the initial sets of CDT points are extracted from theimage contours, an end-triangle may not exhibit these charac-teristics. The end triangle refinement sub-algorithm certainlyplays an important role in bringing the centroid further towardthe true centre of the stroke, it may still be slightly unaligned.Perhaps the refinement algorithm can be enhanced, to create atriangle that further improves the accuracy of the skeleton inend regions.

Skeleton accuracy after pruning is, however, helped more bythe proposed algorithm’s refinement of normal triangles. Thetriangle adjacent to an end-triangle will usually be a normal tri-angle. If this triangle, and other normal triangles in the chain,is large and elongated, a large end-region will be produced ifpruning is required. An excessively large end region will am-plify the skeleton error caused by an incorrect end-triangle. Anexample of such an end region, and the improvement made by

the algorithm’s refinement of normal triangles (detailed in Sec-tion 3), are marked by an “N” in Fig. 4(b) and (d), respectively.This sub-algorithm, by creating extra triangles that better re-flect the symmetry of the stroke, allows the pruning algorithmto operate at a finer resolution of triangles, and not create anend-region that is excessively large.

The junction triangle refinement sub-algorithm, which wasdiscussed in Section 4, inserts new CDT points at locationsthat produce a junction triangle that better represents the di-rection and entrance point of the skeleton segments of strokesentering the junction. Some examples of the improvements thissub-algorithm can make are indicated on the second Chinesecharacter in Fig. 4 by a “J”. The indicated junction triangleson the unrefined image before pruning and junction process-ing, shown in Fig. 4(a), are clearly erroneous. By contrast, therefined triangulation shown in Fig. 4(c) exhibits well-formedjunction triangles, with edges that accurately represent eachentering stroke. Junction processing amplifies the problems in-herent in the unrefined triangulation’s junction regions. Whenthe triangulation has been refined, junction processing facili-tates the production of a skeleton that aligns very closely witha human’s perception of the image.

There are many regions in Fig. 4 that exhibit junctions of fourstrokes. Junctions of four or more strokes are achieved throughcombining two or more junction triangles, as can be seen in thetransitions from Fig. 4(a) to (b), and from Fig. 4(c) to (d). Thejunction processing algorithm, which performs this merging

P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765 2761

Fig. 5. Triangulation and skeleton of three English letters: (a) unrefined, before pruning and junction processing; (b) unrefined, after pruning and junctionprocessing; (c) refined, before pruning and junction processing and (d) refined, after pruning and junction processing.

of junction triangles, is described in more detail in Ref. [1].While not explicitly targeting junctions of four or more strokes,the junction triangle refinement sub-algorithm ensures that allrequired CDT points are available to the junction processingalgorithm.

English letters are also commonly used as input to characterrecognition systems. Fig. 5 illustrates the skeletonisation of theletters ‘T’, ‘R’ and ‘A’. Again, the triangulation and resultingskeleton is shown both before and after pruning and junctionprocessing is applied. The skeleton is shown in bold.

Junctions, which present a problem to many other skeleton-isation algorithms, appear in all three of these letters. Theseregions in particular are of great importance in successful char-acter recognition. Inaccurate junctions can alter the represen-tation of the image quite drastically. The produced skeletonwould not constitute a good input to a character recognitionsystem, for example. The refined skeleton, shown in Fig. 5(d),produces well-placed junction points in the skeleton. These re-sults are much more suitable for further processing. As with theChinese characters shown in Fig. 4, pruning and junction pro-cessing further reduce the accuracy of an unrefined skeleton.As shown in Fig. 5(b), the results can appear quite different toa human’s perception of the image.

Take the junction triangle of the character ‘T’ in Fig. 5(a),marked by a “J”, as an example. The junction processing sub-algorithm has determined that the intersection point of the threeskeleton segments entering the stroke lies directly above thevertical stroke in the image. This point is outside the area de-

fined by the junction triangle. The junction triangle has there-fore been merged with the adjacent normal triangle, creating ajunction region that contains the intersection point that is exces-sively large. The pruning algorithm, having deemed the right-hand end point (marked by an “E”) a protrusion, has merged theend triangle with the adjacent normal triangle and the junctionregion. What results is a skeleton that appears vastly differentto the original image.

The proposed refinement algorithm has resolved this problemby creating a new junction triangle. The skeleton intersectionpoint of this junction lies within the new triangle, so no mergingis necessary. Pruning of the end-triangle does take place but, dueto the increased triangle accuracy and resolution, the new end-region is not larger than required. Similar, and more dramatic,situations can be seen in the other two letters of Fig. 5. Simplycomparing the final results of Fig. 5(d) with those of Fig. 5(b)makes the improvements provided by the refinement algorithmapparent.

The intended application of this skeletonisation algorithm isthe processing of cartoon images. It is therefore fitting to in-clude some of these images in this section. Cartoon images,like Chinese and English characters, are largely comprised ofstrokes, making them suitable for skeletonisation. Fig. 6 illus-trates in detail the triangulation and skeleton of a complex car-toon image. Once again, examples of the refinement of end,normal and junction triangles are indicated by an ‘E’, ‘N’ and‘J’, respectively. The initial skeletons produced by both an un-refined and refined triangulation are shown in bold in Fig. 6(a)

2762 P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765

Fig. 6. Triangulation and skeleton of a cartoon image: (a) unrefined, before pruning and junction processing; (b) unrefined, after pruning and junction processing;(c) refined, before pruning and junction processing and (d) refined, after pruning and junction processing.

and (c), respectively. The unrefined and refined triangulationsand skeletons, after pruning and junction processing, are shownin Fig. 6(b) and (d), respectively.

An unrefined junction triangle is shown expanded in Fig.6(a). By observing the locations of the triangle’s CDT points(vertices), and the resulting triangle edges, it is obvious thatthe triangle does not adequately represent the direction of eachstroke as it enters the junction region. Furthermore, the bulk ofthe triangle does not lie over the region where a human wouldperceive the three stokes meeting. The resulting skeleton, afterpruning and junction processing (shown in Fig. 6(b)), is con-sequently inaccurate. After refinement, a CDT point is placedalong the top edge of the image, according to the algorithm de-scribed in Section 4. After the image is re-triangulated, the newjunction triangle conforms much better to a human’s percep-tion of the junction region, and the resulting skeleton is moreaccurate (shown in Fig. 6(d)).

End-triangle refinement is also shown expanded in Fig. 6.The unrefined end-triangle shown in Fig. 6(a) is the uppermosttriangle, situated at the end-point of the stroke. In this example,one of the CDT points of the end-triangle has been placedquite away from the actual end of the stroke, particularly afterpruning. The resulting skeleton end-point is not situated at thevery end of the stroke, and indeed the end is almost placed

on the background of the image. After refinement, a new end-triangle is produced, that represents the end of the stroke muchbetter.

In the example of the refinement of normal triangles in Fig.6, the unrefined normal triangles are large and extended. Theconstrained edges match up contour points that are obviouslynot symmetrical about the medial axis of the stroke. In re-fining normal triangles, the proposed algorithm inserts CDTpoints into the extracted image boundary at locations that ex-hibit DLS. The resulting triangle edges represent the true imageforeground, and the skeleton is able to follow the medial axisof the image much more closely. Note that after refinement,there exists a protruding end-triangle in this normal region (seeFig. 6(c)). The pruning algorithm has merged this triangle withits adjacent normal triangle, to better represent the underlyingimage.

Some extra results are shown in Fig. 7. Only the skeletons,achieved through refinement of the original triangulation, areshown for the full set of characters. Three characters are shownenlarged, with their contours and triangulations, and are com-pared with the equivalent results without refinement. Thesethree characters have been chosen because they demonstratethat all three types of refinement are possible within a singleimage. The more complex an image is, the more opportunity

P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765 2763

Fig. 7. More Chinese character results, showing: (a) the binary images to be skeletonised, and (b) the skeletons produced using the proposed refinementalgorithm. Some of the characters are shown enlarged with their extracted contour, triangulation and skeleton in (c) without refinement, and (d) with refinement.Pruning and junction processing has been applied to all these results.

there is for the refinement algorithm to make a meaningful im-provement to the skeleton. Chinese characters, which typicallyconsist of many strokes, exhibit high numbers of end points,junctions and curves, where the realisation of symmetry is ofutmost importance. Cartoon images, the targeted applicationfor the proposed algorithm, also often demonstrate these char-acteristics.

Table 1 shows the processing time incurred during the skele-tonisation of the Chinese characters in Fig. 7. The overall timehas been split into the times taken to perform each of the indi-vidual tasks described in the overall skeletonisation algorithmin Section 5.

The most notable aspect of this table is that the refinement al-gorithm consumes roughly half of the time taken to skeletonisethese images. While this figure seems high, it is expected, con-sidering that each triangle in the image is analysed at least once,and often many more times. The bulk of the refinement timeis, however, spent refining the image’s normal triangles. Whilethis too is expected (normal triangles make up the vast major-ity of most stroke-based images), Table 2 highlights anotherissue.

Table 1Processing time of characters shown in Fig. 7

Task Time (s) % of total time

Binarise image 0.03 2Extract contours 0.13 9Extract original CDT points 0.1 7Perform original triangulation 0.201 14Refine triangulation Total 0.701 49

End 0.071 5Junction 0.081 6Normal 0.549 38

Pruning and junction processing 0.23 16Construct skeleton 0.04 3

Total 1.432 100

The majority of triangles representing the characters of Fig. 7are, indeed, normal triangles. This high proportion is againreflected in the number of refinements made by each of the pro-posed sub-algorithms. For junction and normal triangles, morethan one refinement is possible for each triangle. End triangles,

2764 P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765

Table 2More refinement statistics on the characters shows in Fig. 7

Triangle Original number Number of Average processing timetype of triangles refinements made per refinement (ms)

End 226 220 0.323Junction 130 318 0.255Normal 735 1084 0.507

Total 1091 1622 0.432

however, may be refined once at most. This accounts for thenumber of refinements made to junction and normal trianglesexceeding the number of triangles. The most important figuresshown in Table 2 are the average processing times of eachrefinement, which reveal that normal triangles are, on average,almost twice as expensive to refine as the other triangle types.

The reason for this is that after each refinement, the entireobject must be re-triangulated. This is necessary, as it ensuresthat the change is immediately reflected in the triangulation, andthat subsequent refinements are being made to the triangulationas it currently exists. This re-triangulation time is incorporatedin refinement time for that triangle type. While triangulation isquite efficient (see Table 1), it consumes a significant amount oftime when performed more than once for each normal triangle.

A solution to this problem would be to reduce the sensitivityof the normal triangle refinement sub-algorithm. As noted inSection 3, an extra CDT point is not inserted in the contour ofthe image if it lies within a certain distance from an existingCDT point. In the current algorithm, this distance is 10% of thelength of the boundary edge on each side of the existing CDTpoint. Increasing this distance to, say 20%, would reduce therate at which the normal triangle sub-algorithm inserts CDTpoints, and would vastly reduce the processing time.

This, of course, may reduce the likelihood of symmetry be-ing established throughout the image’s normal regions. Basedon the results shown previously, and the observation that endand junction points are of more importance for most applica-tions of skeletonisation, such a change would have little effecton the skeleton’s accuracy. As noted in Section 5, a more ad-vanced CDT point-extraction algorithm may be used, whichcould selectively place the initial CDT points in critical areas,such as areas of high curvature. A modification such as thiswould help reduce the number of refinements required in thenormal regions of the image.

The importance of the accuracy of the skeleton, particularlyin end and junction regions, cannot be underestimated. Whileskeletonisation itself has limited uses, when used as a front-endprocessing tool its significance becomes apparent. The qualityof the information extracted from the skeleton is a direct func-tion of the skeleton’s accuracy. If the skeleton is able to repre-sent the underlying image with more precision, the informationquality will flow through to subsequent processing steps.

7. Conclusion

This paper presents major improvement on the constrainedDelaunay triangulation (CDT) skeletonisation technique pre-

sented in Refs. [13,14]. The proposed algorithm is composedof three sub-algorithms, which deal with the refinement of end,normal and junction triangles, the three main components ofthe CDT method.

Results show the vast improvement the refinement algorithmprovides, when compared with the unmodified CDT technique.The proposed algorithm produces a skeleton that conformsmuch more accurately to a human’s perception of the underly-ing image, whilst retaining the efficiencies inherent in the orig-inal technique. The skeletonisation of cartoon images, the mainapplication of this study, is used to demonstrate the superior-ity of the proposed methods. While the refinement algorithmvastly improves the results produced by the unmodified CDTtechnique, its use may be limited by factors such as the com-plexity of the stroke arrangement in some images, the methodused to extract CDT points from the image contours, and theimage’s resolution and quantity of noise. Furthermore, a largenumber of CDT points may limit the refinement algorithm’seffectiveness, as refinements may not be necessary where thereare an excessive number of triangles. Despite these possibleshortcomings, there is a high probability that the proposed al-gorithm will improve upon the triangulation produced by theunmodified CDT technique.

Roughly twice as much time is taken to skeletonise an imageusing the refinement algorithm, than the unmodified CDT tech-nique. As shown in Ref. [14], the unmodified CDT techniqueis far superior to other popular skeletonisation methods, withrespect to processing time. When refinement is applied, perfor-mance is reduced but, when compared to other skeletonisationmethods, and the dramatic improvement in results, the proposedalgorithm’s benefits certainly outweigh this disadvantage.

Further work to be completed includes the expansion of thesealgorithms to the refinement of merged triangles, and otherCDT concepts that have not been covered in this paper.

References

[1] J.J. Zou, H. Yan, Skeletonisation of ribbon-like shapes based on regularityand singularity analyses, IEEE Trans. Syst. Man. Cybern. B 31 (2001)401–407.

[2] Y.Y. Tang, X. You, Skeletonisation of ribbon-like shapes based on anew wavelet function, IEEE Trans. Pattern Anal. Mach. Intell. 25 (2003)1118–1133.

[3] T.Y. Zhang, C.Y. Suen, A fast parallel algorithm for thinning digitalpatterns, Commun. ACM 27 (1984) 236–239.

[4] H.E. Lu, P.S.P. Wang, A comment on “a fast parallel algorithm forthinning digital patterns”, Commun. ACM 29 (3) (1986) 239–242.

[5] Y.Y. Zhang, P.S.P. Wang, A parallel thinning algorithm with two-subiteration that generates one-pixel-wide skeletons, ICPR’96, Wien,August, 1996, pp. 457–461.

[6] L. Lam, S.-W. Lee, C.Y. Suen, Thinning Methodologies—acomprehensive survey, IEEE Trans. Pattern Anal. Mach. Intell. 14 (1992)869–885.

[7] R.W. Smith, Computer processing of line images: a survey, PatternRecognition 20 (1987) 7–15.

[8] H.H. Chang, H. Yan, Analysis of stroke structures of handwritten Chinesecharacters, IEEE Trans. Syst. Man. Cybern. B 29 (1999) 47–61.

[9] Y. Ge, J.M. Fitzpatrick, On the generation of skeletons from discreteEuclidean distance maps, IEEE Trans. Pattern Anal. Mach. Intell. 18(1996) 1055–1066.

P. Morrison, J.J. Zou / Pattern Recognition 40 (2007) 2754–2765 2765

[10] F.Y. Shih, C.C. Pu, A skeletonisation algorithm by maxima tracking onEuclidean distance transform, Pattern Recognition 28 (1995) 331–341.

[11] J. Rocha, Perceptually stable regions for arbitrary polygons, IEEE Trans.Syst. Man. Cybern. B 33 (2003) 165–171.

[12] R.L. Ogniewicz, O. Kubler, Hierarchic voronoi skeletons, PatternRecognition 28 (1995) 343–359.

[13] J.J. Zou, H.H. Chang, H. Yan, Shape skeletonisation by identifyingdiscrete local symmetries, Pattern Recognition 34 (2001) 1895–1905.

[14] J.J. Zou, A fast skeletonisation method, Proc. Digital Image Comput.:Techniques and Appl. Conf. 1 (2003) 283–288.

About the Author—PAUL MORRISON completed his undergraduate degree in computer engineering in 2003, at the University of Western Sydney, Australia.He is currently studying towards a Ph.D. in the field of image processing, at the same university, with the ultimate goal of producing a computer-aidedcartooning system. His research interests included character and shape recognition, classification and 2-D animation. He is a member of the Institute ofElectrical and Electronic Engineers (IEEE).

About the Author—JU JIA ZOU received a Ph.D. degree in electrical and information engineering from the University of Sydney, Australia in 2001. Hejoined the University of Western Sydney, Australia in 2003, where he is currently a lecturer in computer engineering. He was an ARC Research Associate, andthen an Australian Postdoctoral Fellow in the School of Electrical and Information Engineering at the University of Sydney from 2000 to 2003. His researchinterests include image processing, pattern recognition, computer graphics and computer animation. Dr. Zou is a member of the Institute of Electrical andElectronic Engineers (IEEE).