Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your problem is to assign one of several not distinguishable measurements (detected blobs) to your initial tracked tennis ball (a blob).

In computer vision and robotics this problem is called data association problem. You can find some literature about data association here and here. This papers describe methods how multiple measurements can be assigned to multiple objects. Your case is not as difficult as those from the papers, since you only want to track one object (your initial detected ball). Since the tracker provides a strong hypotheses of the position of your ball you can use the easiest method for data association. Its called Nearest Neighbour Association. Here the nearest measurement to the position of the ball is used to update the tracker. If you have an probabilistic tracker like Kalman Filter, you know the Gaussian distribution of the position of your object and you can use the mahalanobis distance instead the euclidean distance as distance measurement method. The mahalanobis distance give you a more reliable measure, that the measurement of the blob belongs to the object.

The processing pipeline could be:

  1. after the first occurrence of your ball, initialize your tracker
  2. capture the next frame and detect the blobs
  3. compute for all detected blobs the distance to the tracked object (use euclidean or mahalanobis distance) and find the measurement with the shortest distance.
  4. Update the tracker with this measurement. You can use a threshold to reject measurements with a too large distance. This will avoid unreliable measurement updates.