You are on page 1of 8

Pattern Recognition 36 (2003) 123 130

www.elsevier.com/locate/patcog

Recognition of digital curves scanned from paper drawings


using genetic algorithms
Ke-Zhang Chena; , Xi-Wen Zhangb , Zong-Ying Ouc , Xin-An Fengc
a Department

of Mechanical Engineering, The University of Hong Kong, Room 7-9, Haking Wong Building,
Pokfulam Road, Hong Kong
b State Key Laboratory for Novel Software Technology, Nanjing University, Nanjing 210093, China
c Faculty of Mechanical Engineering, Dalian University of Technology, Dalian 116024, China
Received 26 June 2001; received in revised form 30 January 2002; accepted 25 February 2002

Abstract
After analyzing the existing methods, based on holo-extraction method of information, this paper develops a recognition
method of digital curves scanned from paper drawings for subsequent pattern recognition and 3D reconstruction. This method
is 5rst to construct the networks of single closed region (SCRs) of black pixels with all the information about both segments
and their linking points, to classify all the digital contours represented by SCRs into three types: straight-line segments, circular
arcs, and combined lines, and then to decompose the combined lines into least basic sub-lines or segments (straight-line
segments or circular arcs) with least 5tting errors using genetic algorithms with adaptive probabilities of crossover and mutation
and to determine their relationships (intersecting or being tangential to each other). It is veri5ed that the recognition method
based on the networks of SCRs and the genetic algorithm is feasible and e:cient. This method and its software prototype can
be used as a base for further work on subsequent engineering drawing understanding and 3D reconstruction. ? 2002 Pattern
Recognition Society. Published by Elsevier Science Ltd. All rights reserved.
Keywords: Engineering drawing; Digital curves; Curve 5tting; Combined lines; Pattern recognition; Genetic algorithms

1. Introduction
In engineering drawings, the outlines of projections of
parts and annotations all consist of many elements which can
be straight-line segments, circular arcs, elliptical arcs, other
curves, or combined lines. The other curves can be normally
5tted by spline functions, and are called as spline curves
hereafter. The combined lines may comprise straight-line
segments, circular arcs, elliptical arcs, and=or spline curves,
which intersect or are tangential to each other. After a paper drawing is scanned and inputted into a computer in the
form of raster (binary) image, these elements represented
Corresponding author. Tel.: +852-2859-2630; fax: +8522858-5415.
E-mail address: kzchen@hkucc.hku.hk (K.-Z. Chen).

by black pixels have to be recognized 5rst, so that lexical,


syntactic, and semantic information can be further extracted
for pattern recognition or 3D reconstruction. Since the elements in paper drawings are not as accurate as those drawn
in computers and also possibly have some noise, recognizing these elements is not easy and has been a crucial issue in
pattern recognition and 3D reconstruction. Although much
research work on this area has been done and many methods for it have been developed, it is yet quite far from being
perfect.
Existing methods for it are mainly focused on recognizing
combined lines or curves. Regardless of the elements to
which curves are to be segmented, these methods can be
categorized into two main types: break point detection and
edge approximation [1].
The break point detection methods are mainly developed to search for critical (break) points on a contour

0031-3203/02/$22.00 ? 2002 Pattern Recognition Society. Published by Elsevier Science Ltd. All rights reserved.
PII: S 0 0 3 1 - 3 2 0 3 ( 0 2 ) 0 0 0 6 7 - 5

124

K.-Z. Chen et al. / Pattern Recognition 36 (2003) 123 130

or curve, and can be classi5ed into the following four


