Object Tracking System Using Camshift Meanshift and Kalman Filter PDF
Object Tracking System Using Camshift Meanshift and Kalman Filter PDF
Abstract—This paper presents a implementation of an object in the earlier researches. Selecting the right feature plays a
tracking system in a video sequence. This object tracking is an critical role in the tracking object in video sequence. Feature
important task in many vision applications. The main steps in video selection is closely related to the object representation. The
analysis are two: detection of interesting moving objects and tracking
of such objects from frame to frame. In a similar vein, most tracking object motion analysis usually focuses on simple characteris-
algorithms use pre-specified methods for preprocessing. In our work, tics such as texture, color, shape, geometry, etc. In general,
we have implemented several object tracking algorithms (Meanshift, many tracking algorithms use a combination of these features.
Camshift, Kalman filter) with different preprocessing methods. Then, In general, these features are selected manually by the user,
Open Science Index, Electronics and Communication Engineering Vol:6, No:4, 2012 waset.org/Publication/15036
we have evaluated the performance of these algorithms for different depending on the application domain. However, the problem of
video sequences. The obtained results have shown good performances
according to the degree of applicability and evaluation criteria. automatic feature selection has received considerable attention
in pattern recognition, namely the detection of objects to
Keywords—Tracking, Meanshift, Camshift, Kalman filter, Evalua- achieve tracking in video sequences. Tracking is often the first
tion.
step in an analysis of activities, interactions and relationships
between objects of interest. Many algorithms of object tracking
I. I NTRODUCTION have been proposed and developed. Tracking is the estimation
and analysis of trajectories of an object in the plane of the
Object tracking is an important research topic in computer
image by moving through a sequence of images or video.
vision. The rapid increase in numbers of great powered
These include for example when the main existing algorithms
computers, the avaibility of high quality and high precision
in the literature as the block-matching, KLT, the Kalman filter
and cheap video cameras. Consequently, the use of object
[6], [5] , Meanshift [2], [7] and Camshift [11], [9], [10].
tracking (person, face, hand, glass, car) is in the tasks of
The rest of paper is organized as follow: section 2 presents
automobile driver assistance, vehicle navigation, robotics,
the object tracking system. In section 3, we describe the
human-computer interaction, video surveillance, biometric,
principle methods of preprocessing, to detect the exact position
video games and industrial automation and security. Most of
of the object in the images of the sequence analyzed and the
these applications require reliable object tracking techniques
experimental results and shows the performance of our object
that meet in real-time constraints. The object tracking in
tracking in a video sequence. In section 4 summarizes our
a video sequence can be defined the dynamic entities that
work and outlines potential further improvements.
constantly change under the influence of several factors. In
the physical world, there are five parameters to be considered:
changes of the appearance, illumination, scale, object, and II. O BJECT TRACKING SYSTEM
movement of the object (fast or slow). The variation of one To ensure good organization the progress of work, we used
of these parameters can influence the results of our tracking the benefits of modular design in our algorithm implemented
algorithm (the change of illumination, the change of scale, using MATLAB. The goal of an object tracking is to gen-
the change in appearance, the change of motion of the object erate the trajectory of an object over time by discovering
and the change of the object). A huge number of tracking its exact position in every frame of the video sequence. we
methods which have been proposed in earlier researches. In have implemented several object tracking algorithms (Mean-
a tracking video sequence, an object can defined as anything shift, Camshift, Kalman filter) with different preprocessing
that is interesting for analysis. For example, people walking methods. The algorithm for object tracking is composed of
on a road, planes in the air, cars in the road, and hand or three modules: selection object module in the first frame of
a face in motion, etc. In recent researches, the form and the sequence, the module of Meanshift algorithm and the
appearance representations are classified into three families module of Camshift algorithm. The selection module selects
as the representation by points, representation by bounding the position of the object in the first frame. It consists of
boxes and the object silhouettes and contour [4], [16]. These extracting the module initialization parameters that are moving
methods for object tracking in video sequence and the feature through the position, size, width, length of the search window
selection for tracking are applied for many tracking algorithms of the object in the first frame of the sequence. The step of
object tracking system are shown in figure 1.
Computers Imaging Electronics and Systems Group(CIELS)
Research unit on Intelligent Control, design and Optimisation of complex
Systems (ICOS) A. Meanshift
University of Sfax, Sfax Engineering School, BP W, 3038 Sfax, Tunisia
Phone: (216-74) 274.088, Fax. (216-74) 275.595. The meanshift algorithm is a non-parametric method [13],
Emails:[email protected]. [2], [7]. It provides accurate localization and efficient matching
International Scholarly and Scientific Research & Innovation 6(4) 2012 421 ISNI:0000000091950263
World Academy of Science, Engineering and Technology
International Journal of Electronics and Communication Engineering
Vol:6, No:4, 2012
video sequence zero (1) represents the area occupied by the shape of the frame.
M 00 = I(x, y) (1)
preprocessing block
x y
International Scholarly and Scientific Research & Innovation 6(4) 2012 422 ISNI:0000000091950263
World Academy of Science, Engineering and Technology
International Journal of Electronics and Communication Engineering
Vol:6, No:4, 2012
M 11
b=2×( − x c × yc ) (9) The measurement model is defined by equation (17).
M 00
zk = H × sk + vk (17)
M 02
c= − yc2 (10)
M 00 With H (18) is the measurement matrix:
⎛ ⎞
The length and width of the distribution around the centroid 1 0 0 0 0 0
is then given by equations (11) and (12). ⎜0 1 0 0 0 0⎟
H=⎜ ⎝0 0 1 0 0 0⎠
⎟ (18)
(a + c) + b2 + (a − c)2 0 0 0 1 0 0
l= (11)
2 Noise process ”wk−1 ” and as ”vk ” are assumed independent
of state vectors and measurement and normal distributions and
((a + c) − b2 + (a − c)2 white that are presented by equations (19) et (20):
w= (12)
2
p(w) ∼ N (0, Q) (19)
C. Block Kalman filter p(v) ∼ N (0, R) (20)
The Kalman filter estimates the position of the object in
Open Science Index, Electronics and Communication Engineering Vol:6, No:4, 2012 waset.org/Publication/15036
International Scholarly and Scientific Research & Innovation 6(4) 2012 423 ISNI:0000000091950263
World Academy of Science, Engineering and Technology
International Journal of Electronics and Communication Engineering
Vol:6, No:4, 2012
of an object in a video sequence (Camshift algorithm and the Fig. 3. Preprocessing results of 3 sequences video by the histogram method.
algorithm of the Kalman filter):
Ex = xKalman − xCamshif t (30)
The results of error calculation for estimating the parameters Video Forman: Frame 27 Frame 63 Frame 93
99 1 1 11 -32 0.1073 0.2374 Trajectory from the centre of the glass with Kalman filter.
We implemented the proposed algorithm in MATLAB, and Initial position of centre of the glass
tested it on five sequence video. The tests video sequences was X (pixels)
International Scholarly and Scientific Research & Innovation 6(4) 2012 424 ISNI:0000000091950263
World Academy of Science, Engineering and Technology
International Journal of Electronics and Communication Engineering
Vol:6, No:4, 2012
process of the moving car obtained in this method. The third several methods preprocessing to detect the object in each
frame of the sequence, provides satisfactory results in the case
of the complex video sequence (illumination change, change
in appearance, scale, change of subject and object movement).
Image 53 Image 54 Image 55 Image 57
R EFERENCES
[1] A. Alper and J. Omar and S. Mubarak, “ Object Tracking: A Survey”.
ACM Computing Surveys, vol. 38, no. 45, pp. 1–45. 2006.
Image 58 Image 59 Image 60 Image 62 [2] D. Chen and F. Bai and B. Li and T. Wang, “ BEST: A Real-time
Tracking Method for Scout Robot”. IEEE/RSJ International Conference
Fig. 6. Tracking results of the moving car by the background substraction. on Intelligent Robots and Systems, no. 6, pp. 1001–1006. 2009.
[3] J. Wang and F. He and X. Zhang and G. Yun, “ Tracking Object throuth
Occuusions Using Improved Kalman Filter”. IEEE 2010, no. 6, pp. 223-
228. 2010.
TABLE III
[4] N.A Gmez, “ A Probabilistic Integrated Object Recognition and Tracking
P RECISION VALUES CALCULATED FOR THE METHOD OF BACKGROUND
Framework for Video Sequences”. Universitat Rovira I Virgili, PHD
SUBTRACTION AND EXECUTION TIME .
thesis, Espagne, 2009.
[5] X. Sun and H. Yao, and S. Zhang, “ A Refined Particle Filter Method for
video frames Precision (%) execution time(s) Contour Tracking”. Visual Communications and Image Processing, no. 8,
Open Science Index, Electronics and Communication Engineering Vol:6, No:4, 2012 waset.org/Publication/15036
IV. C ONCLUSION
This paper focuses on simultaneous tracking of multiple
object (a human,a face, a hand, a glass, a car). During the test
sequences generated with different methods of pre-processing,
we can conclude that the tracking of objects differs from one
object to another and several parameters can affect the results
of tracking. Experimental results show that our algorithm
(Camshift and the Kalman filter) is superior in terms of
precision, reliability and execution time, compared the various
methods presented in the literature. In particular, the use of
International Scholarly and Scientific Research & Innovation 6(4) 2012 425 ISNI:0000000091950263
World Academy of Science, Engineering and Technology
International Journal of Electronics and Communication Engineering
Vol:6, No:4, 2012
SALHI Afef was born in Sfax, Tunisia in 1985. He received a degree
in electrical engineering and Master degree in Control and
Computer Engineer- ing from National School of Engineers of Sfax in
2009 and 2011. He is currently pursuing a thesis at the same university
in Laboratory of Electronics and Information Technologies (L.E.T.I). His
main research interests include Codesign software Hard- ware high level
of MPSoCs (FPGA, DSP, GPP) for real time application, image and
video processing,multimedia application, medical application, system
tracking.was born in Sfax, Tunisia in 1985. He received a degree in electrical
engineering and Master degree in Control and Computer Engineering from
National School of Engineers of Sfax in 2009 and 2011. He is currently
pursuing a thesis at the same university in Laboratory of Electronics and
Information Technologies (L.E.T.I). His main research interests include
Code- sign software Hardware high level of MPSoCs (FPGA, DSP, GPP)
for real time application, image and video processing, multimedia
application, medical application, system tracking.
Open Science Index, Electronics and Communication Engineering Vol:6, No:4, 2012 waset.org/Publication/15036
International Scholarly and Scientific Research & Innovation 6(4) 2012 426 ISNI:0000000091950263