We will now start with the tracing of feature points in a video, frame by frame. Let's take a look at the following steps:
- To start the tracking process, the first thing to do is to detect the feature points in an initial frame. You then try to track these points in the next frame.
- Obviously, since we are dealing with a video sequence, there is a good chance that the object, on which the feature points are found, has moved (this motion can also be due to camera movement). Therefore, you must search around a point's previous location in order to find its new location in the next frame. This is what the cv::calcOpticalFlowPyrLK function accomplishes. That is, you input two consecutive frames and a vector of feature points in ...