Take the 2-minute tour ×

I'm working on a blob matching and tracking library in C++. Currently I'm using OpenCV to detect blobs and try to match blobs in a new frame by checking the position, velocity and size of the blob. This works quite okay and I'm receiving a high blob match rate (95% or higher).

Sometimes blobs fall out of the image or new blobs appear. Now I need to give matched blobs the same ID as they had before. I'm wondering if there are typical or commonly used techniques for doing this. Or even some keywords I can use to Google on.


share|improve this question
add comment

2 Answers


I assume you have your blobs in a binary image, simply floodfill each blob with a different color/id, and register overlapping blobs between frames with the same id.

share|improve this answer
Hi Viktor, thanks for your reply. Though this will not work with fast moving objects as they will not have overlapping pixels (for example tennis balls). –  pollux Jun 14 '10 at 11:42
add comment

CCV is used for multiple finger tracking for multi-touch environments. Check out their tracking code. It uses a function trackKnn which uses k nearest neighbour algorithm.

You can also use Kalman Filter if blobs collide each other. Check out this SO

share|improve this answer
add comment

Your Answer