classes:
(1) Curvature-based methods. In this class of methods,
curvatures are employed directly or indirectly to search for
critical points, which are detected at curvature extrema or
points of rapid curvature change. Some of those direct methods [25] can not only determine the position of a corner or
break point but also have the ability to evaluate the magnitude of an angle, if the angle exists. But it is well known that
information which includes only critical points and sizes of
angles of a contour is not enough to determine the contour in
general. Moreover, these methods are very sensitive to noise
[1]. In those indirect methods [6 8], the curvature is evaluated after transforming the contour to the Gaussian scale
space. One advantage of these methods is that they are suitable for extracting features from a noisy curve. However,
a long computing time is needed to construct the Gaussian
scale space, and it cannot estimate the magnitude of an
angle [5].
(2) Signi9cance measure-based methods. This class of
methods [9,10] search for critical points using some significance measure other than curvature. It was developed to
extract fragments of a convex blob which are perceptually
meaningful. This is achieved by attributing to each point
of the blob a set of neighboring points and 5nding the signi5cant set. This method can be used to 5nd the location
of an angle, but it cannot determine the magnitude of the
angle [5].
(3) Polygonal approximation-based methods. In this
class of methods, a contour is represented by polygonal
curves [1114]. In general, there are three basic approaches:
(1) given the number of break points, m, 5nd a polygonal
approximation with m breakpoints, such that its distance
from the curves is minimal among all the approximations
with m breakpoints, (2) given an error , 5nd the polygonal
approximation with the minimal number of breakpoints
such that the polygon is distant from the curve by no more
than , and (3) approximate the digital curve according to
its own characteristics without any pre-speci5ed restriction.
By using Genetic Algorithms (GA), their original disadvantage of result dependency on the selection of starting
points and the given arbitrary initial solutions has been
overcome [13,14]. But, this class of methods applies only
straight-line, not circular arcs, elliptical arcs, or spline curve,
to 5t a contour, so that their results are not ideal in most
cases.
(4) Fuzzy reasoning-based methods. In this class of
methods [15], a set of fuzzy patterns of contour points are
established 5rst. Then, corner detection is characterized as
a fuzzy classi5cation problem that contains three stages:
evaluation, classi5cation, and location. Although it can 5nd
and explain corners on curves with more robustness to
noise, the information obtained is not enough to determine
the contour in general, like other break point detection
methods.

For the edge approximation methods, curve segments


of given types are 5tted to the edge elements based on
some goodness-of-5t criterion, and break points are subsequently located at edge points corresponding to the ends
of 5tting curve segments. According to the given types of
curve segments, there are two classes of methods:
(1) Straight lines and circular arcs. This method [16]
is to break a curve into small segments 5rst, which is
near-symmetric about an axis passing through the midpoint
of the segment in a direction perpendicular to the line joining its end points. Then these segments are linked to form
co-curvilinear and collinear segments based on curve 5tting.
Finally, each merged segment is classi5ed as a straight line
or a circular arc depending on the deviation of the midpoint
of the segment from the line joining the two end points.
(2) Straight lines and elliptical arcs [1,17]. This method
[17] is to segment the curve into straight-line segments
5rst, then extend line segments by combining with adjacent line segments, replace some line segments by elliptical
arcs, extend elliptical arcs by combining with adjacent line
segments and=or elliptical arcs, and 5nally re5ne elliptical
5ts.
One major problem of edge approximation methods is that
it does not fully exploit the properties of dominant (break)
points. The split-and-merge algorithms lack consensus over
what should constitute a suitable split point [1].
In fact, although the contour consists of straight-line segments, circular arcs, elliptical arcs, spline curves, and=or
combined lines, an ellipse in paper drawings is normally
drawn by people approximately using four circular arcs with
two diMerent radii. Although a spline curve is normally
drawn by people using irregular or French curves, it can
also be approximated using some circular arcs and=or some
straight-line segments. Therefore, elliptical arcs and spline
curves can be considered as combined lines. The recognition method should be able to 5rst distinguish straight-line
segments, circular arcs, and combined lines, and then to decompose the combined lines into sub-lines which can be
5tted by basic line types (straight-line segments or circular arcs) and to determine their relationships (intersecting
or being tangential to each other). This paper develops such
a recognition method, based on holo-extraction of information [18], which is 5rst to construct the networks of single
closed region (SCRs) of black pixels with all the information about both segments and their linking points, to classify
all the digital contours or segments represented by SCRs
into three types: straight-line segments, circular arcs, and
combined lines, and then to decompose the combined lines
into least basic sub-lines (straight-line segments or circular
arcs) with least 5tting errors using genetic algorithms with
adaptive probabilities of crossover and mutation and to determine their relationships (intersecting or being tangential
to each other). The following sections will illustrate this
method in more detail.

