Reputation: 87
I am not understanding the process to track and label several moving objects using python. I am able to isolate the moving objects (although the binary image still contains lots of noise) by converting each frame to grayscale, then blurring, then doing BGS.
I have found the contours with cv2.findContours()
, which gives me blobs as a list of numpy matricies. I want to use Kalman filter to track these blobs since it's very good at predicting the blob's position in the presence of noise. However it seems to me that finding the contours is an unnecessary step given the nature of KF, especially since the contour function returned a lot of highly questionable blobs.
I looked at the code for the kalman filter, and I don't see how I can tell it to track blobs, let alone tell the filter where the blobs are (or how to create the blobs using KF alone).
My question is, how does KF handle multiple object tracking if it doesn't know what or where the blobs are beforehand (which is why I got the contours, but this result is somewhat horrible). And, once KF does begin tracking the objects, how does it store the blobs such that it can easily be labeled?
Upvotes: 3
Views: 3274
Reputation: 815
The Kalman filter itself doesn't contain multiple object tracking machinery. For this, you need an additional algorithm on top: for example, Multiple Hypothesis Tracking (MHT) in Reid 1979 if you have unknown/varying numbers of objects or Joint Probabilistic Data Association if you have known numbers of objects.
Note, in order to actually implement MHT you need additional improvements introduced in Cox and Hingorani 1996, "An efficient implementation of Reid's multiple hypothesis tracking..."
Upvotes: 6