Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

TSINGHUA SCIENCE AND TECHNOLOGY

ISSN  1007-0214  14/19 pp594-601


Volume 12, Number 5, October 2007

A Statistical Method for Analysis of Technical Data of


a Badminton Match Based on 2-D Seriate Images

CHEN Bingqi (чρ୫)**, WANG Zhiqiang (ฆᄝஜ)

Department of Mechanical and Electronical Engineering, China Agriculture University, Beijing 100083, China

Abstract: The use of computer vision technology to collect and analyze statistics during badminton matches
or training sessions can be expected to provide valuable information to help coaches to determine which
tactics should be used by a player in a given game or to improve the player’s tactical training. A method
based on 2-D seriate images by which statistical data of a badminton match can be obtained is presented.
Image capture and analysis were performed synchronously using a multithreading technique. The regions of
movement in the images were detected using a temporal difference method, and the trajectories of the
movement regions were analyzed using seriate images. The shuttlecock trajectory was extracted from all
detected trajectories using various characteristic parameters. The stroke type was determined by comparing
the shuttlecock trajectory data with a set of stroke definition data. The algorithm was tested at a training cen-
ter, and the results were compared with baseline data obtained by expert visual inspection using four video
samples, which included approximately 10 000 frames. The shuttlecock trajectory and stroke type were de-
tected correctly in almost 100% of the analyzed video sequences. The average speed of the automated
analysis was approximately 40 frames/s, indicating that the method can be used for real-time analysis dur-
ing a badminton match. The system is convenient for use by a sports coach.

Key words: machine vision; 2-D measurement; badminton match; trajectory tracking; stroke type statistic

time tracking system for sports broadcast applications


Introduction and proposed techniques for the game of tennis for
tracking the ball and players on video images obtained
At present, plays and goals in sporting matches are from stationary cameras[1,2]. Yu et al. proposed a
usually judged by the human eye, and recording is per- framework to determine the location of a ball by look-
formed “manually” by human operators. With the re- ing for and analyzing the ball trajectory from broadcast
cent improvement of computer hardware and technol- soccer match video data[3-6]. Ekin et al. provided a
ogy related to image processing, computer vision is in- framework for automatically analyzing and obtaining
creasingly expected to replace manual operations in statistics of a soccer match in real-time[7]. Utsumi et al.
sports matches and training. proposed a detection and tracking method in order to
Several studies have been performed to analyze the detect and track the objects necessary to describe a
movement of players and the ball in sporting events, soccer match[8]. Perš and Kovacic developed a multi-
and many developments have been made in the past ple-camera-based player tracking system that could be
few years. Pingali et al. developed a multi-camera real- used for simultaneously tracking several players in a
large section of a handball court using a series of
Received: 2006-03-09; revised: 2006-12-04 384×288 pixels images acquired by fixed cameras[9,10].
γγTo whom correspondence should be addressed. Figueroa et al. considered the problem of tracking
E-mail: cbq93@sohu.com; Tel: 86-10-62966687
CHEN Bingqi (чρ୫) et alġA Statistical Method for Analysis of Technical Data of … 595

