High Speed Moving Target Tracking Algorithm based on Mean Shift for Video Human Motion

As an important research field of computer vision, there are a lot of achievements of human action recognition in recent Most of the researches are confined to the daily gentle action of human, such as walking jogging, sitting down. In sports video there were many specific characteristics about human actions, such as the upside pose of human, high speed, moving viewpoint. For human motion characteristics of sports video, a highspeed moving target tracking algorithm was proposed. Mean shift was an effective tracking algorithm, which was employed to track moving object in video, but it loses object frequently when the tracked object in the video moves rapidly. We advanced an approach to tracking object moving rapidly, and it can work effectively when the object was in cluttered environment. Experimental shows that the proposed algorithm can improve the tracking effect of mean shift algorithm and effectively track high-speed moving target.


Introduction
Moving object tracking in the video sequence is a process of determining the position of moving objects in sequence images to set the positional relationship between the objects in the current frame image and in the subsequent frame image. Therefore, the moving object tracking in the video sequence can be regarded as a pattern matching process [1,2]; that is to search corresponding feature pattern in subsequent frame image according to the feature of the current frame image [3]. In the moving process of moving objects, factors such as background, the transformation of external lighting, mutual occlusion of objects in the motion scene, etc. make the feature of objects change along with time, which makes it difficult to achieve accurate tracking of moving objects [4][5][6]. Features used for object tracking mainly include shape, texture, color, optical flow, corner point, etc. When adopting shape feature tracking, the object shape in the image would change along with the angle. As to the non-rigid objects, due to their own deformation, the shape would change dramatically with time. In addition, with the blocking by other objects or themselves, the shape of objects would also change. The color feature is likely to be affected by external lighting. In the camera motion scene, tracking method adopting optical flow feature can hardly achieve the tracking of objects [7,8]. Some methods adopt the local features of objects to track objects [9,10].
In Equation (1), to distinguish the importance of different gathering points, give each sampling point a weight ( ) i w x greater than zero. ( ) K x is a kernel function that represents the influence of sampling points on the density estimation function of different positions. In order for the probability to be equal to 1, make x represents the ith component of vector x X ∈ . R represents the real domain, and if a function has a section function And meet the following conditions: K is non-negative; K is monotonic; K is piecewise continuous. So, the function ( ) K x is called a kernel function. Commonly used kernel functions include homogeneous kernel function and Gauss kernel function. Unit uniform kernel function, It is shown in Equation (3). 1 || || 1 , it is the negative derivative of ( ) k x .Define the shadow kernel function of ( ) K x .It is shown in Equation (5).

High Speed Moving Body Target Tracking Algorithm
According to the mean shift tracking principle analysis, the current state of the system is estimated according to the observed value, which is a Bayesian optimization filtering problem. When estimates status based on Bayesian theory, if the object model is linear and the noise complies with gauss distribution, then Kalman filtering algorithm can be adopted to obtain a set of optimal analytical solutions. As for the non-gauss nonlinear system, particle filter algorithm can be adopted to achieve filtering estimation. Some traditional difficulties such as object detection, occlusion, intersection, track-losing and other problems can be better solved by particle filter algorithm. To effectively track high-speed moving object, particle filter and mean shift algorithm are combined. First, move the object position 0 y of the last frame, and use object moving model to estimate the current frame location ' y , then use mean shift to converge y to the current frame location ' y . Update the particle weights by observing the Bhattacharyya coefficient between ' y and y .

Particle Filter Tracking Principle
The moving of objects is a variation process of object status (position, speed, etc.) over time, and the tracking of objects can be regarded to estimate object status at different times through observations. To analyze and deduce the status of the system at different times, two models are needed generally. One is system model which is used to describe the variation relationship of system status over time; the other is measurement system which is used to build the relationship between system status and observations of band noise. The status estimation based on Bayesian inference is to establish the posterior probability density function based on all the known information. The Bayesian posterior probability density estimation includes two stages: prediction and update. In the prediction stage, the system model is used to estimate the probability density function of system status. There exist biases in the status distribution of prediction due to the system is subject to various types of interference. Update stage uses the latest observations to modify the predicted model.
Assuming that a target is tracked, the state sequence { , } k Z k N ∈ of the target has the following relations. It is shown in Equation (6).
So the task of tracking is to recursively estimate state k Z from the observed value of k X .It is shown in Equation (7).
The target tracking based on bayesian estimation is the probability distribution function ( | ) k k p Z X can be recursively used to predict and update the two processes.