K.-Z. Chen et al. / Pattern Recognition 36 (2003) 123 130

125

2. Extraction of digital curves scanned from paper


drawings
After scanning paper drawings, the extraction of digital
curves is the 5rst phase of pattern recognition or 3D reconstruction. The extraction process should not be only for obtaining digital curves themselves and should extract all the
information in a drawing or the information needed for subsequent pattern recognition or 3D reconstruction, which are
mainly the elements of raster image and their diMerent level
relationships. Therefore, a holo-extraction of information
from the raster image is required. This can be achieved by
constructing networks of simple closed regions (SCRs) of
black pixels [18]. According to this holo-extraction method,
digital curves can be obtained in the form of closed black
pixel regions using the following procedure:
(1) Generating adjacency graphs of runs. Let visiting sequence be from top to bottom for a raster image and from
left to right along horizontal direction for its each row. When
visiting along a row, the 5rst black pixel converted from
white pixel is the starting point of a run and the last black
pixel, if next pixel is white, is the end point of the run.
The value of its end coordinates minus starting coordinate
in horizontal direction is its run length, the unit of which is
pixel. If the diMerence of two runs vertical coordinates is 1
and the value of their minimal end coordinates minus maximal starting coordinates is larger than or equal to 1, the two
runs are adjacent. If A and B are adjacent and As vertical
coordinate is larger than that of B, A is called predecessor
of B, and B is called successor of A. Accordingly, there
are seven types of runs according to its adjacency relationships with other runs: singular run (has no predecessor and
no successor), beginning run (has no predecessor and only
one successor), end run (has only one predecessor and no
successor), regular run (has only one predecessor and only
one successor), branching run (has one predecessor at most
and more than one successors), merging run (has more than
one predecessors and one successor at most), and cross run
(has more than one predecessors and successors, respectively). With recording the adjacency relationships of runs
while visiting in the assumed way, the adjacency graphs of
runs can be made using a node to represent a run and a line
between two nodes to represent an adjacency relationship
between the two runs. DiMerent properties of runs (including their starting coordinates, end coordinates, lengths, and
types) are stored in the node data 5le.
(2) Constructing closed regions. Based on the adjacency
graphs of runs constructed, higher level representation of the
raster image can be obtained by aggregating related runs into
closed regions. These related runs must satisfy the following
requirements: (1) They are adjacent to each other, (2) the
beginning run is not a branching run or a cross run, and the
end run is not a merging run or a cross run, and (3) the
diMerence between their lengths is less than their shorter run
length. From the 5rst run, the related runs can be searched

Fig. 1. The run length graph and the closed region graph of digital
curves.

Fig. 2. Types of closed regions.

via the adjacency graphs of runs, and their starting points


and end points are then recorded to construct closed regions.
Fig. 1(c) shows a closed region graph constructed from the
run graph in Fig. 1(b) for the contours in Fig. 1(a).
According to the method, the possible results obtained
may be the closed region for a straight line, a circular arc,
an elliptical arc, a spline curve, a combined line, a point,
or an arrowhead, as shown in Fig. 2(a), (b), (c), (d), (e),
(f) and (g), respectively. A point may be an independent
point or intersecting point as shown in Figs. 2(f) and 1(c),
respectively, and can be recognized according to the length
of its closed region and the width change of its closed region.
The arrowhead can also be extracted according to the width
change of its closed region [18]. Therefore, the rest of them
are digital curves (i.e., straight lines, circular arcs, elliptical
arcs, spline curves or combined lines), which need to be
recognized.

3. Classication of digital curves


As mentioned in the 5rst section of this paper, ellipses
and spline curves in paper drawings can be considered as
combined lines. Thus, the 5rst task for recognition of digital
curves is to classify all the digital contours into three types:
straight-line segments, circular arcs, and combined lines.

