Sie sind auf Seite 1von 6

978-1-4799-2764-7/13/$31.

00 2013 IEEE 555


2013 6th International Congress on Image and Signal Processing (CISP 2013)
A Randomized Circle Detection Method
With Application to Detection of Circular
Traffic Signs
Xiaolan Shen
1
, Jiangxin Zhang
2
, Li-Min Meng
2
, Xiaohong Qian
1
, K.-L. Du
1

1. Enjoyor Labs
Enjoyor Inc.
Hangzhou 310030, China

2. College of Information Engineering
Zhejiang University of Technology
Hangzhou 310023, China
AbstractWe propose an improved randomized circle detection
method. The improved method reduces the computational
complexity of the randomized circle detection method by a factor
of two. We then apply the proposed method to detection of
circular traffic signs. For traffic images taken in complex
scenarios, the colors of interest are first segmented, obtaining
potential regions of traffic signs. By applying edge detection and
improved randomized circle detection method, traffic signs can
be exactly located. Experimental results show that the proposed
method has a small computational requirement for natural
scenes under different lighting conditions and it can fast and
accurately locate circular traffic signs. It can also position
circular traffic signs with occlusions and variations in shape,
size, and color.
KeywordsColor segmentation, randomized circle detection,
improved randomized circle detection, traffic sign detection.
I. INTRODUCTION
For in-vehicle driving-assistance systems, a quick and
accurate identification of traffic signs is of practical
significance for driving safety and to avoid traffic accidents.
To achieve accurate recognition of traffic signs, it is necessary
first to locate them from natural scene images and then to
recognize them. Traffic signs are fabricated in standard colors
and shapes to maximize its distinction from natural and
artificial backgrounds, such that drivers can easily capture
them.
Detection of traffic signs can be based on color features, on
shape features, or on a combination of both. In the direct
color-thresholding method [1], traffic signs are segmented in
RGB space, and then are further determined through analyzing
the contour of the target area. In [2], two look-up tables in HIS
(hue, saturation, intensity) color space are designed for
segmentation of red and blue colors, and genetic algorithm is
then used for searching in the designated space to locate the
traffic signs [2].
Hough transform [3] can be used for detection of lines,
circles and other geometric shapes. Circular Hough transform
(CHT) is a widely used circle detection method. It is
characterized by high reliability, even under the settings of
noise, deformation, and shape incompleteness. It has high
requirements on computational complexity and storage. In [4],
Hough transform is used to detect traffic signs, but it is only
suitable for detecting the signs in the preset area, and the
computational complexity is high. Randomized Hough
transform (RHT) [5] randomly samples points on the image of
edge information, leading to a reduction in computational
complexity and memory overhead. However, RHT method is
still based on accumulation in parametric space, thus facing the
problems of time complexity and storage space [5].
Randomized circle detection (RCD) method [6] is based on the
RHT idea, rather than on the idea of Hough transform. It uses
the hypothesis-testing mechanism to detect possible circles.
Due to the avoidance of accumulation in parametric space and
the direct calculation of hypothetical circles in the original
image space, the efficiency and accuracy have been improved.
Compared to Hough transform and RHT, RCD method has
very low storage requirement, real-time speed and better noise
resistance [7].
Drivers' or pedestrians' negligence of traffic signs results in
a lot of traffic accidents. In this paper, we propose a novel
positioning method for circular traffic signs. To avoid the
effect of lighting conditions, weather changes and other factors
on traffic signs, we first convert the image in RGB color space
into HSV space, and then segment circular traffic signs based
on color features. For circle detection in the image of edge
information, we first extract candidate circles from the
accumulation process of random sampling, then use the
accumulated evidence to verify the existence of circles, and
finally determine the exact number and locations of them. We
use images in different natural scenarios to verify the method.
II. CIRCLE DETECTION METHOD
Shape-based detection of traffic signs is a slow process
because it must calculate for each pixel of the image. After
color segmentation, many interfering contents have been
removed. In order to further reduce the computational
complexity, we perform median filtering on the resulted image
(x, y) , and obtain the image g(x, y) = meuian{(x -
k, y - l), (k, l) e V], where V is a 33 template. Median
filtering is very effective in the elimination of grain noise, and
it protects the edge information. Sobel operator is then used for
edge detection. Finally, a binary image of the target edge is
obtained.
556

