You are on page 1of 8

An Efficient Algorithm for Detection of Soccer Ball

and Players

M. M. Naushad Ali, M. Abdullah-Al-Wadud and Seok-Lyong Lee
*


Department of ndustrial and Management !ngineering
"ankuk #ni$ersity of %oreign Studies, &!'#(L) of *+&!A
naushad,iut-yahoo..om, /adud-hufs.a..kr, sllee-hufs.a..kr
Abstract: n this paper /e propose an effe.ti$e algorithm for dete.tion of a so..er ball
and players. n the .urrently a$ailable methods, the ball may not be dete.ted /hen it is
atta.hed to the lines in the ground. 0o o$er.ome this problem, /e introdu.e a method to
separate lines from the ball and segment the ball effe.ti$ely. At first /e dete.t the ground
and the edges of the original image. 0hen an effi.ient line dete.tion method is applied, and
finally players and a ball are e1tra.ted. 0he e1perimental results sho/ that our algorithm is
robust /hen the ball is atta.hed to the line.
Keywords: (all dete.tion, Line "ough transform, mage analysis, +b2e.t &e.ognition
1 Introduction
n the field of ma.hine $ision, dete.tion of mo$ing ob2e.ts is an interesting and diffi.ult
issue. Mo$ing ob2e.t dete.tion is applied in different appli.ation areas su.h as medi.al
image pro.essing, human tra.king, traffi. system monitoring and sports $ideo analy3ing.
No/adays, sports $ideo is one $ery popular resear.h area, /hi.h in$ol$es players4
mo$ement analysis, ta.ti.s, referee4s de.isions, and so forth. So, automati. dete.tion of
players and a ball in the so..er $ideo is notably important 567. #sually, the .olor 587 and
shape 597 are used to segment the ball. 0he method proposed in 5:7 tra.ks the ob2e.ts
present in the s.ene and .onsiders the ob2e.t that is tra.ked for the longest time as the ball.
"o/e$er, these simple features may fail to dete.t the ball /hen similar ob2e.ts su.h as
so.ks of the player, and the ground line appear in the s.ene.

A tra2e.tory-based algorithm is proposed in 5;7 to estimate the ball .andidates in ea.h
frame based on the si3e. A .ir.le dete.tion algorithm based on .ir.le "ough 0ransform is
proposed in 5<7 to dete.t the .ir.ular shape ball in the image frames. n 5=7, .olor, shape
and si3e are e$aluated to dete.t the ball. n 5>7, density based approa.h is used to separate
the players and the lines. "o/e$er, as /e fo.us on frames in$ol$ing long-shots, the ball is

*
)orresponding Author
39
sometimes $ery small in si3e and may not be al/ays .ir.ular in shape and the ball may not
be dete.ted if it is atta.hed /ith the line of the ground.

n this paper, /e propose a real time ball dete.tion frame/ork for long-shot frames. 0he
proposed method .omprises four steps. At the first step, /e apply an automati. ground
dete.tion algorithm to eliminate the ground. 0he players and the ball .andidates are
e1tra.ted using Sobel gradient method in the se.ond step. n the third step, ground straight
lines are eliminated using line dete.tion algorithm. n the last step un/anted ob2e.ts are
eliminated using different thresholds.
0he rest of the paper is organi3ed as follo/s. n se.tion 8 the proposed algorithm is
des.ribed. !1perimental results are sho/n in se.tion 9 and /e .on.lude the paper in
se.tion :.
2 Proosed Algorithm
n most pre$ious /orks, it is assumed that green .olor of the so..er field is dominant o$er
other .olors and it appears in a large area of an image se?uen.e, espe.ially in long shots,
/hi.h .ontains the ma2or parts of the /hole $ideo. %or e1ample, the $alue of hue used in
the "S@ .olor spa.e ranges from ;: to AB 5A7, from <B to6;B 56B7, and from <; to >; 5667.
"o/e$er, it is $ery diffi.ult to sele.t an a.tual range to dete.t the ground, as the small
range /ill miss some ground pi1els not in that .olor range and the broader range /ill
in.lude non ground pi1els as ground. n 5687, the authors mention a .olor feature present
in ground pi1els. 0he rule GCRCB, /here G, R, B are the Dreen, &ed and (lue
.omponents in the &D( spa.e, respe.ti$ely, is held for the ma2ority ground pi1els. n our
proposed method, /e apply this feature to e1tra.t the ground at first and .onstru.t a binary
image /here the non ground pi1els dete.ted a..ording to this rule are marked using
e?uation 6. %igure 6 is an e1ample of this.
0rounJ(x, y) = _
u, (g(x, y) > r(x, y) > b(x, y))
1, otcrwisc
E6F

"o/e$er, this feature also appears in the gray .olor ob2e.ts su.h as ball, line and goal post,
and these are e1.luded here being dete.ted as ground pi1els. As a result, /e apply Sobel
gradient algorithm to the &D( image to dete.t the sharp .hanges to preser$e the ball 5697.
n Sobel gradient algorithm, the deri$ati$e of the intensity $alues a.ross the image is
.al.ulated and the .hange is found /here the deri$ati$es are ma1imum. 0he gradient is a
$e.tor and the .omponents are measured in the x and y dire.tion. 0he .omponents are
found using !?. 8 and !?. 9.

40

EaF +riginal mage EbF )olor-based elimination of ground
%igureG 6



](x,)
x
= x =
](x+dx,)-](x,)
dx
E8F

](x,)
x
= y =
](x,+d)-](x,)
d
E9F

