How to count number of blobs/person in a frame by frame video

2 visualizaciones (últimos 30 días)
BlueBee77
BlueBee77 el 18 de Jul. de 2017
Comentada: Sebastian Castro el 18 de Jul. de 2017
I am doing abject detection from a video in Matlab. The algorithm is working perfectly as i am using a for loop for blob counting using centroid. The problem arrives when the person leaves a scene, it starts again counting from one e.g., if there were three persons in the scene and it was counting as person1, person2,and person3. the person1 left the scene it should continue to say person2 and person3 but it starts again as person1 and person2. How can i say that when the person leaves a scene(using center of mass as movement feature) increment the counter by one.

Respuestas (1)

Sebastian Castro
Sebastian Castro el 18 de Jul. de 2017
  2 comentarios
BlueBee77
BlueBee77 el 18 de Jul. de 2017
Yes, they are using alot of functions and Kalman filter, which i don't need. I am thinking of something simple.
Sebastian Castro
Sebastian Castro el 18 de Jul. de 2017
I see.
You could always do something where you're constantly keeping track of the number of blobs at each frame.
  • Say you start with 2 blobs on the screen, so you assign the labels as "person1" and "person2". Save your count as 2.
  • Suddenly, you only have one blob. If the number of blobs decreases (and probably stays that way for a few frames), you can officially say a person has left.
  • Then, 2 new blobs appear (and stay there for a few frames?). Your counter was already set to 2, so now you can assign these new ones as "person3" and "person4". Increment the counter to 4.
... and so on.
- Sebastian

Iniciar sesión para comentar.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by