How to give moving contours an unique id? Ideas needed :-) [closed]

asked 2015-06-04 16:44:02 -0600

Bri gravatar image

updated 2015-06-05 07:33:40 -0600

berak gravatar image

Hello, I have a video of moving persons and I get the contours of them by background substraction.

At the moment with every new frame a contour gets, depending on the new position, another position in the contours vector.

How can I achieve that eyery contour can be identified with an unique id while mowing?

My idea is to use moments to calculate the size and center of every contour and then to identify the contours in the new frame fitting best togehter with size and center position.

Is there any better approach? Thank you very much :-)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-09-24 18:45:03.776450

Comments

What you are looking for is the principle of tracking in between frames. At first frame you initiate a tracker with the first detection. The tracker then predicts where that object will be in the next frame. You can then correct the tracker with the actual found blobs that are closest to the predicted position. Take a look at Kalman filter or Optical Flow.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-06-05 03:51:44 -0600 )edit
3

true, KF will help. still you need 1 KF per object, and you still need to find out, which object belongs to which KF ;)

http://en.wikipedia.org/wiki/Hungaria...

berak gravatar imageberak ( 2015-06-05 05:25:08 -0600 )edit
1

the trackig algorithm for cvBlob(https://code.google.com/p/cvblob/) was originally based on the paper "Appearance Models for Occlusion Handling". (http://citeseerx.ist.psu.edu/viewdoc/...)

(https://code.google.com/p/cvblob/wiki...)

But this process can be improved:

  • The history of the positions of the blob (Kalman filter, ...)
  • Appearance models (this can be color histograms, shape features, ...)

I think that one idea is to take some measurements about the direction of the optical flow. This direction can be taken into account in order to update the positions of the blobs.

albertofernandez gravatar imagealbertofernandez ( 2015-06-05 10:58:05 -0600 )edit
1

Thank you very much for all these suggestions :-) I have a look at it. Yet I think I will try the approach using Kalman filter.

Bri gravatar imageBri ( 2015-06-08 06:39:09 -0600 )edit