Well, if you have several objects that you would like to track, you can try Particle Filter .
Particle filters basically βpositionβ particles in the image, each of which has a specific weight. At each time step, these weights are then updated, comparing them with the actual measured value of the object at that time. Particles with a large weight will have more particles in their direction (with the addition of a small random part in the direction) for the next time step. After several time steps, the particles will be grouped around the object measured by position. That is why this method is sometimes also called the survival of the fittest method ...
So, all this builds a circle:
Initialization ----> Sampling > \ / > Updating Prediction < / \ < Association
Thus, this provides a good method of tracking objects in a given scene. One way to do tracking multiple objects would be to use this single particle filter on all objects that will work, but it has drawbacks when you try to give identifiers to objects, as well as when objects intersect with each other because particle clouds can lose one object and follow another.
To solve this problem, you can try a particle-mixture filter (Vermaak et al., [2003]). It tracks each of the objects with a separate particle filter (with, of course, less necessary particles).
A good article can be found here: http://www.springerlink.com/content/qn4704415gx65315/ (I can also provide you with a few other things if you like, and if you speak German, I can even give you a presentation that I kept this at my university a while ago)
EDIT:
I forgot to mention: since you are trying to do this in OpenCV: as far as I know, there is an implementation of the Condensation algorithm (the first one where you use one particle filter in the whole image), it is part of the OpenCV distribution, although this may be a bit dated. OpenCV may have newer ways to filter particles, but if you do not find many results on Google, if you are looking for OpenCV and particle filters
Hope that helps ... if not, please keep asking ...