players during a soccer game through the use of multi- (5) Calculation of the statistics for the stroke type by
ple cameras[11]. Ye et al. have proposed a method for comparing the characteristics of the detected shuttle-
athlete identification by combining the segmentation, cock trajectory and the definition of the stroke type.
tracking, and recognition procedures into a coarse-to-
fine scheme for jersey number (digital characters on 1.1 Equipment
the sport shirt) detection[12]. Wang et al. proposed an
A Basler A601f series progressive scan CMOS (com-
automatic technique for extracting color models of the
plementary metal-oxide-semiconductor transistor)
playing surface and the team uniforms that can be used
camera was used to acquire sample images. The cam-
in higher-level processes such as tracking and recogni-
era was designed for industrial applications. The pri-
tion[13]. Qi et al. presented a framework for tracking
mary features of the camera are as follows. The camera
sports players in videos recorded by static domestic
matches the 1394 TA (transmission adapter) digital
cameras[14]. Zaveri et al. proposed an algorithm for de-
camera specification. The maximal frame rate at full
tection and tracking of small and fast moving objects,
resolution is 60 frames/s. The asynchronous full frame
such as a pingpong or a cricket ball, in sports video se-
is shuttered electronically. The camera has square pix-
quences[15].
In badminton matches and in training, in order to se- els, and the frame size is 659×493 pixels. The camera
lect the tactics required to deal with different oppo- was used to capture monochrome images.
nents, the coach must have a good statistical know- Capturing and processing of each image were per-
ledge of the tactics of the player. The ultimate goal of formed using a notebook personal computer with a
this study was to develop a system capable of real-time Pentium 2.4-GHz CPU. The algorithm was developed
statistical analysis of data collected either during train- based on the platform of a 2-D moving image meas-
ing or match-play, to provide information to assist urement system, which was provided by Beijing Mod-
training and to select match tactics. ern Fubo Technology Ltd., implemented using Micro-
The use of 3-D information should be able to pro- soft Visual C++ 6.0.
vide accurate statistical data for analysis of a badmin-
1.2 Sampling a moving shuttlecock
ton match. However, obtaining 3-D information re-
quires the use of more than two cameras, and real-time 1.2.1 Preparation for the sampling program
analysis requires high-capacity processors, the size and The application for synchronous capture, analysis, and
volume of which are generally too large for a practical data storage uses Windows multithreading technology.
implementation. Therefore, 3-D detection is not suit- When the application is started, the captured thread is
able for badminton coaches, as the equipment must be started and captured images are displayed on the
readily, transportable to remote match locations. In the screen. Then, when analysis and/or saving has begun,
present study, therefore, we develop a 2-D measure- thread analysis and/or saving is started, and image
ment and analysis system, which requires only one analysis and/or saving is carried out synchronously.
camera and a laptop personal computer. 1.2.2 Establishing the camera and demarcating
the badminton court
1 Method
In the present study we attempt to develop a real-time
The system can be broken into a number of steps as measurement algorithm for a moving shuttlecock in an
follows. actual match. Therefore, the image samples used in the
(1) Capture of 2-D images of the badminton court present study should simulate scenes of an actual
that are suitable for use in measuring the shuttlecock match as closely as possible. In order to capture the en-
trajectory using one camera. tire scene of the badminton court, the camera was
(2) Extraction of moving objects from 2-D seriate mounted 5 m from the corner of the court at a height of
images. 4 m from the ground and at an angle of approximately
(3) Classification of moving objects and connection 45q from the vertical.
of their tracks. Before the image analysis, eight characteristic coor-
(4) Extraction of the shuttlecock trajectory from dinates of the badminton court were selected
entire tracks. manually, as shown in Fig. 1. The representational
596 Tsinghua Science and Technology, October 2007, 12(5): 594-601

points comprise the two top ends of the badminton net The outline of each white pixel block is measured on
(point 1,3), the two feet of the net frame (point 2,4), the binary image. According to the coordinates of the
and the four corners of the court near the net (point 5-8). outline, the barycenter of each white pixel block is cal-
culated as
1 n 1 1 n 1
X ¦
ni 0
xi , Y ¦ yi
ni 0
(3)

where X is the x coordinate of the barycenter, Y is the y


coordinate of the barycenter, xi and yi are the x and y
Fig. 1 Representational points of the net and the field coordinates of point i on the outline, and n is the num-
ber of points on the outline.
1.3 Trajectory tracking and analysis 1.3.3 Trajectory detection
(1) Establishing the trajectory record
1.3.1 Concept of direction number The trajectory record for each frame includes the
In the present study we introduce the concept of a di- following information:
rection number, which is used to determine the flight (a) The coordinates of the trajectory in the current
direction and stroke type. The direction number is de- scene;
fined as follows. When the x coordinate of a point on (b) The angle between the x-axis and the line con-
the trajectory is increased relative to previous point, necting the current point with the previous point on the
the direction number is positive. When the x coordinate trajectory;
of a point on the trajectory is decreased relative to pre- (c) The distance between the current point and the
vious point, the direction number is negative. The ap- previous point on the trajectory;
plication states that the initial direction number is zero. (d) The current direction number.
When tracking is complete, the application can deter- (2) Trajectory matching
mine the direction and length of the trajectory accord- Cmi ( x, y ) is used to describe the barycenter coordi-
ing to the value of the direction number. nate of area i in frame m. The distance L and the angle
1.3.2 Object detection A from C mi ( x, y ) to Cmmax
1 ( x , y ) , which is a point be-
Detection of differences between current images and longing to the longest trajectory in the m1 frame, are
the background is the most common method used for calculated. If the distance L is between the established
detection of the moving area in image processing. longest and shortest distances, and the angle A is be-
However, this method requires a background image in tween the established largest and smallest angles, then
which there are no moving objects, which is difficult to
Cmi ( x, y ) is judged to be a point on the longest trajec-
obtain in a match environment. In the present study we
tory. The point Cmi ( x, y ) is then recorded in the long-
therefore detect the moving area using the difference
between two consecutive frames in the seriate data. est trajectory record and the direction number of the
This detection method is hereinafter referred to as the longest trajectory is modified. If Cmi ( x, y ) is judged
temporal difference method. The temporal difference not to belong to the longest trajectory, and if Cmi ( x, y )
method includes the following procedures. First, the is matched another trajectory, it is recorded as belong-
original image is defined as ing to the matching trajectory record. If Cmi ( x, y )
X t {x(ti , j ) 0 İ i  M ;0 İ j  N } (1) does not match any trajectory on the m1 frame, then a
where M is the width of the image and N is the height new trajectory record starting at Cmi ( x, y ) is created.
of the image. In the trajectory matching, several points on the
Second, the temporal difference image is defined as same frame may appear to match the same trajectory.
­ 255, X t  X t 1 ! n; In this case, the point nearest to the trajectory is re-
Rt ®
¯0, X t  X t 1  n (2) corded as belonging to the trajectory.
where n is a threshold that can be modified and R t is If none of the barycenters on frame m matches any
a binary image. of the barycenters on frame m1, then the longest
CHEN Bingqi (чρ୫) et alġA Statistical Method for Analysis of Technical Data of … 597