(a) (b)
Figure 1. (a) Randomly sampling four points can determine four circles.
(b) Four concyclic points on a candidate circle C
]k
.
A. Randomized Circle Detection
The basic idea of RCD [6] is described here. Randomly
sampling four points from the edge image, a distance criterion
is used to determine whether they form a candidate circle.
Testing of a candidate circle needs to randomly draw four
circles, as shown in Fig. 1, and then evidence is accumulated
to determine whether the candidate forms a true circle.
If V is a point set in the edge image, randomly sampling
four points, of which the first three points (x
m
, y
m
) ,
m = i, ], k, identify a circle C
]k
, with center (o
]k
, b
]k
) and
radius r
]k
, so that they satisfy
(x
m
- o
]k
)
2
+ (y
m
- b
]k
)
2
= r
]k
2
, m = i, ], k. (1)
Equation (1) can be rewritten as
2x
m
o
]k
+ 2y
m
b
]k
+ J
]k
= x
m
2
+ y
m
2
, (2)
where J
]k
= r
]k
2
-o
]k
2
-b
]k
2
.
Three non-collinear points can determine a circle. In order
to prevent any two of the three points being too close to detect
a real circle, set a threshold I
dmIn
. Generally, I
dmIn
= o
0

min(rows, columns), o
0
e (1 6u , 1 4u ) for image size
iows columns. Only when the distance between any two of
the three points is greater than I
dmIn
, we can calculate the
parameters of the circle determined by the three points.
Substituting (x
m
, y
m
) , m = i, ], k into (2), we get three
simultaneous equations, from which circle parameters o
]k
,
b
]k
, r
]k
are obtained.
The computational complexity is relatively high when
solving three simultaneous equations for the circle parameters.
The center of a circle can be obtained as the intercept of
perpendicular bisectors of two circle chords, as shown in Fig.
2. When the points :

= (x

, y

) , :
]
= (x
]
, y
]
) , :
k
=
(x
k
, y
k
) are concyclic, the midperpendicular equations are
given by
_
y -

i
+
]
2
= k
]
(x -
x
i
+x
]
2
)
y -

]
+
k
2
= k
]k
(x -
x
]
+x
k
2
)
, (3)

Figure 2. Properties of circle chord
where k
]
=
x
i
-x
]

]
-
i
, k
]k
=
x
]
-x
k

k
-
]
. In case when k
]
= k
]k
or
y
]
= y

or y
k
= y
]
, we need to resample three points and
repeat the procedure.
From (3) we can obtain center (o
]k
, b
]k
) , radius
r
]k
= (x

- o
]k
)
2
+(y

- b
]k
)
2
, and the distance from a
fourth point :
I
= (x
I
, y
I
) to circle C
]k
is J
I-]k
=
|(x
I
- o
]k
)
2
+(y
I
-b
]k
)
2
- r
]k
|.
Ideally, if the four sampled points are on the same circle,
the distances of the four points to the circular contour are zero.
Taking into account the quantization error of the digital image,
one can set a threshold I
d
e (1,S). If any of J
-]kI
, J
]-kI
,
J
k-]I
, J
I-]k
is less than I
d
, then the circle is treated a
candidate circle.
After finding a candidate circle C, initialize a counter
count. Calculate distance J
p-C
, p e V from every point p
that belongs to the point set V of the edge image to C. If
J
p-C
< I
d
, then count = count + 1.
A circle completeness threshold I

e (u.2,u.8) is set. If
count > 2r
]k
I

, treat the candidate circle as the true circle


and remove the points of the circle from the edge point set V.
B. Probability Analysis of Random Circle Detection
A random sample of four points can be a valid selection
only when the four sampled points are on the same circle.
Thus, there must be a large number of invalid selections for the
same circle. The time complexity is controlled by the number
of parameters calculated before a candidate circle is found and
the accumulated number of evidence for circle candidates. The
sample number also determines the success rate of detection.
Assume that there are three circles (A, B, C) of different
sizes in an image, and further assume that the numbers of the
points on the circles be N
1
, N
2
, N
3
, and that of the noisy
points be N
4
. The probability of the a random sample of four
points being on circle A is
P
A
=
N
1
(N
1
-1)(N
1
-2)(N
1
-3)
N
i
4
i=1
( N
i
4
i=1
-1)( N
i
4
i=1
-2)( N
i
4
i=1
-3)
= _
N
1
N
i
4
i=1
]
4
. (4)
u
k

