Spent last weekend on #douhack (in Donetsk), I have been creating a program to count number of people walking through the street in front of web camera.
This appeared not such a simple task. To recognize moving objects I have used simple technique of background subtraction, when later frame with image capture from camera is subtracted pixel-by-pixel from previous image and revealing the regions which were moved from one frame to another.
More advanced algorithm described in documentation (see referenced works).
For tracking the person which moves I have tried a few techniques, camshift algorithm didn’t really helped. The reason for this is that algorithms doesn’t have enough “memory” capacity to track objects which are disappeared behind the other objects on the street. So I did a hack to linearize the movement of the person to estimate where moved object will appear again.
Here is demo how it works (pretty lame anyway):
http://www.youtube.com/watch?v=gcONLfkFSNM
Also Github link with sources:
https://github.com/mgalushka/pedestrians-traffic-calc
I strongly recommend this book to understand the basics of OpenCV and objects tracking (if pdf is not available – give me a shot and I will update link).
Big special thanks to Mateusz Stankiewicz for his blog post regarding the topic.
http://www.bogotobogo.com/cplusplus/files/OReilly%20Learning%20OpenCV.pdf
great code! i’m having trouble adding the pde to the eclipse project, can you give me a hand please? thanks!!
Hello, first of all, congratulations on your proyect i looks really good. I’m trying to do the same in eclipse, but i have no luck with PDE files instead of java files. Could you give me a hand with that,please? greetings from Argentina
Не могу вкурить как использовать этот код. Это библиотека которую надо подключать к java-программе или самостоятельная программа которую надо как-то скомпилять?
Hello, I just want say thanks for share, you are doing a great job.
thanks.
i want a program such that from a webcam fixed in a room should track person and show their positions
Hey, Wanted to download the book for the basics of OpenCV, but the link doesn’t seem to work.
Hi,
This link is working for me, please, try again:
http://www.bogotobogo.com/cplusplus/files/OReilly%20Learning%20OpenCV.pdf
Thanks.