Optical flow based tracking
Optical flow is a very popular technique used in computer vision. It uses image feature points to track an object. Individual feature points are tracked across successive frames in the live video. When we detect a set of feature points in a given frame, we compute the displacement vectors to keep track of it. We show the motion of these feature points between successive frames. These vectors are known as motion vectors. There are many different ways to perform optical flow, but the Lucas-Kanade method is perhaps the most popular. Here is the original paper that describes this technique: http://cseweb.ucsd.edu/classes/sp02/cse252/lucaskanade81.pdf .
The first step is to extract the feature points from the current frame. For each feature point that is extracted, a 3x3 patch (of pixels) is created with the feature point at the center. We are assuming that all the points in each patch have a similar motion. The size of this window can be adjusted depending on the...