Feature-based tracking

Feature-based tracking refers to tracking individual feature points across successive frames in the video. We use a technique called optical flow to track these features. Optical flow is one of the most popular techniques in computer vision. We choose a bunch of feature points and track them through the video stream.

When we detect the feature points, we compute the displacement vectors and show the motion of those keypoints between consecutive frames. These vectors are called motion vectors. There are many ways to do this, but the Lucas-Kanade method is perhaps the most popular of all these techniques. You can learn more in the official OpenCV doc, at https://docs.opencv.org/3.2.0/d7/d8b/tutorial_py_lucas_kanade.html ...

Get OpenCV 3.x with Python By Example - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.