126

K.-Z. Chen et al. / Pattern Recognition 36 (2003) 123 130

The procedure of classi5cation method is as follows:

(1) Extracting the representing points of digital curves.


For each closed region, the midpoint of each run in it can
be recorded as the points that form a digital curve. In order
to reduce computing load, some equal-spaced points among
these points are selected as the representing points for curve
5tting. The number (N ) of points is determined according
to the length of segment using:
 

d(n 1) ; if d(n 1) 10 mm;
N=
(1)
10;
if d(n 1) 6 10 mm;
where d is the distance between two adjacent points, n is
the total number of points in the 
segment, d(n 1) denotes the length of segment, and  d(n 1) is the inte
gral part of d(n 1). The longer the segment is, the more
equal-spaced points will be selected for curve 5tting. But the
number of the selected points is not less than 10 to ensure
the eMective curve 5tting. These points can be written as
P = {Pi = (xi ; yi ); i = 1; : : : ; N }:

(2)




N
N
N
N
1


2
2
2
2
=
x 2 xi a + Na + yi 2 yi b+Nb ;
N i=1 i
i=1
i=1
i=1
(10)
where


2
N
N

a11 = 2
xi N
xi2 ;
i=1

a12 = a21 = 2

b1 =

i=1

xi2
N

N

i=1
N

yi

2
i=1 xi

N

i=1

N

xi

i=1

N
xi

i=1
)2

xi y i

(5)

Thus, the average distance (ds ) from these points (xi ; yi ) to


the 5tted straight-line can be calculated using the following
formula:
N
|(kxi + c) yi |
ds = i=1
:
(6)
N k2 + 1
(3) Fitting a circular arc to the set of points. On the other
hand, according to the least-square regression, these points
can also be 5tted by a circular arc
(x a)2 + (y b)2 = R2 ;

(7)

where (a; b) and R denote the coordinates of the circles centre and its radius, respectively, and can be estimated using
the following formulas [20]:
b1 a22 b2 a12
a=
;
(8)

b2 a11 b1 a21
;
(9)
b=


xi2

i=1

and

N

xi y i

(12)

i=1

(13)

i=1

y = kx + c;

c=

yi N

i=1


2
N

2
yi N
yi ;
a22 = 2

b2 =

where k and c denote the slope and intercept, respectively,


and can be estimated by the following formulas:
N
N
N
N
i=1 xi yi
i=1 xi
i=1 yi
k=
;
(4)
N 2
N
2
N
x

(
x
)
i
i
i=1
i=1

xi

i=1

(2) Fitting a straight-line to the set of points. The straight


line which best 5ts a given set of points can be determined
using the least-squares criterion which minimizes the 5tting
error. According to the least-squares regression [19], the N
points can be 5tted by a straight-line:
(3)

(11)

i=1

i=1

xi N

i=1

xi2

xi3 +

i=1

yi N

i=1

 = a11 a22 a21 a12 :

i=1

xi

i=1

yi3 +

i=1

yi2 N

i=1

yi

i=1

xi yi2 ;

i=1

yi2 N

i=1

(14)
xi2 yi
(15)

(16)

Thus, the average distance (dc ) from these points (xi ; yi ) to


the 5tted circular arc can be calculated using the following
formula:
N 
| (xi a)2 + (yi b)2 R|
dc = i=1
(17)
N
(4) Determining its type. If the average distance (ds ) from
the points in a digital curve to a 5tted straight-line is equal to
zero, the digital curve is exactly a straight line according to
the least-squares criterion. If the average distance (dc ) from
the points in a digital curve to a 5tted circular arc is equal to
zero, the digital curve is exactly a circular arc according to
the least-squares criterion. But the digital curves are scanned
from paper drawings that are not accurate. Therefore, an
error range (double width of the closed black pixel region)
is given for it. Thus, only if ds is smaller than both dc and
double width of the closed black pixel region, this digital
curve is a straight line (rule 1). Only if dc is smaller than
both ds and double width of the closed black pixel region,
this digital curve is a circular arc (rule 2). If both ds and
dc are greater than double width of the closed black pixel
region, this digital is neither a straight line nor a circular
arc, and should be the third possibility, i.e., a combined line
(rule 3). Therefore, after the two average distances (ds and
dc ) of a digital curve are obtained, the type of the digital
curve can be determined by using the three rules.

