Counting detected objects with Haar Cascade
Hello,
I'm using a Haar Cascade classifier to identify in a camera capture. Now I also want to count the detected faces, but I'm having some logical problems to do it.
First I tried to add the number of the detected faces in every frame. It didn't work because the same face is added again after a new frame. Other problem is that the Cascade sometimes fails and the face is not detected. I don't want to count these instabilities or detections that happen in only one frame.
Does anybody know how to implement a reliable algorithm to count objects detected by a Haar Cascade classifier?
Any tip will be very helpful,
Thanks
can it be, you're confusing "detection" (one time, per image) with "tracking" (long time, over several frames) ?
Sorry, my mistake @berak. You're right, I want to count the objects over several frames.
again, just get on the magic bus ;)
My main doubt is how to count only one time a object while it stays on the video. In all my attempts I counted multiple times the same object.
yes, that's a known (and quite a "solved") problem. again, you need to track your found objects over time (-> trackiing), refine your estimation (-> kalman), and finally reassign your objects (-> hungarian)
Is it too much hard? There are lot of videos: https://www.youtube.com/watch?v=qDK6n...
i never watch youtube vids, they're all about bragging.
(but yes, a lot of work ahead for you)
I'm thinking if there are some parameters that differ one person from the others. For example, if the distance between my eyes is 10 pixels, my algorithm can realize that I'm still in the video and don't count me again. What do you think @berak? Do you if there is a parameter or operation that I can use, like a histogram?
i'm not exactly sure, what you're talking about now, but yes, e.g. CamShift is using histogram backprojection for tracking