(o
]k
, b
]k
)
u
]

u


u
k

u
]

u


C
]k
u
I
u
k

u
I

u
]

u


557
Similarly, we have
P
B
= _
N
2
N
i
4
i=1
]
4
, P
C
= _
N
3
N
i
4
i=1
]
4
. (S)
Then the effective probability for a valid sample of four points
is
P = P
A
+ P
B
+ P
C
=
N
i
4 4
i=1
( N
i
4
i=1
)
4
. (6)
Assume that the numbers of the points on the three circles
are the same as that of noisy points, that is, N
1
= N
2
= N
3
=
N. Then we can get P = (14)
3
. If there are S circles in an
image, the effective probability is P = 1(S +1)
3
. Thus the
minimum number of samples for testing a candidate circle can
be set as 1P. If there are n effective samples on the same
circle, then there are 4n points concyclic; when n 2, the
possibility of this candidate being a true circle is very large.
We can select the minimum number of samples for verifying
the true circle K = 2S(2S - 1)|S(
2
1
)P] = (S +1)
3

(2S - 1) when n = 2. For the actual detection process,
according to the level of noise, the number of samples can be
empirically set as 2K~8K such that a circle can be
successfully detected.
III. IMPROVED RANDOMIZED CIRCLE DETECTION
METHOD
RCD method generates good results when detecting
circular contours under noise. However, the detection speed
and precision reduce in case of deformation, incompleteness of
circles, and too much noise. We improve the algorithm by the
sampling constraint condition and the setting of the distance
ratio threshold.
A. RCD Using Distance Constraint
The probability analysis given above shows that the
probability of invalid sampling is much greater than that of
valid sampling. The accumulation of invalid sample group
means that the calculations of the circle parameters and the
evidence accumulation of candidate circles are increased, thus
reducing the probability of invalid sampling can increase the
detection speed.
We propose a simple idea of sampling distance constraint:
while the sampling probability is uniformly random, the point
distribution in the edge image is not uniform. Points on a circle
are concentrated in a particular region. Assume that we first
sample one point on the circle and then randomly sample three
points. If the distances of the three points to the first point are
less than the threshold I
dmax
(ideally set the maximum
diameter of the circle r
max
), calculate for these four points;
Otherwise, do not calculate for the four points. This effectively
reduces the number of testing of the candidate circles when the
distances from the three points to the first point are greater
than this threshold. Through a priori knowledge of the actual
detection process, this area constraint is easy to implement. We

(a) Coin (b) Planet (c) Gobang (d) Cake
Figure 3. Images for benchmarking
TABLE I. RCD METHOD. THOSE RESULTS UNDERLINED ARE FOR RCD
METHOD WITH DISTANCE CONSTRAINTS
Coin Planet Gobang Cake
N
P
22,404 7,793 13,254 8,874
9,374 2,492 9,118 4,847
N
c
1,093 925 726 529
304 282 339 187
can set I
dmax
= ]1,
1
2
,
1
4
,
1
8
min(rows, columns) according
to the size of an actual circle in the image, and the image size
is rowscolumns. For detection of traffic signs, the size of
circular traffic signs is related to the angle and distance of the
camera, and we can set I
dmax
=
1
4
min(rows, columns).
When the circle diameter is known, it can be set as the
maximum threshold.
The distance constraint-based method randomly selects
four points, points 1 to 4, on the circle. If the distances to point
1 satisfy J
-1
< I
dmax
, i = 2,S,4, the point set is valid, and
continue to determine the candidate circle; Otherwise, the
point group is invalid, and next sampling is needed.
We use four images of size 282282, as shown in Fig. 3,
as the test images. The CPU frequency is 1.66 GHz. Table 1
gives the number N
P
of calculations of circle parameters
required for successfully detecting all circles using the RCD
method and the number N
C
of candidate circles required for
the fourth point being on the circle determined by the first
three points. Table 1 also gives the results using the RCD
method with the distance constraint. As seen from Table 1, the
number of calculations of the circle parameters and the number
of candidate circles is significantly reduced when using RCD
with the distance constraints.
B. Analysis of RCD Parameter Settings
Use the distance threshold I
d
and the circle completeness
threshold I