K.-Z. Chen et al. / Pattern Recognition 36 (2003) 123 130

127

Combined line
Initial population
Mating pool
Crossover

Mutation

Offspring
Selection
New

No

Are stopping
criteria
satisfied?

Yes
Elitist
Fig. 3. The block diagram of the algorithm.

After classi5cation, its more precise regression equation


can be further obtained to 5t to all the midpoints of runs in
the closed region by using above formulas if it is determined
as a straight-line or circular arc. When it is a combined
line, it will then be decomposed into straight-line segments
and=or circular arcs further.

4. Decomposition of combined lines using genetic


algorithms
The method for decomposition is to 5nd their optimal
split (break) points with least number of segments, each of
which can be 5tted to a straight line or a circular arc with
least error. This is an optimization problem, which can be
solved by using genetic algorithm [21].
The block diagram of the algorithm is shown in Fig. 3.
This algorithm includes an encoding scheme, a 5tness function, genetic operators (crossover, mutation, and selection),
and control parameters; and will be illustrated in more detail
in the following sections.

Fig. 4. A combined line.

a binary gene string as follows:


C = {gp | p = 1; 2; : : : ; n};

(18)

where gp = 1, if point p is a break point; otherwise gp = 0.


An initial population with a set of chromosomes is generated
randomly [21], entered into a mating pool for subsequent
operations, and de5nes as
{Ci | i = 1; 2; : : : ; m};

(19)

where m is the number of chromosomes in a population and


is equal to n=2 in this case. In digital curves, two break points
should not be adjacent or very close to each other. To avoid
it, each chromosome will be modi5ed using the following
rules:
If the distance between two adjacent genes being 1 is less
than 15, change the second gene from 1 to 0.
If there are several genes being 1, which are continuous,
change the genes, except the 5rst and the last gene, from
1 to 0.
For example, Fig. 4(a) shows a combined line, which consists of an elliptical arc (AB), two straight-line segments
(BC and CD), two circular arcs (DE and EF), and a spline
curve (FG), and has 344 points in total. An initial population
with 172 chromosomes is 5rst generated randomly. One of
172 chromosomes has 17 genes being 1 as shown in Fig. 5. It
means that there are 17 split (break) points and 18 segments
in the combined line represented by this chromosome.
4.2. Fitness function

4.1. Initial population


In genetic algorithm, a possible solution (a possible combined line for this case) should be encoded as a chromosome with length n (the number of black pixels), which is

Each segment in a combined line represented by a chromosome can be 5tted by a straight line or a circular arc.
Their approximation errors (ds and dc ) can be calculated
using Eqs. (6) and (17), respectively. The smaller error will

128

K.-Z. Chen et al. / Pattern Recognition 36 (2003) 123 130


0 ...
16

010 ...
26

010 ...
22

010 ...

010 ...

18

17

010 ...

010 ...

25

26

010 ...

010......

25

Fig. 5. A chromosome for a combined line.

be recorded as the approximation error of the segment. Thus,


the approximation error (Err(Ci )) for the whole combined
line is the sum of errors of segments in the combined line.
The 5tness function is used for evaluating how well each
chromosome approximates the original shape, and de5ned
for the ith chromosome Ci as [22]:
1
;
(20)
Fit(Ci ) =
Err(Ci ) S k
where S is the total number of segments in Ci , and k is a parameter which can adjust the eMect the number of segments
will have, so that it is possible to obtain the least segments
with least 5tting error. The larger k is, the more eMect the
number of segments will have. For this case, k is selected
to be 0.5. For the chromosome in the initial population of
the combined line shown in Fig. 5, its 5tness function value
is equal to 0.0385.
4.3. Crossover
To create the next generation, new chromosomes, called
oMspring, are formed 5rst using a crossover operator. In
this algorithm, crossover proceeds in three steps. Firstly,
m=2 pairs of chromosomes are randomly picked up from
the mating pool. Secondly, the distance between the two
chromosomes in each pair is calculated using the following
formula:
N