trajectory up to this point is analyzed in order to de- position of the trajectory start point, the position of the
termine whether the longest trajectory is the shuttle- trajectory end point, the direction and the distance of
cock trajectory. the line from the trajectory start point to the end point,
the trajectory camber, the average distance between
1.4 Detecting the shuttlecock track
points on the trajectory, the location of the highest
Tmax denotes the longest trajectory among all of the point on the trajectory, the distance between the trajec-
tory start point and the end point to the players, the dis-
trajectories, and O1 , O2 ,..., Om denote all of the proper-
tances from the start point and the end point to the
ties that are used to evaluate whether a trajectory is the
badminton net, the direction number of the trajectory,
shuttlecock trajectory. These properties include the tra-
the coordinates of the badminton net, the coordinates
jectory length, the trajectory camber, and the trajectory
of the court contour, and the locations of the trajectory
direction number. The reliability parameter \ (Tmax )
start and end points in the badminton court.
of the shuttlecock trajectory is defined as Flow chart of the detection system is shown in Fig. 2.
m
\ (Tmax ) ¦\
i
i (Oi ) (4)

If the reliability is greater than some established


threshold, the trajectory is judged to be the shuttlecock
trajectory. The shuttlecock trajectory is then analyzed
to determine the stroke type. If the stroke type is de-
termined, all of the trajectory records are deleted, and
the detection process is restarted. If the longest trajec-
tory is not the shuttlecock trajectory, all of the trajec-
tory record is stored in memory and the detection proc-
ess is restarted.
During the detection process the shuttlecock may
temporarily leave and then reenter the visual field of
the camera. Therefore, whether or not a detected shut-
tlecock trajectory is part of the previous shuttlecock
trajectory must be determined. If the distance from the
end of the previous shuttlecock trajectory to the start of
the current shuttlecock trajectory is within a given
range, then the current shuttlecock trajectory is deter-
mined to be part of the previous trajectory; otherwise,
the current shuttlecock trajectory is classified as being
unrelated to the previous trajectory.

1.5 Judging the stroke type of a moving


shuttlecock

After detection of the shuttlecock trajectory, the stroke


type is determined by comparing the data of the de-
tected shuttlecock trajectory and the stroke definition.
In the present study, the defined stroke types include
lob, raise, smash, backstop, punch, and whip.
A number of parameters are used to determine the
shuttlecock type. These are the trajectory length, the Fig. 2 Flow chart of the detection system
598 Tsinghua Science and Technology, October 2007, 12(5): 594-601

court calculated using these characteristic points.