in the candidate circle testing process. Within


T
d
, a point is denoted as the effective point on the circle. If the
circle completeness parameter reaches the threshold, the
candidate circle is treated as the detected circle. There is a
deviation between the detected parameters and the real
parameters due to a combination of the two thresholds, as
shown in Fig. 4a.
558

(a) (b)
Figure 4. (a) A deviation between the detected circle and the real circle.
(b) Deformed circles are detected by adjusting the ovality. The solid lines
denote real circles, while the dotted lines denote detected circles.
TABLE II. COMPARISON OF DETECTION TIME FOR THE THREE METHODS
RHT (s) RCD (s) IRCD (s)
Coin 1.257 0.9962 0.5452
Planet 0.983 0.7783 0.4926
Gobang 0.891 0.5856 0.2647
Cake 0.834 0.5398 0.2490

During the testing of candidate circles, we use the distance
threshold and the ratio threshold to verify whether it is the true
circle. In practice, the size and completeness may be different
for different circles. If we set the distance of the candidate
circle (the distance I
d
from the fourth point to the candidate
circle) and the testing distance as fixed values, it is
unreasonable to verify circles of different sizes. Relative
ovality is defined for evaluation of roundness of a circle
0

1uu%, (7)
where r is the radius of the candidate circle, and r is the
radius deviation. When 0

is given, we can define an annular


region
_L_ [r -

2
o
2
+ b
2
[r +

2
_, (8)

where (o, b) is the center of the candidate circle. As long as a
point in the edge image is within this ring, the point is treated
as a valid point; thus improving the probability of being on the
ring. Before detection, set 0

to define the circle contour. This


parameter is not related to the size of the contour.
Depending on the viewing angle, the circular shape may
deform into oval shape, as shown in Fig. 4b.
As long as a point is within the ring, it is verified to be on
the true circle. A reasonable value of r can be set to rectify
the circle that is deformed within the ring L, and then the
circle with radius r is detected. In the testing phase of real
circles, we do not need to test all points in the edge image, but
directly accumulate the edge points in the ring; if it meets the
ratio threshold for being concyclic, the ring can be confirmed
as a true circle.
Algorithm 1 [IRCD]
while < F, |V| > N
mIn

Randomly select four points u

, u
]
, u
k
, u
I
;
if J
-]
, J
]-k
, J
k-I
and J
I-
> I
dmIn
then
if J
-]
, J
]-k
and J
k-
< I
dmax
then
calculate center (o
]k
, b
]k
), radius r
]k
of circle C
]k

by (3);
create ring L:
_L_ [r
]k
-

2
o
]k
2
+ b
]k
2
[r
]k
+

2
_;
if u
I
is on circle C
]k
, then
accumulate the count of edge points in ring L;
if count 2nr
]k
I

then
circle C
]k
is real circle;
remove the points on circle from |V|;
- u;
else
- +1;
end
else
- + 1;
end
else
- +1;
end
else
- + 1;
end
end

Improved randomized circle detection (IRCD) algorithm
is described as Algorithm 1.
In IRCD algorithm, is a sample counter, F is the
maximum number of samples allowed for detecting a circle,
|V| is the size of the set of remaining edge points, N
mIn
is
the minimum number of edge points required for determining
whether an assuming circle is a true one, I
dmax
and I
dmIn

are, respectively, the maximum and minimum distances
allowed between two points, and I

is a threshold for the


circle completeness parameter.
C. Performance Comparison of RHT, RCD, and IRCD
We experiment on the images given in Fig. 3 with the
RHT, RCD and IRCD methods, respectively. The time for
detection is given in Table II. It is seen that about the IRCD
r
559

