The previous blog post has already talked about the principle of Bayesian filtering and the derivation of the formula: http://www.cnblogs.com/JunhaoWu/p/bayes_filter.html
This paper introduces the principle of particle filtering from Bayesian filter to particle filter.
As we have mentioned earlier, the movement of the tracking target is seen as a dynamic system. The state of the system is represented by the state of the target. Here, you may want to track the target's central location as a system state xt= (IT,JT). In continuously changing image sequences, the state XT changes with time. Our goal is to estimate the state of the T-moment system, which in this case is the central position of the target.
The state estimation problem (target tracking, signal filtering) is the reliability of the current state XT based on a previous series of data Y1:t (Posteriori just) recursion. This credibility is the probability formula P (xt|y1:t).
P (xt|y1:t) can be calculated using the Bayesian formula, namely:
,
In the above equation, we also need to model P (YT|XT) and P (yt|y1:t-1). For example, p (YT|XT) can be considered as the similarity between the candidate target YT and the tracking target (that is, the similarity between the actual value XT and the observed YT), the use of a series of templates to reconstruct the YT, and then its reconstruction error as a candidate target and tracking the similarity of the target.
However, this is the problem that Bayesian filtering solves, and we now want to use particle filtering.
We know that P (xt|y1:t) can describe the distribution of the State XT (what is the value, and the probability of getting the value). Similarly, the sample also has the ability to describe the probability distribution. If you consider the XT as a random variable, if you can get enough sample values, the samples can describe the distribution of the XT completely. Nothing is to take what value, there is the probability of getting this value of the size of it. In the sample, the more samples that fall on the value, the greater the probability that it will be obtained, that is, the probability is expressed by frequency.
The idea of particle filtering is to simulate the probability distribution of State XT using samples as described above. We scatter some particle xti according to a probability distribution function and calculate the weight of the particles, which means that the particle is the likelihood of the state XT we want, that is P (xt|y1:t). The more particles scatter, the more accurate the simulation results (after all, the more samples the more you can explain the situation).
In the following example, the algorithm flow of particle filtering is briefly described as the target tracking:
1. Initialization phase: The feature description of the target, that is, how to represent the tracking target (gray value, color feature, etc.); initialize particles, which can be initialized using Gaussian distribution or even distribution (in MATLAB, RANDN functions and Rand Functions, respectively).
2. For each particle (each particle can also be seen as a candidate target)
1) Particle propagation xt-1i--XTi
2) Calculate the observed value of the particle xti-Yti
3) Extract the characteristics of candidate target Yti, measure its similarity to the tracking target, and the similarity as the weight of the particle xti
3. Particle resampling
4. Estimating System State XT based on particle and its weight value
Description
Particle propagation: xt-1 represents particles at t-1 moments that approximate the distribution function of the system state xt-1. What we want to estimate now is the T-moment State XT, which can propagate the particles of the t-1 moment according to the state equation, and get the particle xt of the T-moment, which is used to approximate the state distribution of T-moment. Of course, it is possible to use other methods for particle propagation, the main idea is to make the transmitted particles better approximate the probability distribution of the State XT.
Calculate the observed value of a particle: the center of the object we used earlier represents the state XT of the target at t time. Depending on the tracking target, we need to get different observations based on the XT. For example, the tracking target is a 3x3 matrix, then we need to obtain its local domain as the observed value of YT according to the XT.
Feature extraction: Although we get the observed value of the particle, yt. However, we need to extract more information about the target, such as grayscale values, color features, and so on. The purpose of this information is to better describe the tracking target and to serve the better tracking effect. After extracting the features, we can compare the similarity between the candidate target and the tracking target. And there are a lot of metrics for similarity, which is not explained in detail here. All in all, the more likely a candidate is to have the same tracking result we want. Therefore, we can use similarity as the weight of the particles. After all, the larger the similarity, the greater the likelihood that the state XT will get the particle.
Particle resampling: Some particles may be too far away from the target during the trace. The probability of these particles being the system state XT we want is very small, so the weights obtained are very small. Just by particle propagation to change the state of the particle, the stray particles are always deviating, and it's hard to get back to the target. In this case, the stray particles may accumulate more. This is known as the phenomenon of particle degradation. Degraded particles (the weight of small) role is not very much, even said it is useless ah! A waste of resources and no contribution to state estimation. So we need to resample the particles. The simplest way is to remove the particles that have a small weight (that is, the degenerate particles) and then copy the weights a few more. How simple rough ah, haha ha!
The above is the particle filter target tracking process! If there is any problem, or I write bad place, welcome you crossing various attacks.
From Bayesian to particle filter--round 2