2 Results and Discussion Statistical data for the athletes on both sides of the
net must be recorded while analyzing the shuttlecock
2.1 Sampling the moving shuttlecock
trajectory. The direction of the shuttlecock trajectory
The real-time statistical data collection system requires can be determined according to the direction number at
the captured image to cover the entire badminton court, the end of the trajectory. If the direction number is
and sufficient space between the top of the net to the positive, indicating that the shuttlecock moved from
top of the image is required in order to achieve re- left to right, then the measurement data should be
quired measurement precision. As shown in Fig. 3 for added to the record of the athlete on the left side of the
the captured images, the top of the net was located just net. Otherwise, the measurement data should be added
above the center of the image and the field of vision to the record of the athlete on the right side of the net.
covered approximately the entire badminton court, in- Tests revealed that use of a direction number to deter-
dicating that the requirements for camera position and mine the trajectory direction provided correct results.
angle were satisfied. The direction number was not only used to determine
the trajectory direction, but also the length of the tra-
jectory.
Figure 4 shows a difference binary image together
with the two original images used to create it. Original
image 2 appeared after the Original image 1 in the im-
age sequence. The threshold for the binary realization
was set at 5 for the difference image. Moving parts in
the images, such as the shuttlecock and players, are
denoted as white pixels; the static parts, such as the
badminton court and the badminton net, are denoted as
a black background in the binary image. Such binary
Fig. 3 Badminton field
images were obtained continuously from the image se-
Tests revealed that a capture frequency of 40 quence, and each barycenter of each moving object
frames/s was adequate for capturing even the fastest was determined.
shuttlecock during a badminton match. Therefore, in The large “+” symbols on the net line in the binary
the present study, the capture frequency was set to 40 image (Fig. 4c) indicate the center of the net line. The
frames/s. The algorithm was analyzed using four video two large “+” symbols on the players indicate their
samples and was tested at a training center. The frame barycenters. The smaller “+” symbols on each of the
counts for the four video samples were 394, 1204, 3108 white pixels indicate the barycenters of these pixels.
and 6020. The average saving speed for the video sam- The barycenter of each player was calculated correctly
ples was 38 frames/s; this can be improved by using a by using the block barycenter of each white pixel in
higher-capacity computer. the fixed measurement area. The borderlines of the
measurement area, which are denoted by the white
2.2 Measuring the moving shuttlecock lines on the binary image (Fig. 4c), are drawn on the
image view.
In obtaining the position information of the badminton
Figure 5 shows the barycenters for a single image
court and net, a small number of characteristic points
and also the superimposed barycenters for a series of
have to be demarcated before measuring the shuttle-
images. It is difficult to separate the barycenter of the
cock trajectory. This position information is important
shuttlecock in one single image from those of other
for determining the stroke type and for delimiting the
moving features (Fig. 5a), but the trajectory of the shut-
badminton court in order to avoid noise from outside
tlecock barycenter can be clearly identified from inspec-
the badminton court. Figure 3 shows eight characteris-
tion of the superimposed image series (Fig. 5b). The tra-
tic points that were obtained by manually clicking on
jectory of other moving features, such as the players and
the image. The lines indicate the area of the badminton
CHEN Bingqi (чρ୫) et alġA Statistical Method for Analysis of Technical Data of … 599

Fig. 5 Barycenters of objects

Fig. 4 Original images and binary image

their rackets, differ from the shuttlecock trajectory (Fig.


5b). Diagnostic data were recorded by connecting each
barycenter with a trajectory, and the shuttlecock trajec-
tory was determined by the analysis of these diagnostic
data.
Figure 6 shows two samples of the moving shuttle-
cock trajectory detection. Figure 6a shows an intact
shuttlecock trajectory, and Fig. 6b shows an interrupted
shuttlecock trajectory. The trajectory data are subse-
quently used to judge the trajectory type of the moving
shuttlecock.
Fig. 6 Samples of detected ball track
600 Tsinghua Science and Technology, October 2007, 12(5): 594-601

The detected trajectory data were compared with a video samples, which included a total of approximately
set of stroke type definitions to determine the stroke 10 000 scenes. The results are compared in Table 1.
type. The results obtained by the algorithm were com- Video samples 1, 2, 3, and 4 had 394, 1204, 3108, and
pared with those obtained from visual inspection of the 6020 scenes, respectively.
Table 1 Measurement results by the algorithm (A) and visual inspection (V)
Lob Raise Smash Backstop Punch Whip
Video sample
A V A V A V A V A V A V
1   2 2 2 2   1 1 1 1
2 2 2 9 9 3 3 1 1 6 6 1 1
3 9 9 9 9 2 2 3 3 8 8 20 20
4 6 6 28 29 16 16 6 6 13 13 4 4