(a) Coin (b) Planet (c) Gobang (d) Cake
Figure 5. Detection results of IRCD

(a) Gobang (b) Cake
Figure 6. RCD generates a deviation from the correct results
TABLE III. COLOR CLASSIFICATION THRESHOLDS IN HSV SPACE
Component /color
of traffic signs
R B Y
H E
R
< u.u2S
or E
R
> u.8u
u.S1 < E
B
< u.67
u.118 < E
Y
< u.6u
S S
R
> u.Su S
B
> u.Su S
Y
> u.6u

detection speed is twice that of RHT or RCD. From Figs. 5
and 6, IRCD can avoid the deviation problem faced by RCD.
IV. DETECTION OF CIRCULAR TRAFFIC SIGNS
Color segmentation and shape detection are two important
methods for traffic sign detection. For grayscale images, shape
detection is commonly used; this approach has a high
computational complexity. For color images, color
segmentation is usually used, and this approach requires a
suitable filter to filter out the color traffic signs from a
complex background; however, the color is easily distorted,
and is susceptible to interference of surroundings [8].
An analysis of the combined color and shape detection
method concludes:
1) The color of a traffic sign is strictly designed, thus color
segmentation can roughly detect potential traffic sign regions
and remove most of the interfering background;
2) The operation of the entire image at pixel level leads to a
high computational complexity for shape detection. By
converting it into a binary image and eliminating noise, the
computational complexity will be greatly reduced. Circle
detection is effective for locating the circular traffic signs.
A. Color Segmentation in HSV Color Space
The color images acquired by a camera are stored in RGB
format. In RGB color space, the R, G, B components have a
high degree of correlation, they are influenced by surface
reflectance and light intensity; thus RGB color space is not
suitable for accurate segmentation of the traffic sign images in
Algorithm 2 [Color segmentation]
Initialization. Convert RGB space into HSV space, and
normalize E, S, I to [0,1].
for all the pixels in the E component
if ( S
R
> u.S and S
B
> u.S) then
if (E
R
< u.u2 or E
R
> u.8S) and
(u.S8 < E
B
< u.6S) then
R(i, ]) = 0(i, ]) = B(i, ]) = 2SS;
else
R(i, ]) = 0(i, ]) = B(i, ]) = u;
end
R0B = {R, 0, B];
end
end

complex natural scenes. It is necessary to convert the
components in RGB space into a color space wherein the
components are uncorrelated. We choose HSV color space,
which is close to human experience and perception, for color
segmentation. HSV space has three components, namely E
(hue), S (saturation), and I (lightness).
According to the provisions on the colors of traffic signs
[9] and based on 3000 natural scene images with traffic signs
under a variety of weather conditions, Li [10] determines the
color thresholds in HSV color space, as given in Table 3.
These thresholds are normalized to the interval [0,1]. E
R
, S
R
,
E
B
, S
B
, and E

, S

are the respective component values for


red, blue and yellow traffic signs, as shown in Table III.
Existing circular traffic signs include the categories of
prohibition signs, speed limit signs and directional signs.
Their color characteristics are defined by
Prohibition signs have a red rim;
Speed limit signs have a red rim;
Directional signs have a blue background.
For real traffic RGB images, the color segmentation
algorithm first converts RGB space into HSV space, and the
obtained components are further normalized to |u,1]. In
consideration of Tables IV and the color characteristics, we
performed a large number of experiments, and set the range
of red and blue components. The color segmentation
algorithm is given in Algorithm 2.
Utilizing the color features that circular traffic signs have
unique red rim and blue background, the background areas that
have great color difference from the target area can be
removed. A circle detection method can be further used to
accurately locate the regions of circular traffic signs.
B. Implementation of IRCD-based Detection
In this paper, a combination of color segmentation and
shape detection is used for fast and accurate positioning of
traffic signs. Based on experiments with IRCD, one can set
I
dmax
= 14 min(rows, columns), I
dmIn
= 148 min
(rows, columns) , 0

= 11u.
560

(a) RGB image (b) Extraction of red /blue regions (c) After median filtering