High Speed Algorithm Description
In the two-dimensional video image frame, the horizontal and vertical coordinates of the center point x y x y Z P P V V = . The maneuver of the object is considered as a random interference, the interference size of which is represented by covariance w of the process noise. Because the variation of movement velocity of objects between adjacent frames in the videos is not large, first-order constant velocity model is used to describe the motion law of objects. The dynamic model can be expressed by the Equation (8).
After the prediction of system status by the motion model, status estimation value ' t Z at the time t can be obtained, then use the observation at that time to modify. Observations can be objects' location, speed, and direction angle, etc.. The process of modifying system status by observations is essentially a process of similarity metric to measure the similarity degree between the possible status and current status of objects. Since each particle represents a possible prediction of the object status, the aim of the system observation is to make particles that are close to the practical situation obtain larger weights, while particles that differ greatly from the practical situation obtain smaller weights. According to this principle, we define the probability density function of observation (likelihood function) as Equation (9). The larger the value in Equation (9), the smaller the distance between y and ' y , which means the more reliable of the requirements for adopting mean shift and the bigger probability of the candidate object to be the real object. By selecting the transition probability density function ( | ) i t t p X Z as the signification density function, the weight of particle is updated to Equation (10).
10) After describing the particle filter algorithm's tracking motion model and observation model, we present the algorithm of high-speed moving target tracking based on mean shift and particle filter. The algorithm is as follows: 1. According to the selected tracking target position and speed in the initial frame, 0 ( 1,..., ) . Simple random resampling is applied to solve the problem of particle degradation. After this step, the obtained particles represent the posterior distribution of the target state at t time.
6. The target state value is estimated according to the particle i k w .

Experimental Results and Analysis
On the basis of proposing the tracking algorithm for high-speed moving object based on mean shift, VC and OpenCV are combined to achieve the above algorithm. Several sets of videos containing high-speed moving objects are validated using this algorithm and are compared with the camshift algorithm provided in OpenCV. In the experiments, tracking objects are determined manually, different amounts of particle tracking are adopted for each object and the results are compared. To verify the tracking effect of algorithm on high-speed moving objects, high-speed moving footballs are selected as the object to be tracked in the videos. Figure1 is a result of tracking footballs in the football match videos. The video frame size is 480x360 pixels. The along direction is three consecutive frames in the video. Figure1 (a) is the tracking effect of camshift algorithm provided by OpenCV algorithm library. Figure1 (b) is the tracking result by this paper algorithm library.
See from Figure1 (a). In the two frames after the first frame, the object center tracked by camshift algorithm deviates greatly from the object to be tracked (football) and has a significant feature: the object center obtained from camshift algorithm deviates to the opposite direction from the object and the size of it is tend to grow bigger. Through the principle analysis of Mean shift algorithm, it is easy to understand the deviation of object center of mean shift algorithm from the practical center and why it moves in the opposite direction to the object. In tracking sequence, the size of the candidate objects obtained by camshift algorithm is larger than the practical one because camshift algorithm adopts the automatic adjustment of the search window size to adapt to changes in the object size. As what have mentioned above, due to the limitations of the mean shift algorithm, assuming that the variation of the location of objects between the adjacent frames is small, in the camshift algorithm, a feature space model closer to the template can be obtained through adjusting the candidate object size. In the three  Under the circumstances of footballs being in high-speed moving, objects can still be accurately tracked, which means the algorithm described in this paper has better tracking effect when tracking high-speed moving objects. Because this algorithm combines the particle filter with mean shift, which enables the algorithm has the advantage of particle filter tracking. Particle filter tracking can achieve great tracking effect when objects are partially occluded, interfered and in complex scenarios, etc. To verify the tracking effect of the algorithm in the scenarios with interference, human body in the diving video is chose to be the tracking object.  Figure 2(a), the continuous image of third frame is followed by the Camshift algorithm. In Figure 2(b), the continuous image of third frame is the tracking result of this algorithm. Figure 2(a) the target of the third frame has completely deviated from the actual target. In addition to the reasons for the high speed of the target movement, it was also disturbed by the audience as a background. The above conclusion is easy to get from third frame to the target center and target size. In Figure 2(b) three consecutive frames, the target center and size of the algorithm are quite consistent with the actual target center and size. In the case of background interference, our tracking algorithm can also track the target of high-speed movement well.

Conclusion
After analyzing the principle of mean shift algorithm, we pointed out the mean shift algorithm is unable to realize the cause of the high speed moving target tracking, and for this reason, this paper proposes a new tracking algorithm, this algorithm first application of particle filter algorithm to estimate the location of the target in the current frame, and then through the mean shift algorithm to update the location of the object. Because of the mean shift algorithm can quickly converge, the mean shift optimization method can be used to extract the typical "particles" which reflect the probability characteristics of the system more quickly. With a small amount of particles, the tracking precision can be satisfied, and the particle filter performance can be improved to meet the need of real-time tracking.