As shown in Table 1, the detection rate of the shut- track is greatly disturbed; (2) improvement of the algo-
tlecock track was close to 100%. In only one case, a rithm to allow a more detailed definition of the stroke
raise stroke, the shuttlecock track was not recorded. In type; and (3) improvement of the algorithm to enable
this case, the shuttlecock trajectory was in fact deter- the score of the badminton match to be judged.
mined but ignored because the shuttlecock trajectory
Acknowledgements
was not the longest trajectory among the group of tra-
jectories. This study supported by Beijing Modern Fubo Technology Ltd.
The test results indicate that the algorithm can be We thank Dr. Sun Ming, at China Agriculture University, Ms.
used to obtain statistical data of player tactics during a Wang Kaizhen and Mr. Zhou Zhihui, at Beijing Sports Univer-
badminton match. sity, and Mr. Chen Yao, at the Pingpong and Badminton Center
of China National Sports Ministry, for their help in this study.
3 Conclusions
References
This paper described a method to obtain statistical data
of a badminton match based on 2-D seriate images. [1] Pingali G, Opalach A, Jean Y. Ball tracking and virtual re-
Moving portions of the images, including the shuttle- plays for innovative tennis broadcasts. In: Proceedings
cock, rackets and players, are detected and labeled as 15th International Conference on Pattern Recognition.
white pixel blocks based on an image difference Washington, DC, USA: IEEE Compter Society Press,
method. The outline of each white pixel block is meas- 2000: 152-156.
ured in the binary image, and the barycenter is calcu- [2] Pingali G, Jean Y, Carlbom I. Real-time tracking for en-
lated from this outline data. Each barycenter point is hanced sports broadcasts. In: Proceedings of CVPR98.
connected to a moving track according to several data. Washington, DC, USA: IEEE Compter Society Press,
The shuttlecock trajectory is extracted from the trajec- 1998: 260-265.
tory data. After the shuttlecock trajectory is determined, [3] Yu Xinguo, Xu Changsheng, Leong Hon Wai, et al. Tra-
the stroke type is determined by comparing the trajec- jectory-based ball detection and tracking with applications
tory data to the definition data for various stroke types. to semantic analysis of broadcast soccer video. In: Pro-
This process is continued until the end of each badmin- ceedings of the 11th ACM International Conference on
ton match. The output is a set of statistical data of the Multimedia. New York, NY, USA: ACM Press, 2003:
stroke type for each player. 11-20.
The algorithm can be used not only for the training [4] Yu X, Tian Q, Wan K W. A novel ball detection frame-
and sports match, but also for other automated analysis, work for real soccer video. In: Proceedings of ICME.
such as the track of the insects. In the future, we hope Washington, DC, USA: IEEE Computer Society Press,
to accomplish three objectives: (1) improvement of the 2003: 265-268.
algorithm to identify the objective track even when the [5] Yu X, Xu C, Tian Q, et al. A ball tracking framework for
CHEN Bingqi (чρ୫) et alġA Statistical Method for Analysis of Technical Data of … 601

broadcast soccer video. In: Proceedings of ICME. Wash- [11] Figueroa P, Leite N, Barros R M L, et al. Tracking soccer
ington, DC, USA: IEEE Computer Society Press, 2003: players aiming their kinematical motion analysis. Com-
273-276. puter Vision and Image Understanding, 2006, 101(2):
[6] Yu Xinguo, Sim Chern-Horng, Wang Jenny Ran, et al. A 122-135.
trajectory-based ball detection and tracking algorithm in [12] Ye Qixiang, Huang Qingming, Jiang Shuqiang, et al. Jer-
broadcast tennis video. In: Proceedings of ICIP. New York, sey number detection in sports video for athlete identifica-
NY, USA: ACM Press, 2004: 1049-1052. tion. In: Proceedings of SPIEüThe International Society
[7] Ekin A, Tekalp A M, Mehrotra R. Automatic soccer video for Optical Engineering, Visual Communications and Im-
analysis and summarization. IEEE Transactions on Image age Processing. 2005: 1599-1606.
Processing, 2003, 7(12): 796-807. [13] Wang Lei, Zeng Boyi, Lin S, et al. Automatic extraction of
[8] Utsumiy O, Miurayy K, Idez I, et al. An object detection semantic colors in sports video. In: IEEE International
method for describing soccer games from video. In: IEEE Conference on Acoustics, Speech and Signal Processing.
International Conference on Image Processing. 2002: Canada, 2004: 617-620.
45-48. [14] Qi Fei, Luo Yupin, Hu Dongcheng. Visual tracking of
[9] Perš J, Kovacic S. Computer vision system for tracking players through occlusions in low resolution. In: 6th
players in sports games. In: Proceedings of Int’l Work- IASTED International Conference on Signal and Image
Shop Image Signal Processing Analysis. Pula, Croa-tia, Processing. Singapore, 2004: 375-380.
2000: 177-182. [15] Zaveri M A, Merchant S N, Desai U B. Small and fast
[10] Perš J, Kovacic S. Tracking people in sport: Making use of moving object detection and tracking in sports video se-
partially controlled environment. In: Proceedings of the quences. In: IEEE International Conference on Multimedia
9th International Conference on Computer Analysis of Im- and Expo. Taipei, China, 2004: 1539-1542.
ages and Patterns. London, UK: Springer-Verlag, 2001:
374-382.

You might also like