The mainstream algorithm of "turn" moving target detection and tracking

Source: Internet
Author: User

Not all, need to add slowly

A Moving target detection

(i) Poor background

1. Frame Difference

2.GMM

such as

The background subtraction algorithm can model the illumination change, noise disturbance and periodic motion of the background, and it can detect the moving target accurately in various situations. Therefore, in the case of fixed camera, the background subtraction algorithm is used in most tracking algorithms to detect targets. The limitation of the background subtraction algorithm is that it requires a static fixed camera.

(ii) Sports Ground

Optical Flow method

The method of optical flow estimation is based on the following hypothesis: The change of image gray distribution is caused by the motion of the target or scene, that is, the gray scale of the target and the scene does not change with the time. This makes the optical flow method has poor anti-noise capability, and its application range is limited to the hypothetical condition that the target and the scene's gray level remain the same. In addition, most of the optical flow calculation method is quite complex, if there is no special hardware device, its processing speed is rather slow, not up to the real-time processing requirements.

Two Target tracking

1. Regional and regional matching

The advantage of this algorithm is that when the target is not obscured, the tracking precision is very high and the tracking is very stable. However, its disadvantage is time-consuming, especially when the search area is large, and secondly, the algorithm requires that the target deformation is not large, and can not have too much occlusion, otherwise the relative precision will be lost.

2. Feature points (key points) tracking

The KLT tracking algorithm proposed by Klt:shi and Tomasi in 1994 is a widely used algorithm based on feature point tracking. Because the feature points are distributed throughout the target, even if some of them are obscured, they can still be traced to another part of the feature point, which is also the advantage of the feature-point tracking algorithm.

In the tracking algorithm based on feature point, the difficult problem is how to extract, save and delete the feature points accurately when the target is rotated or obscured.

3. Tracking algorithm based on active contour

The active contour model is also called the Snake model, which can track the contour of the target more accurately. The Snake model is well suited for the tracking of deformable targets, such as the tracking of moving cells. The combination of this model and Kalman filter can be better tracked. The snake model is more suitable for single-target tracking, and the active contour model based on level set method is more used for multi-target tracking.

4. Optical flow

Lucas-kanade Sparse Optical Flow calcopticalflowpyrlk (using pyramids)

Horn-schunck Dense optical Flow calcopticalflowhs

Dense optical flow requires a great amount of computation, and the method is simplified in OpenCV, that is, to match the neighborhood of a pixel of successive frames, which is called block matching.

Sparse optical flow requires a set of points to be specified before tracking, and if these points have some obvious characteristics, the trace is relatively stable and reliable. It can be seen that the computation is much smaller than the dense optical flow.

First, using the Goodfeaturestotrack function to get the strong boundary in the image as the feature point of the trace, next call the Calcopticalflowpyrlk function, enter two consecutive images, and select a set of feature points in the first image. The output is the position of this set of points in the next image. Then filter out the resulting tracking results and remove the bad feature points. Then the tracking path of the feature points is marked out.

(The actual effect is general)

5.mean-shift and Camshift

Mean-shift Advantages and Disadvantages

When the Meanshift algorithm is used for video target tracking, the target's color histogram is used as the search feature, and the iterative meanshift vector makes the algorithm converge to the target's real position, thus achieving the goal of tracking.

The traditional meanshift algorithm has several advantages in tracking:

(1) The calculation of the algorithm is not small, in the target area is known to be able to do real-time tracking;

(2) using the kernel function histogram model, it is insensitive to edge occlusion, target rotation, deformation and background motion.

At the same time, the Meanshift algorithm also has the following disadvantages:

(1) Lack of necessary template updates;

(2) As the width of the window remains constant during the tracking process, the tracking will fail when the target scale changes.

(3) When the target speed is relatively fast, the tracking effect is not good;

(4) The histogram feature is deficient in the description of the target color feature, and lacks the spatial information;

Because of its fast computation speed, it has certain robustness to target deformation and occlusion, so, in the field of target tracking, the meanshift algorithm is still valued by everyone. However, in view of its shortcomings, some improvements and adjustments can be made to the project in practice, for example:

(1) Introduce a certain target location change prediction mechanism, so as to further reduce the search time of meanshift tracking and reduce the computational amount;

(2) A certain way can be used to increase the "characteristics" for target matching;

(3) The fixed bandwidth of kernel function in traditional meanshift algorithm is changed to dynamic bandwidth;

(4) Adopt a certain way to learn and update the whole template;

Camshift algorithm

The full name of the Camshift algorithm is "Continuouslyadaptive Mean-shift", which is a continuous adaptive meanshift algorithm. The basic idea is that all image frames of the video sequence are meanshift, and the result of the previous frame (that is, the center position of the Search window and the window size) is the initial value of the search window of the next frame meanshift algorithm, so iterate. To put it simply, Meanshift is looking for the best iteration results for a single image, while Camshift is dealing with a video sequence and calls Meanshift for each frame of the sequence to find the best iteration results. It is precisely because the Camshift is processed for a video sequence so that it can adjust the size of the window continuously, so that when the size of the target changes, the algorithm can adjust the target area to continue tracking in an adaptive manner.

In the example of the camshift of OPENCV, the probability distribution of the target pixel is obtained by the histogram inverse projection by calculating the H component histogram of the target in the HSV space, and then the center position and size of the target window is automatically tracked and adjusted by invoking the Camshift algorithm of OPENCV. The algorithm is good for single target tracking in simple background, but if the tracked target is close to the background color or other target color, the tracking effect is poor. In addition, due to the use of color characteristics, it has a certain resistance to the shape change of the tracked target.

The Camshift algorithm in the OPENCV example can be divided into three parts:

A, calculate the color projection (reverse projection):

(1) In order to reduce the effect of illumination change on target tracking, the image is first converted from RGB color space to HSV color space.

(2) Histogram statistics of H component, histogram represents the probability of different H component values, or can be found in the H component of the size of x when the probability or number of pixels, that is, to obtain a color probability lookup table;

(3) The value of each pixel in the image is replaced by the probability of its color appearing, resulting in a color probability distribution map;

The above three steps are called reverse projection, it should be reminded that the color probability distribution map is a grayscale image;

B, Meanshift optimization

The previously mentioned Meanshift algorithm (http://blog.csdn.net/carson2005/article/details/7337432) is a non-parametric probability density estimation method, It obtains the position and size of the optimal search window by iterative calculation.

C, Camshift tracking algorithm

As mentioned earlier, Camshift is actually in the video sequence in each frame of the use of Meanshift, and the previous frame of the meanshift results as the initial value of the next frame, so constantly loop iteration, you can achieve the target tracking.

6.kalman Filter (Estimator)

Ext.: http://blog.csdn.net/loadstar_kun/article/details/8599327

The mainstream algorithm of "turn" moving target detection and tracking

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.