A simple particle filter implementation for object tracking
- CMake ( version 3.5.1 or later )
- OpenCV ( version 3.4.1 or later )
- Please make sure your current working directories is under the program's root folder.
- mkdir build
- cd build
- cmake ..
- make
- make install
- Finally, the program will be installed under the Particle folder.
- ./ParticleFilter
The Simple Condensation Filter Algorithm (pseudo code) :
If ( First frame (t=1) )
{
Random select N positions (# of particles) on current frame;
}
Else
{
Sample the particles based on the transition probability;
}
Calculate the weight for each particle;
Normalization();
Resmaple();
The weight is updated iteratively based on the following equations :
Where
- The works is not scale invariant, it can apply some scale factors into the model to improve the robustness futher.
- I used a 3-dim histogram correlation to calculate the likelihood, however, it might be better to use other more accurate methods.
- Replace the more robust and efficient resampling algorithms to improve the running time and accuracy.