(d) Edge detection (e) Result
Figure 7. An illustration example.
The sample number required for detecting a circle is SK,
with K = S77S for a maximum of six circles. As the edge
points are within small regions, the number of remaining
points can be set to N
mIn
=100. If the point set size is smaller
than N
mIn
, terminate the detection process.
For positioning circular traffic signs, an image is first
converted from RGB to HSV space, and then median filtering
and edge extraction are subsequently applied. Circle detection
is performed to locate circular traffic signs. Figure 7 gives an
illustration example of the procedure.
C. Analysis of Positioning Experiments of Circular Traffic
Signs
We experiment the proposed algorithm on a number of
real images with circular traffic signs. The image size is
1280960.
Figure 8 shows some experimental results, wherein
circular traffic signs are marked with blue circles. The
results are for dark light (Fig. 8a), strong light (Fig. 8b), and
slightly deformed circular signs (Fig. 8f), respectively. The
experiments use MATLAB and a CPU with a clock of 1.66
GHz. The total positioning time for each image is 4 to 5 s.
The proposed method is used for images in complex
natural background, where circular traffic signs scale to
different size, and for image with geometrically deformed
traffic signs. It can accurately locate the traffic sign regions,
as shown in Fig. 8. The method also achieves robustness to
illumination.
V. CONCLUSIONS
Real-time accurate positioning of traffic signs is the premise
for correctly recognizing them. By combining color
segmentation and shape detection, we propose a positioning
method for circular traffic signs. We improve RCD method
by constraining sampling conditions and setting thresholds,
yielding IRCD method. Positioning of circular traffic signs
is implemented in three steps: (1) Perform color

(a) (b) (c)

(d) (e) (f)
Figure 8. Detection results for circular traffic signs
segmentation in HSV space, and extract the regions of
interest; (2) Apply median filtering on the image of extracted
regions, and then perform edge detection through Sobel
operator; (3) Apply IRCD method for circle detection in the
edge image. The experimental results indicate the
effectiveness and adaptability of the method for positioning
circular traffic signs in natural scenes under different
lighting conditions, variations in size and color, as well as
with geometric distortion due to the view angle.
REFERENCES
[1] A. de la Escalera and J. M. Armingol. Visual sign information
extraction and identification by deformable models. IEEE Transactions
on Intelligent Transportation Systems, 5:2 (2004), 57-68.
[2] B. Cyganek. Colour Image Segmentation with Support Vector Machines
for Road Sign Recognition. Technical Report, AGH-University of
Science and Technology, 2007.
[3] X. Shen, J. Zhang, S. Yu, L. Meng, and K.-L. Du. An improved
sampling strategy for randomized Hough transform based line detection.
In: Proc. IEEE International Conference on Systerms and Informatics
(ICSAI), Yantai, China, 2012, 1874-1877.
[4] M. A. Garca-Garrido, M. A. Sotelo, and E. Martn-Gorostiza. Fast road
sign detection using Hough transform for assisted driving of road
vehicles. In: Lecture Notes in Computer Science 3643, Springer, Berlin,
2005, 543-548.
[5] L. Xu and E. Oja. Randomized Hough transform (RHT): Basic
mechanisms, algorithms, and computational complexities. CVGIP:
Image Understanding, 57 (1993), 131-154.
[6] T. C. Chen and K. L. Chung. An efcient randomized algorithm for
detecting circles. Computer Vision and Image Understanding, 83:2
(2001), 172-191.
[7] K. L. Chung, Y. H. Huang, S. M. Shen, A. S. Krylov, D. V. Yuriny, and
E. V. Semeikina. Efcient sampling strategy and renement strategy for
randomized circle detection. Pattern Recognition, 45 (2012), 252-263.
[8] A. Broggi, P. Cerri, P. Medici, and P. Paolo. Real time road signs
recognition. In: Proc. IEEE Intelligent Vehicles Symposium, Istanbul,
Turkey, 2007, 981-985.
[9] J. L. Yang, and H. X. Liu. GB 5768-1999, Road Traffic Signs and
Markings. China Standards Press, 2000.
[10] L. Li and G. Ma. Detection and classification of traffic signs in natural
environments. Journal of Harbin Institute of Technology, 41:11 (2009),
pp. 682-687.

Das könnte Ihnen auch gefallen