The ball appears in every image as a white semicircle with a slope that depends on the direction of the sun (see fig. 4). For this reason we have modified the.
A Ball Detection Algorithm for Real Soccer Image Sequences T. D’Orazio, N. Ancona, G. Cicirelli, M. Nitti Istituto Elaborazione Segnali ed Immagini - C.N.R. Via Amendola, 166/5 - 70126 Bari (Italy) email:(dorazio/ancona/cicirelli/nitti)@iesi.ba.cnr.it
Abstract A large number of methods for circle detection has been studied in the last years for numerous image processing applications. The application domain considered in this paper is the soccer game. To identify the ball in soccer images is very important in order to evaluate the goal event. This domain is challenging as a great number of problems has to be managed, such as occlusions, shadows, objects similar to the ball, real time processing. Aim of this work is to present the results of a number of experiments obtained by using a modified version of the directional Circle Hough Transform. Different lighting conditions have been considered since they introduce strong modifications on the appearance of the ball in the image: when the image sequences are taken with natural light the ball appears as a spherical cap then the search of the ball has been modified in order to manage those situations. A large number of experiments has been carried out showing that the proposed method obtains an high detection score.
1 Introduction The detection of circles in digital images is one of the most important problems in visual industrial applications as circular objects occur frequently in many natural and manmade scenes. A number of techniques have been applied in the last decade. The Circle Hough transform (CHT) and several modified versions have long been recognized as robust techniques for circle detection and have been largely applied by the scientific community [5, 6]. The basic idea of the HT is to detect parameterized curves in images by mapping edge pixels into manifolds in the parameter space; methods that find peaks in the parameter space can be used to detect the image curves [8, 3]. Many researchers have been working on CHT in order to reduce the computational complexities, the memory requirements, and the inaccuracies in case of excessively noisy images [4, 7, 2]. The above circle detection methods works well if they are applied in known environments with controlled light and on a known
background. In this work we have developed a fast and robust circle detection method that works well on real images with variable light conditions and non-controlled backgrounds. Experimental results have been collected in a real application domain: the soccer game. Automatic ball recognition in the television image sequences is a fundamental task to solve: a number of doubtful cases occurs during the game especially for detecting the outside event and the goal event. An automatic method that detects in each image of the sequence the ball position is the first and the most important step for building a decision support tool for the referee committee during the game. The soccer domain is challenging as a great number of problems have to be managed such as occlusions, shadows, objects similar to the ball, real time processing. The ball detection method has to be very simple as a great number of images per second must to be processed. However, if some a-priori information is available, it can be explicitly included in the search procedure to reduce interpretation and computational time cost. Knowing the camera parameters (position, focal length,..) a range of possible dimensions of the ball are available; besides the environmental conditions (natural or artificial lights, orientation of the stadium...) allow a prediction of the ball appearance in the images. In this paper we have implemented a circle detection algorithm based on the Circle Hough Transform formulated as convolutions applied on the edge magnitude image [1]. The convolution kernels have been modified in order to detect the most completed circle in the image (being independent from the edge magnitude) and to detect also the spherical cup with different orientations.
2 Circle detection The Circle Hough Transform (CHT) aims to find circular patterns of a given radius R within an image. Each edge point contributes a circle of radius R to an output accumulator space. The peak in the output accumulator space is detected where these contributed circles overlap at the center of the original circle. In order to reduce the computational burden and the number of false positives typical of the CHT a number of modifications have been widely im-
1051-4651/02 $17.00 (c) 2002 IEEE
[1] and our scaled version. In figure 2, it is evident that our operator detects the peak correctly on the ball, while the not scaled version detects the peak on the ”O” of the ”SONY” advertising poster.
Figure 1. An image and the corresponding gradient module of a TV-sequence
plemented in the last decade. The use of edge orientation information limits the possible positions of the center for each edge point. In this way only an arc needs to be plotted perpendicular to the edge orientation at a distance R from the edge point. The CHT and also its modifications can be formulated as convolutions applied to an edge magnitude image (after a suitable edge detection) [1]. We have defined a circle detection operator that applied over all the image pixels produces a maximal value when a circle is detected . with a radius in the range
'
,
-
,
4
4
,
/
"
$
%
'
)
+
+
1
1
+
!
(1)
5
6
1
Figure 2. The peaks obtained with the original operator and our scaled one.
The kernel vector contains a normalization factor (the division by the distance of each point from the center of the kernel) that is fundamental in order to have the same values in the accumulation space when circles with different radius in the admissible range are found. Besides the normalization assures that the peak in the convolution result is obtained for the most complete circle and not for the greatest in the annulus. The last consideration concerns the division in equation (1) by which guarantees whatever the final result of our operator in the range radius are considered in the process. The masks that implement the kernel vector are shown in reference system figure 3, considering the traditional of the matrix image. The dimension of these masks is and essentially they represent in each point the direction of the radial vector scaled with the distance from the center. The convolution between the gradient versor images and the masks evaluates how many points in the image have the gradient direction that concords with the gradient direction of a range of circles. Then the peak in the accumulator array gives the candidate center of the circle in the image.
5
6
1
1
where the domain
?
A
B
+
9
j
h
h
A
A
J
,
A
A
K
E E
+
1
1
c
5
l
(2)
J
l
h
5
is the gradient versor '
)
$
P
P
R
(3)
'
)
B
B
B
B
P
P
'
/
and
is the kernel vector $ $
R
Z
[
\
]
_
\
Z
[
\
]
_
J
l
h
'
T
V
X
Y
Y
c
/
`
`
J
A
J
A
A
A
f
(4)
2.1 Circle Detection with self-shadow
The use of the gradient versor is necessary in order to have an operator whose results are independent from the intensity of the gradient in each point. Indeed we want to be sure that the circle detected in the image is the most completed in terms of contour and not the most contrasted in the image (see figure 1). Indeed it may happen that a circle not well contrasted in the image gives a convolution result lower than another object not exactly circular but with a greater gradient; in this case different results are obtained after the convolution with the original operator suggested by
operator has good performance if the cirThe cle is well contrasted over the background, but unfortunately this is not a real situation when light produces selfshadowing effects on the circle. We have applied the program on soccer sequences taken with natural light. The ball appears in every image as a white semicircle with a slope that depends on the direction of the sun (see fig. 4). For this operator in order to reason we have modified the has detect semicircles with different orientations. been defined as follows
1051-4651/02 $17.00 (c) 2002 IEEE
'
/
/
n
Figure 3. The masks that implement the kernel vector in the domain . '
/
9
Figure 5. The masks that implement the kernel in the domain . vector '
/
t
u
{
% |
w !
y
!
{
% |
w
!
}
y
!
} R
$
$
Z
[
\
+
r
c
'
/
oq
n
q
R
q
+
1
\
+
1
q
V
X
Y
Y
c
q
B
B
E
]
1
Z
[
\
+
A c
Z
)
)
q
q
X
c
Y
q
q
qs
where is the slope of the semicircle diameter. In figure 5 the new kernels for the detection of semicircles with a degree are shown. diameter slope of The slope of the semicircle diameter can be dynamically modified as soon as the light conditions changes in order to detect the ball during the whole match. We have compared the results obtained on the same sequences with the initial version of our algorithm and the modified one with the shadow information. There is a great increase of the performances. For this reason in the experimental phase for each image sequence we have applied the proper masks in order to obtain the maximum detection rate. +
1
h
9
SEQ 1 2 3 4 Image Tot. Det. Rate
Figure 4. An image acquired with natural light
n
# of im. 117 10 10 47 184
AA detec. 71 2 0 0 73 39%
MAA detec. 29 1 4 8 42 22%
Table 2. The performances of AA and MAA on images with occluded ball with artificial light condition.
been compared with the one suggested by [1] using preprocessed sequences of images. Supposing that the camera is in a fixed position, the background subtraction produces sequences of images where only the moving structures are highlighted. In this way the circle detection programs do not produce false detections on fixed circular structures of the environment (such as advertising poster), but they can give false positive detections only on moving players. The image partial derivatives have been estimated by convoluting the image with the derivative of the Gaussian kernel.
3 Experimental results The test has been repeated on different sequences of images taken by a camera connected to a S-VHS videorecorder, during a training match. Our algorithm has
SEQ 1 2 3 4 Image Tot. Det. Rate
# of im. 158 78 150 203 589
AA detec. 135 43 131 47 356 60%
MAA detec. 141 71 150 181 543 92%
Table 1. The performances of AA and MAA on images with the complete ball with artificial light condition. In the following the Atherton Algorithm will be referred
1051-4651/02 $17.00 (c) 2002 IEEE
with AA, while our proposed algorithm will be denoted with MAA (Modified Atherton Algorithm). Twelve sequences have been considered in the testing phase: four sequences have been taken with artificial light and the ball appears as a complete circular shape; eight sequences have been taken with natural light then the ball, due to the self shadow effect, appears as a semicircle in every image. Besides for each sequence we have counted the number of images containing the complete ball, and the number of images containing the occluded ball (we have considered only of the images where the occlusion do not overcome the ball). The results obtained on the four sequences with artificial light using the masks of figure 3 are shown in tab. 1 and 2. The results obtained on sequences with natural light using the masks of figure 5 are shown in table 3 and table 4.
SEQ 5 6 7 8 9 10 11 12 Image Tot. Det. Rate
# of im. 100 58 75 164 30 66 30 61 584
detec. 13 55 17 164 30 65 30 61 435 74%
detec. 90 55 74 164 30 65 30 61 569 97%
Table 3. The performances of and on images with natural light condition using masks of fig.5.
The performances of the AA and MAA are different on images with the complete ball and with the occluded ball. In the first case the MAA algorithm gives always an high detection rate because the most completed balls in terms of direction of contours are easily found. The AA algorithm fails on a greater number of images as the intensity of the gradient produces maximum values on more contrasted parts of the image such as the jersey of the players. Different considerations can be done when the ball is occluded: the performance of both the algorithms greatly decreases since the number of points that matches the searched pattern can be very small. In this case the gradient information (AA) produce better results then the MAA. However the results obtained on occluded ball can be greatly improved if the tracking of the ball is considered. In a more extended version of this paper we show that the tracking produces high detection rate also when small portions of the ball are visible in the images. The software has been implemented by using Visual C++ on a Pentium III 1 Ghz without any pro-
cessing specialized hardware. Although not all the code optimization have been completed the actual processing time seems encouraging for a real time implementation. The propixels takes ; if the cessing of an image of tracking of the ball is considered processing time decreases . Future work will be addressed to the optimization to of the detection algorithm in order to process in real time . 5
5
h
h
¡
Y
¡
Y
¢
5
5
[
¡
)
£
)
Y
V
¢
SEQ 5 6 8 9 10 11 12 Image Tot. Det. Rate
# of im. 29 11 6 70 3 68 119 306
detec. 0 4 6 70 1 11 110 202 66%
detec.
7 2 6 26 1 36 101 179 58%
Table 4. The performances of and on images with occluded ball with natural light condition using masks of fig.5.
References [1] T. Atherton and D. Kerbyson. Size invariant circle detection. Image and Vision Computing, 17(11):795–803, September 1999. [2] N. Bennet, R. Burridge, and N. Saito. A method to detect and characterize ellipses using the hough transform. IEEE Transactions on Pattern Analysis and Machine Intelligence, 21(7):652–657, July 1999. [3] E. Davies. A modified hough scheme for general circle location. Pattern Recognition Lettrs, 7:37–43, 1988. [4] J. Goulermas and P. Liatsis. Genetically fine-tuning the hough transform feature space, for the detection of circular objects. Image and Vision Computing, 16(9/10):615–625, July 1998. [5] J. Illingworth and J. Kittler. A survey of the hough transform. Computer, Vision, Graphics, Image Processing, 44:87–116, 1988. [6] V. F. Leavers. Survey: Which hough transform. Image Understanding, 58:250–264, 1993. [7] C. Olson. Constrained hough transforms for curve detection. Computer Vision and Image Understanding, 73(3):329–345, March 1999. [8] R.O.Duda and P.E.Hart. Use of hough transformation to detect lines and curves in picture. Communication of the ACM, 15:11–15, 1972.
1051-4651/02 $17.00 (c) 2002 IEEE