Ask Your Question
0

Counting detected objects with Haar Cascade

asked 2016-08-10 11:54:59 -0600

marcosbontempo gravatar image

updated 2016-08-10 12:02:48 -0600

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

edit retag flag offensive close merge delete

Comments

1

can it be, you're confusing "detection" (one time, per image) with "tracking" (long time, over several frames) ?

berak gravatar imageberak ( 2016-08-10 11:57:12 -0600 )edit

Sorry, my mistake @berak. You're right, I want to count the objects over several frames.

marcosbontempo gravatar imagemarcosbontempo ( 2016-08-10 12:05:02 -0600 )edit

again, just get on the magic bus ;)

berak gravatar imageberak ( 2016-08-10 12:10:28 -0600 )edit

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.

marcosbontempo gravatar imagemarcosbontempo ( 2016-08-10 12:10:52 -0600 )edit
1

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)

berak gravatar imageberak ( 2016-08-10 12:16:46 -0600 )edit

Is it too much hard? There are lot of videos: https://www.youtube.com/watch?v=qDK6n...

marcosbontempo gravatar imagemarcosbontempo ( 2016-08-10 12:18:14 -0600 )edit

i never watch youtube vids, they're all about bragging.

(but yes, a lot of work ahead for you)

berak gravatar imageberak ( 2016-08-10 12:20:33 -0600 )edit

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?

marcosbontempo gravatar imagemarcosbontempo ( 2016-08-10 12:37:08 -0600 )edit
1

i'm not exactly sure, what you're talking about now, but yes, e.g. CamShift is using histogram backprojection for tracking

berak gravatar imageberak ( 2016-08-11 01:05:47 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-08-10 12:02:34 -0600

berak gravatar image

updated 2016-08-10 12:04:07 -0600

a couple of keywords for furthur research:

  • tracking
  • Kalman Filter
  • Hungarian Algorithm
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-08-10 11:54:59 -0600

Seen: 1,268 times

Last updated: Aug 10 '16