Di; j =
|gi (l) gj (l)|
(21)
l=1

Since the crossover between two similar chromosomes is not


useful for e:cient evolution, the probability of crossover
should be reduced if their distance is smaller, and increased
if their distance is larger. The probability of crossover for
each pair is adjusted according to the following formula [22]:
1
Pc (i; j) =
;
(22)
1 + e(Di; j )=!
where and ! are the parameters which make Pc (i; j) to
change with Di; j in a certain way. The pairs of chromosomes for crossover are then selected by a Roulette selection scheme based on their probabilities calculated. Thirdly,
a pair of crossover points are selected randomly for each selected pair of chromosomes, and the segments bounded by
the crossover points are exchanged.
4.4. Mutation
New chromosomes or oMspring can also be formed using a mutation operator, which involves modi5cation of the
values of genes in a chromosome and increases the variability of a population. In the case when 5tness functions

of chromosomes in a population converge to a small range


or local optimum, it is di:cult for crossover to generate
oMspring with more improved 5tness function values, but
mutation can play an important role for it. In order to 5nd
global optimum rapidly, the probability of mutation should
be increased when the 5tness functions of a population converge to a small range. The probability of mutation can be
adjusted using the formula [23]:

t Fitmax Fit(Ci ) ; if Fit(Ci ) Fit;


Fitmax Fit
Pm =
(23)

t;
if Fit(Ci ) Fit;
where t =0:35; Fitmax is the maximum 5tness function value
in the population, and Fit is the average 5tness function
value of the population. In the mutation process, a random
number in [0; 1] for every gene position within the chromosome string is generated and checked. If the random number
is small than the probability of mutation, the bit values of
the gene is altered, otherwise, it is kept unchanged.
4.5. Selection
After crossover and mutation operations, an elitist selection scheme is used. The chromosome with the highest
5tness function value among the old population and its
oMspring is selected as an elitist and copied directly into
the new population of next generation. With the operation,
natures survival-of-the-5ttest mechanism can be guaranteed. The other chromosomes are selected by a roulette
selection scheme. A roulette wheel, on which each chromosome in the old population and its oMspring is represented
by a slot with slot size proportional to its 5tness function
values, is utilized. The probability, which a chromosome Ci
is selected as a member of the next generation, is:
Fit(Ci )
P(Ci ) = M
;
j=1 Fit(Cj )

(24)

where M = (m + $) and $ is the number of oMspring. The m


selected chromosomes are then entered into a mating pool as
the next generation. The 5rst iteration of genetic algorithm
is thus completed.
4.6. Convergence and control parameters
After the second generation is generated, the above
crossover, mutation and selection operations will be repeated until the best chromosome is obtained. Since the
digital curve is various and the improvement of 5tness is
not always continuous, it is not appropriate to set up the

K.-Z. Chen et al. / Pattern Recognition 36 (2003) 123 130

129

