Keeping track of which blob is which?

Hi,

I am using opencv and ofxCvContourFinder to find blobs from a webcam (using background subtraction) and then assigning each blob an image to follow it. The images are stored in a vector and randomly chosen for each new blob. The problem I am having is how do I keep track of each blob and keep it assigned with the image generated for it as it moves around the screen.

Any suggestions?

Would the best thing to do to be to store the points from each blob and compare them to new blobs coming to match which is which?

Just seen the tracker in ofxCV add on. I’m guessing this is the best way to do it. Let me know if anyone knows of anything better.