/here f is an intensity fun.tion. 0o dete.t the presen.e of a gradient dis.ontinuity, the
.hange in the gradient at Ex , yF is .al.ulated and the magnitude EMF and gradient dire.tion
E0F are found using the follo/ing e?uationsG

H = (x
2
+ y
2
) E:F
0 = ton
-1
j

x
[ E;F

n figure 6EbF, the ball and the lines in the ground /ere dis.arded. "o/e$er, Sobel method
retains the ball and the lines. %igure 8EaF is an e1ample of this.


EaF Sobel Dradient mage EbF Dround !limination &esult
%igureG 8

41
0hen the image .ontaining the non ground pi1els Efigure 6EbFF and the Sobel gradient
image Efigure 8EaFF are added, /hi.h yields an image /ith the players, ball, lines, goal
post, spe.tators and s.oreboard. 0hen the image is .on$erted to binary and ground is
eliminated from the resultant image sho/n in figure 8EbF. Dilation and erosion methods
are applied to .onne.t the dis2oint lines.
As /e only need the information of the so..er ball and players, the ob2e.ts su.h as lines,
goal posts, s.oreboard and the spe.tators are remo$ed using some salient features. 0he
s.oreboard and the spe.tators are eliminated as they are large in si3e .ompare to the ball
and the players.

0he straight lines in the ground are dete.ted using kernel based "ough transformation 56:7
and eliminated. n 56;7, the point-line duality is utili3ed to .lassify the supporting lines of
set of .ollinear pi1els in images. n this method, pi1els are mapped to lines using a slope-
inter.ept parameteri3ation in a dis.reti3ed 8D parameter spa.e. Later in 56<7, slope
inter.ept is repla.ed /ith an angle-radius parameteri3ation. "o/e$er, these methods
re?uire high .omputational .ost for real time implementations. n this paper /e use an
impro$ed $oting s.heme for the "0 that redu.es the .omputational .ost and real time
performan.e 56:7. 0he method operates on .lusters of appro1imately .ollinear pi1els. t
uses an ellipti.al Daussian kernel that forms the un.ertainty asso.iated /ith the best
fitting line regarding the .orresponding .luster. 0his method produ.es a $ery .lean $oting
map to dete.t the spurious line of the image sho/n in figure 9EaF.


EaF Line Dete.tion EbF Line elimination result
%igureG 9

After the line is dete.ted, the players and the ball are distinguished if they are atta.hed
/ith the line. 0hen the lines are eliminated. 0he remaining ob2e.ts in.lude players, ball,
some dotted lines, some small ob2e.ts and some large ob2e.ts in the ground as sho/n in
figure 9EbF. +ur main purpose is to keep the ball and the players in the ground. So, at first
/e .al.ulate the area and the perimeter of all single the ob2e.ts. f the si3e of an ob2e.t is
$ery large, it is eliminated. 0hen the ratio of area and perimeter is .al.ulated to sele.t an
42
optimum threshold $alue. 0he players and the ball ha$e a higher density of pi1els hen.e
the ratio of area and perimeter is high .ompare to the dotted lines and the small ob2e.ts.
0he optimum threshold $alue dis.ards the ma2ority of the un/anted ob2e.ts. n all our
e1periment, /e use the threshold $alue 6.9. 0he un/anted ob2e.t elimination result is
sho/n in figure :EaF.


EaF#n/anted ob2e.t elimination result EbF Dradient of the resultant ob2e.ts
%igure :

%inally, /e dete.t the gradient of the ob2e.ts kept after un/anted ob2e.t elimination using
Sobel gradient method sho/n in figure :EbF and the final output is sho/n in figure ;.



%igureG ; %inal +utput



43
! E"erimental #esult

We ha$e used a < se.ond <:B19<B so..er $ideo of 8; %rames per se.ond from a mat.h in
the 8BB8 %%A World .up played bet/een (ra3il and Dermany. 0he algorithm robustly
dete.ts the ball in the $ideo se?uen.es /hen the ball is atta.hed /ith the line. We ha$e
applied this algorithm to $arious so..er game images, espe.ially /hen the ball is atta.hed
/ith the line. We ha$e .ompared our results /ith the proposed dete.tion method of H-I
*im et al.5>7. +ur proposed method more robustly dete.t the ball, /hile the method
proposed by H-I *im et al. may fail to keep the ball /hen the ball in atta.hed /ith line.
0he e1perimental results are sho/n in figure < and figure =. "o/e$er, /hen the players
are .ro/ded at the same pla.e, this algorithm fails to dete.t all the players as the si3e of
the ob2e.t be.omes large and dete.ts it as a single ob2e.t. 0his algorithm eliminates single
large ob2e.ts /hi.h .ontains more than one player.


EaF +riginal mage


EbF Method proposed by H-I *im et al. E.F 'roposed Method
%igureG < 0he out.ome of different methods


44

EaF +riginal mage


EbF Method proposed by H-I *im et al. E.F 'roposed Method
%igureG = Another set of e1perimental results

$ %onclusion

0he main ob2e.ti$e of this paper is to dete.t the so..er ball and players /ithin a $ideo
footage, espe.ially /hen the ball is atta.hed /ith lines in the ground. 0he e1perimental
results sho/ the .apability and robustness of dete.ting ball.

Ac&nowledgement

0his resear.h /as supported by (asi. S.ien.e &esear.h 'rogram through the National
&esear.h %oundation EN&%F of *orea funded by the Ministry of !du.ation, S.ien.e and
0e.hnology E8B68-BBB=>B6F.

#eferences

6. A. !kin, A. M. 0ekalp, et al., JAutomati. so..er $ideo analysis and summari3ationJ, !!! 0ransa.tions on
mage 'ro.essing, $ol. 68, no. =, pp.=A<->B=, Huly 8BB9.
45
8. Kiao-%eng 0ong , "an-Ling Lu , Ling-Shan Liu, An !ffe.ti$e and %ast So..er (all Dete.tion and
0ra.king Method, 'ro.eedings of the 'attern &e.ognition, 6=th nternational )onferen.e on
E)'&4B:F @olume :, p.=A;- =A>, August 89-8<, 8BB:
9. 0. D4+ra3io , N. An.ona , D. )i.irelli , M. Nitti, A (all Dete.tion Algorithm for &eal So..er mage
Se?uen.es, 'ro.eedings of the 6< th nternational )onferen.e on 'attern &e.ognition E)'&4B8F
@olume 6, p.6B86B, August 66-6;, 8BB8
:. D. Liang, I. Liu, L. "uang, and W. Dao, JA s.heme for ball dete.tion and tra.king in broad.ast
so..er $ideo,J in 'ro.. 'a.ifi.-&im )onf. Multimedia, 8BB;, pp. ><:-->=;.
;. K. Iu, ). Ku, ". W. Leong, et al., J0ra2e.tory-based ball dete.tion and tra.king in broad.ast so..er
$ideoJ, !!! 0ransa.tions on Multimedia, $ol. >, no. <, pp.66<:-66=>, 8BB<
<. 0. D4+ra3io, ). Duaragnella, et al., JA ne/ algorithm for ball re.ognition using .ir.le "ough
transform and neural .lassifierJ, 'attern &e.ognition, $ol. 9=, no. 9, pp.9A9-:B>, Mar.h 8BB:.
=. K.-%.0ong, ".-L. Lu, et al., JAn effe.ti$e and fast so..er ball dete.tion and tra.king methodJ, )'&,
$ol. :, pp.=A;-=A>, 8BB:.
>. Hong-Iun *im, 0ae-Iong *im, JSo..er (all 0ra.king using Dynami. *alman %ilter /ith @elo.ity
)ontrolJ, Si1th nternational )onferen.e on )omputer Draphi.s, maging and @isuali3ation, 8BBA
A. '. Ku. L. Kie, S.%. )hang, A. Di$akaran, ". Sun, Algorithm and system for segmentation and
stru.ture analysis in so..er $ideo, inG 'ro.eedings of nternational )onferen.e on Multimedia !1po,
8BB6, pp. =86=8:.
6B. +. #tsumi, * Miura, . de, S. Sakai, ". 0anaka, An ob2e.t dete.tion method for des.ribing so..er
games from $ideo, inG 'ro.eedings of !!! nternational )onferen.e on Multimedia and !1po, $ol.
6, 8BB8, pp. :;:>.
66. A. !kin, A.M. 0ekalp, A frame/ork for tra.king and analysis of so..er $ideo, inG Symposium
!le.troni.s magingG S.ien.e and 0e.hnologyG @isual )ommuni.ation and mage 'ro.essing, 8BB8,
pp. =<9==:.
68. *. Seo, H. *o, . Ahn, and ). *im, JAn intelligent display s.heme of so..er $ideo on mobile
de$i.es,J !!! 0rans. )ir.uits Syst. @ideo 0e.hnol., $ol. 6=, no 6B, pp. 69A;-6:B6, +.t. 8BB=
69. +. &. @in.ent and +. %olorunso, MA Des.ripti$e Algorithm for Sobel mage !dge Dete.tionN,
'ro.eedings of nforming S.ien.e O 0 !du.ation )onferen.e EnS0!F 8BBA
6:. L. A. %. %ernandes and M. M. +li$eira, M&eal-time line dete.tion through an impro$ed "ough
transform $oting s.heme,N Pattern Recognit., $ol. :6, pp. 8AAP96:, 8BB>.
6;. '.@.). "ough, Methods and means for re.ogni3ing .omple1 patterns, #.S. 'atent 9.B<A.<;:, 6A<8.
6<. &.+. Duda, '.!. "art, #se of the "ough transformation to dete.t lines and .ur$es in pi.tures,
)ommun. A)M 6; E6F E6A=8F 66P6;.

46

You might also like