number of iteration or error threshold. In this case, a threshold for the number of generations, which have the same best
chromosomes, is used. That is, if ni n is greater than a
threshold q =20, the iteration process can be stopped, where
ni is the current generation number and n denotes the generation number when the best chromosome, among all generations, is 5rst found. Then the best chromosome can be
output as the optimal solution. For the example of the combined line in Fig. 4, the best combined line represented by
the best chromosome was obtained as shown in Fig. 4(c).
It can be seen that the elliptical arc (AB) consists of two
circular arcs (AH and HB), and that the spline curve (FG)
comprises two circular arcs (FK and LM) and two short
straight-line segments (KL and MG).
4.7. Determination of the relationships between the
segments
In the best chromosome, the point corresponding to the
gene being 1 is a break point. The segment bounded by two
break points has been 5tted by a straight-line or a circular arc
with the least error. The relationship between two adjacent
segments can be determined using the following rules:
(1) If they are both straight-lines, they intersect each other.
(2) If they are both circular arcs, the distance between their
centers will be calculated. When the distance is equal to
the sum of their radii, the two arcs are externally tangent
to each other. If the distance is equal to the diMerence
of their radii, the two circular arcs are internally tangent
to each other. Otherwise, they intersect each other.
(3) If one segment is a straight-line and another a circular
arc, the distance from the center of circular arc to the
straight-line will be calculated. If the distance is equal
to the radius of the circular arc, the straight line is
tangential to the circular arc. Otherwise, they intersect
each other.
With the types of segments and their relationships determined, the combined line can thus be reconstructed.
5. Software prototype
Based on the method introduced above, a software prototype has been made in C++. Many digital curves have been
recognized successfully by using this software prototype. As
an example for it, Fig. 6(c) shows the results of running the
software prototype for a view of a drawing shown in Fig.
6(a). Fig. 6(b) shows its closed region graph for illustration. It is obvious that the recognition method based on the
genetic algorithm is feasible.
6. Conclusions
The research on the conversion from 2D paper drawing
to 3D computer feature model has been stuck in low-level

Fig. 6. An example of digital curve recognition.

coding [24]. One of the reasons for it is that the three phases
of understanding process has been isolated and people have
been doing their research on only one of the phases since
the whole conversion is complicated and more di:cult. For
instance, the vectorization methods for the 5rst phase were
developed only for getting straight lines, arcs, circles, etc. so
that much information contained in the drawing has been lost
after the vectorization. In fact, the understanding processes
for its subsequent 3D reconstruction is an iterative process
for searching diMerent level relationships and performing
corresponding connections. In order to facilitate the iterative processes, a holo-extraction of information from raster
image is needed, and a compact representation of raster image should be generated as a bridge from raster image to
understanding. Such holo-extraction method of information
from paper drawings has been developed [18] by constructing the networks of single closed regions (SCRs) of black
pixels. The networks of SCRs are diMerent from the vectors
recognized by vectorization. A network of SCRs represents
a set of connected segments or elements and contains not
only the information about the related segments themselves
but also the types of linking points among these segments
for diMerent relationships of the related segments (e.g., tangential point, intersecting point, and merging junction) to
provide necessary information for extracting lexical, syntactic, and semantic information in the subsequent phases.
Therefore, the networks of SCRs are the bridges from raster
image to understanding. The recognition method of digital
curves introduced in this paper is developed based on the
new holo-extraction methods and used for subsequent pattern recognition and 3D reconstruction. This method is 5rst
to construct the networks of single closed regions (SCRs)
of black pixels with all the information about both segments

130

K.-Z. Chen et al. / Pattern Recognition 36 (2003) 123 130

and their linking points, to classify all the digital contours or


segments represented by SCRs into three types: straight-line
segments, circular arcs, and combined lines, and then to decompose the combined lines into least basic sub-lines or
segments (straight-line segments or circular arcs) with least
errors using Genetic Algorithms and to determine their relationships (intersecting or being tangential to each other).
In the algorithm, the operation has been improved by using
sparse points, adaptive probabilities of crossover, adaptive
probabilities of mutation, and selection based on enlarged
sampling space (including old population and oMspring). It
is easy to implement evolution based on enlarged sampling
space [21]. Based on the method developed, a software prototype has been made in C++. Many digital curves have
been recognized successfully by using this software prototype. It is veri5ed that the recognition method based on the
networks of SCRs and the genetic algorithm is feasible and
e:cient. This method and its software prototype can be used
as a base for further work on subsequent engineering drawing understanding and 3D reconstruction.
Acknowledgements
The reported research is supported by University Research
Committee Grants (CRCG) in the University of Hong Kong.
The 5nancial contribution is gratefully acknowledged.

