Using Digital Image Processing Solutions For Offside Recognition, Instead of Assistant Referees Mohammad Javad Assadifard1 , Mahdi Javanmard2 1
[email protected] 2#
Assistant Professor of Electrical and Computer Engineering, Payam Noor University- Tehran - Iran 2
[email protected]
Abstract— In this paper, a solution for declaration of offside event in soccer game, based on digital image processing techniques, is offered. In this approach, 4 cameras are installed at stadium that send video pictures to a central processor system. Based on image processing methods, the ball, players and referees group are specified by object`s morphological properties. Meanwhile using Kalman Filter, Particle Filters and Monte Carlo Estimation techniques, object tracking and trajectory of ball movement and players strikes are analysed for different offside occurrence situations. The other important topic in this paper is the way that how the system can realize a correct estimation of player's location and ball by analysing the video cam pictures in crowded areas. To solve this problem, numeral computation and optical physics formulas are used to calculate the real coordinates of objects at soccer field. Finally the whole plan will be split into several modules, describing all offside occurrence events. Keywords: Offside, Video Processing, Object Detection, Object Tracking, Filtering, Modules of Event
such as meddle in playground and damaging sensors and could get the agreement of FIFA. So, in each half of gridiron, one high quality digital camera is installed behind the abscissa line (at assistant referee’s location) and the other one will be installed behind the breadth line in a suitable height (behind the goal). These static cameras have straight view of playground and take films and send time stamped frames to the processor system. There are a lot of prepared library methods to specify objects. Recognition players, ball and referees in the crowded pictures need to override modules. But firstly we need to get real coordinate’s location from visible pixels of each object.
2
Calculation of Object Real Location
2.1 Getting Abscissa Coordinate
1 Introduction Offside is a rule in soccer deducted with international soccer board to influence on movement confine of players when they attack. Offside law says when an offensive would be in a situation that there are less than two foe players between him and the goal and gives a pass from teammate player, offside is happened. Offside has some exceptions: Pass would be from teammate, player at foe half playground. Pass is not from out or corner kicking. So, Location of hands doesn’t influence in offside events [1]. We know decision to declare and not to declare offside is the most mistakable decisions of referees in the soccer history. No digital image processing system has presented to solve this problem yet and there is no system contoured that FIFA i accepted it. But the way is shown in this paper is based on the analysis of live pictures received from playground in each moment. This solution doesn’t have other problems
When the captured film of an object consists of soccer players and ball is shown in the central system, It’s necessary to get coordinate’s abscissa and breadth of objects. On television during a soccer game a line parallel to breadth line of playground as offside line is seen and they spot the intersection of this line and abscissa line, abscissa location(X) of players or ball. This small mistake causes large mistakes in analysis of soccer umpire. According to figure 1 and 2, each half of playground seems as trapezoid at view of each camera. To reach the offside line, we firstly stretch two stalks of trapezoid until those cut themself in a remote point. Then, we draw a line from this point that traverses the object. Finally, the intersection of offside line and abscissa line of ground, is the X coordinate of object.
313
Fig(1) Imagehalf playground from camera behind the breadth line
until intersects stalks on two pints V and T. Then, the distance between O and V, is the distance of object from mid line. We know VO is a virtual distance and we should calculate real distance on real line DC. In the other side, the remote point I is virtual point of intersection of two stalks. After that, we draw a line from I and O until intersects DC on G. Now, we suppose there is another point named G` that’s the real size of virtual picture of VO. It’s necessary to proof that G coincides G`. In triangles ICD and IDG, VT is parallel to DC then we conclude: 𝑉𝑉𝑉𝑉
𝐷𝐷𝐷𝐷
=
𝐼𝐼𝐼𝐼
𝐼𝐼𝐼𝐼
&
𝑉𝑉𝑉𝑉
𝐷𝐷𝐷𝐷
=
𝐼𝐼𝐼𝐼
𝐼𝐼𝐼𝐼
⇒
𝑉𝑉𝑉𝑉
𝐷𝐷𝐷𝐷
𝑉𝑉𝑉𝑉
= : i(1) 𝐷𝐷𝐷𝐷
If we call the focal point of lens of camera that causes virtual pictures, F, and call distance of camera from object, p and camera from virtual picture, q , we know all of reached lines are flat and parallel, we suppose distance of camera to all parts of each object are equal. According to optical physics law : Fig(2) Image half playground from camera behind the abscissa line
q
Proof:
p
1 F
=
=
1
1
+
[2]
p q Size of Picture
⇒
Size of Object
According to figure 3, the shape of half q = (Size of Picture*p)/ Size of object playground is like a trapezoid named ABCD. Suppose O is place of object. From this point, we draw a line parallel to two parallel side of trapezoid, in the other hand: Fig(3) Trapezoid ABCD, shape of half playground, by camera behind abscissa line
VO
1
1
1
1
1
q = p DG ` : F = p + q ⇒ F = p + VT
1
1
1
1
1
q = p DC : F = p + q ⇒ F = p + ii & iii :
1
p
+
p
1
VO DG `
1
=p +
iii & iv : DG =DG`
p
1
VT DC
p
1
:ii
VO DG `
p
1
VT DC
:iii
⇒ DG ` = VO
DC VT
:iv
At last, we conclude G coincides G` and line IO that traverses the object, intersects the abscissa line near the camera on G and DG is real abscissa of location of object.
314
2.2 Getting Breadth Coordinate If we traverse object a line parallel to abscissa line of playground, we get breadth location of object (Y) at the intersection of right stalk of trapezoid on the point called T. According to Figure 4, we draw a line from point O parallel to abscissa line DC until intersects two stalks of trapezoid on V and T. So, from this point, we cross a line staple on VT until it intersects AB and DC on L and J. Then, draw BK parallel to JL. L
A
V
N
O
D
B
J
T` T
C
K
Fig(4) Trapezoid Image of Half Playground From The Camera Behind The Breadth Line
JL=BK ، NK =OJ BC . NK CT = BK :i
We know: NK CT = ⇒ BK
BC
𝐵𝐵𝐵𝐵
1
1
q = 𝑝𝑝 𝐵𝐵𝐵𝐵 ⇒ 𝐹𝐹 = 𝑝𝑝 + ii& iii : iv :
1
𝑝𝑝
+
CT`=
1
𝐵𝐵𝐵𝐵 𝑝𝑝 𝐵𝐵𝐵𝐵
=
𝐵𝐵𝐵𝐵 . 𝑁𝑁𝑁𝑁 𝐵𝐵𝐵𝐵
𝑝𝑝
1
𝐵𝐵𝐵𝐵 𝐵𝐵𝐵𝐵
1
𝐹𝐹
: iii 1
=𝑝𝑝 +
1
𝑁𝑁𝑁𝑁 𝑝𝑝 𝑞𝑞 𝐶𝐶𝐶𝐶 `
⇒ iv & i:
𝐵𝐵𝐵𝐵
𝐶𝐶𝐶𝐶`
⇒ 𝐵𝐵𝐵𝐵 = 𝑁𝑁𝑁𝑁
CT = CT`
We conclude, T` coincide T on BC and CT is the real size of virtual picture OJ.
2.3 Calculate Coordinates Of Objects In continue, we compute the value of DG and CT those describe X and Y of objects in the half of playground. But, to make it easy, we rename the points at figure 5. F: Location of player Xfr: If we cross a line from I to point F, the abscissa location of F(Xf) is got at Xfr Yfr: We make a line from point F that’s parallel to parallel sides of trapezoid until intersects BC at point Yfr. AH, IM, Yfr-Q and FXfare line segments staple on DC.
(3)
I
Now, we suppose breadth value of OJ on BC is not T. We imagine it’s T`. In conclusion, CT` is real value of virtual picture OJ. According of optical formula: 1
𝐹𝐹
𝑞𝑞
𝑝𝑝 1
𝐹𝐹
= 𝑝𝑝 + 𝑞𝑞
=
1
1
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝑂𝑂𝑂𝑂 𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃
=
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝑂𝑂𝑂𝑂 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 1 1 𝑝𝑝
+
𝑝𝑝
𝑁𝑁𝑁𝑁 𝑞𝑞 𝐶𝐶𝐶𝐶 `
: ii
A
⇒ 𝑝𝑝 = 𝐶𝐶𝐶𝐶` ⇒ q = 𝑝𝑝 𝐶𝐶𝐶𝐶` ⇒ 𝑞𝑞
𝑁𝑁𝑁𝑁
𝑁𝑁𝑁𝑁
M2
B
p
1 2 M1
Yfr
F
To calculate real size of BK: 𝑞𝑞
𝑝𝑝
=
D
𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝑂𝑂𝑂𝑂 𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃 𝑆𝑆𝑆𝑆𝑆𝑆𝑆𝑆 𝑂𝑂𝑂𝑂 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅 𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃𝑃
𝑞𝑞
𝐵𝐵𝐵𝐵
⇒ 𝑝𝑝 = 𝐵𝐵𝐵𝐵 ⇒
H
M
Xf
Xfr
Q
C
Fig(5) Situation of Distances from View of Camera Behind the Breadth Line.
315
Target: Finding real location of players and ball. D-Xfr: Real abscissa Location of object C_Yfr: Real depdth Location of object
2.4. Remove Lapses OF Soccer Player`s Height and Swept Positions In above situations, we supposed each player as a single point. But we know this estimation is Tng(