ground. During the ball candidate extraction, all fore-
ground regions are extracted and checked for their
size using calibration information of the cameras.
Foreground regions that are no candidates for the
soccer ball due to their size are removed. Out of
the remaining regions, the external contours are ex-
tracted as a sequence of points and analyzed after-
ward. If the number of the contour pixels is higher
than a bias, an ellipse is fitted to it and the mean
squared error between every sequence point and the
ellipse is calculated. Ball candidates with a high mean
squared error are removed. The remaining candidates
are kept as verified foreground regions in the fore-
ground/background segmented image. Then, a dilata-
tion is applied and the last n binary images are accu-
mulated to a so-called Motion History Image (MHI)
of verified ball candidates. Finally, ball tracklets (ro-
bust partial ball trajectories) are finally extracted from
the MHI. Fig. 2 shows a MHI and some results of de-
tected/extracted ball tracklets.
2.2 Partially Occluded Situations
The foreground/background segmentation often
merges ball and player into a single silhouette if they
are either close to each other or partially occlude
each other. Thus, the ball is not a singular object and
only appears as a bump poking out of the player’s
silhouette in the resulting image (Fig. 3 (a) and (b)).
(a) (b) (c) (d) (e)
Figure 3: (a) Input image, (b) foreground/background seg-
mentation of the input image, (c) chain code representation
of the outer contour: le ft- and right-values (yellow and
light blue/horizontal lines) of the chain code are of partic-
ular interest, (d) detected Hough circles (gray/smaller cir-
cles) and circular RoI RoI
bc
in which the CCH is calculated
(blue/upper, brown/central and yellow/lower circle), (e) de-
tected Hough circles and identified ball (green/lower cirlce).
At the second stage, the goal is to identify these
bumps. In order to achieve this, we apply a two-step
approach again. In the first step, circles (or at least
parts of circles) in the image are detected via Hough
transform (Kimme et al., 1975). In the second step,
the Freeman chain code (Freeman, 1961) is consid-
ered to decide if a detected circle is a soccer ball.
In the following, the details of the procedure are
given: At the beginning of the first step, all the player
silhouettes of the foreground/background segmented
image are extracted into separate images. On each of
these silhouette images, a Hough transform for circle
detection is applied. All detected circles and circu-
lar arcs that approximately match the predefined ball
dimensions are determined as ball candidates. A re-
sulting Hough circle c is characterized by the center
coordinates x and y as well as the radius r : c = (x, y, r).
The Hough transform variant chosen in this work
is called the Hough gradient method (Bradski and
Kaehler, 2008). Unlike comparable methods, this
variant only uses a two-dimensional accumulator in-
stead of a three dimensional one. This is achieved by
incrementing only accumulator cells along the gradi-
ent direction of each non zero pixel of the edge map
instead of incrementing a complete circle and there-
fore keeping a separate accumulator for every pre-
defined possible circle radius. This is beneficial to
the running time of the algorithm. The downside is
a lower recognition rate of circles with a concentric
counterpart. But this flaw is acceptable since con-
centric circles do not occur in the segmented image
material.
At the beginning of the second step, the outer con-
tour of the silhouette image is calculated. Then the
Freeman chain code of the contour is determined (Fig.
3 (c)). Now, in a circular Region of Interest (RoI)
around the ball candidates that were identified be-
fore, the Chain Code Histogram (CCH) is computed
(Iivarinen and Visa, 1996).
The circular RoI is constructed around the cen-
ter coordinates x and y of the ball candidate, adding
a small ∆ to the radius r (Fig. 3 (d)). The ∆ is
added to encounter the problem that the detected cir-
cles of the Hough gradient method tend to be slightly
smaller than they actually are. As a result, the consid-
ered RoI around the ball candidate RoI
bc
is defined as
RoI
bc
= (x, y, r + ∆).
As described in (Iivarinen and Visa, 1996), the
CCH is a discrete function
p(k) =
n
k
n
, k = 0, 1, ..., K − 1 , (1)
where n
k
is the number of chain code values k in a
chain code, and n is the number of links in a chain
code. In case of the Freeman chain code there are
K = 8 possible directions.
Generally, a bump has a high amount of le f t and
right-values of the chain code at the same time, while
the le f t-values are on the upper side of the bump and
right-values on the lower side of the bump. As a con-
sequence, a RoI
bc
with a CCH that provides certain
frequencies of occurrence of le f t- and right-values λ
and ρ is defined to indicate a bump in the silhouette. If
SoccerBallDetectioninOccludedSituationsforSingleStaticCameraSystems
113