References
[1] W. Wan, J.A. Ventura, Segmentation of planar curves into
straight-line segments and elliptical arcs, Graph. Models
Image Process. 59 (6) (1997) 484494.
[2] A. Rosenfeld, E. Johnston, Angle detection on digital curves,
IEEE Trans. Comput. C-22 (1973) 875878.
[3] A. Rosenfeld, J.S. Weszka, An improved method of angle
detection on digital curves, IEEE Trans. Comput. C-24 (1975)
940941.
[4] C.H. Teh, R.T. Chin, On the detection of dominant points on
digital curves, IEEE Trans. Pattern Anal. Mach. Intell. 11 (8)
(1989) 859872.
[5] A.M.N. Fu, H. Yan, K. Huang, A curve bend function based
method to characterize contour shapes, Pattern Recognition
30 (10) (1997) 16611671.
[6] F. Moktarian, A.K. Mackworth, A theory of multiscale-based
shape representation for planar curves, IEEE Trans. Pattern
Anal. Mach. Intell. 14 (8) (1992) 789805.

[7] A. Ratterangsi, R.T. Chin, Scale-based detection of corners


of planar curves, IEEE Trans. Pattern Anal. Mach. Intell. 14
(4) (1992) 430449.
[8] N. Ueda, S. Suzuki, Learning visual models from shape
contours using multiscale convex=concave structure matching,
IEEE Trans. Pattern Anal. Mach. Intell. 15 (4) (1993)
337352.
[9] B. Rosenberg, The analysis of convex blobs, Comput.
Graphics Image Process 1 (1972) 183192.
[10] B. Rosenberg, Computing dominant point on simple shapes,
Int. J. Man-Mach. Stud. 6 (1974) 112.
[11] T. Pavlidis, Polygonal approximation by Newtons method,
IEEE Trans. Comput. C-26 (1974) 860870.
[12] C.M. Williams, An e:cient algorithm for the piecewise linear
approximation of planar curves, Comput. Graphics Image
Process 8 (1978) 286293.
[13] P.Y. Yin, A new method for polygonal approximation using
genetic algorithms, Pattern Recognition Lett. 19 (1998)
10171026.
[14] S.C. Huang, Y.N. Sun, Polygonal approximation using
genetic algorithms, Pattern Recognition 32 (1999)
14091420.
[15] L. Li, W. Chen, Corner detection and interpretation on planar
curves using fuzzy reasoning, IEEE Trans. Pattern Anal.
Mach. Intell. 21 (11) (1999) 12041210.
[16] A. Etemadi, Robust segmentation of edge data. Proceedings
of the Fourth International Conference on Image Processing
and its Applications, April 79, Maastricht, The Netherlands,
IEEE Conference Publication, Vol. 354, 1992, pp. 311313.
[17] P.L. Rosin, G.A.W. West, Nonparametric segmentation of
curves into various representations, IEEE Trans. Pattern Anal.
Mach. Intell. 17 (12) (1995) 11401153.
[18] K.Z. Chen, X.W. Zhang, Z.Y. Ou, X.A. Feng, Holo-extraction
of information from paper drawings for 3D reconstruction,
Computer-Aided Design 34 (9) (2002) 665677.
[19] D. Birkes, Y. Dodge, Alternative Methods of Regression,
Wiley, New York, 1993.
[20] S.M. Thomas, Y.T. Chan, A simple approach for the
estimation of circular arc center and its radius, Comput. Vision
Graphics Image Process 45 (1989) 362370.
[21] M. Gen, R. Cheng, Genetic Algorithms & Engineering Design,
Wiley, New York, 1997.
[22] Z. Guo, Z. Zhuang, Map vectorization algorithm based on
Gas, J. China Univ. Sci. Technol. 28 (4) (1998) 476481.
[23] M. Srinivas, L.M. Patnaik, Adaptive probabilities of crossover
and mutation in genetic algorithm, IEEE Trans. Syst. Man
Cybern. 24 (4) (1994) 656667.
[24] D. Dori, K. Tombre, From engineering drawings to 3D CAD
models: are we ready now? Comput. Aided Des. 27 (4) (1995)
243254.

You might also like