Preface
Removing Snow
This article uses the characteristics of a Kalman filter to track snowflakes, with the goal of removing snow from a static background image.
For the basic idea behind Kalman filters, you can refer to this article.
I will go straight to the code here. Since matrix operations are much more convenient in MATLAB, I used MATLAB for the experiment. For an engineering implementation, OpenCV and C++ would still be the more practical first choice.
MATLAB Code
1 | % demo.m |
Kalman filter:
1 | % Kalman.m |
Result
Summary
That is all for now. If I have time later, I will add an OpenCV version as well.