I am curious about the logic behind KLT in openCV.
From what I have known so far, the images sent to find optical flow in OpenCV is firstly converted to grayscale.
What I am curious is that, when running the algorithm, we need set of features for computation. What are the features used in finding optical flow method in openCV?
Thank you :)
The KLT tracks an object in two steps; it locates the trackable features in the initial frame, and then tracks each one of the detected features in the rest of the frames by means of its displacement. The displacement of the specific feature is then defined as the displacement that minimizes the sum of differences.
Optical flow is the pattern of apparent motion of image objects between two consecutive frames caused by the movement of object or camera. It is 2D vector field where each vector is a displacement vector showing the movement of points from first frame to second.
Optical flow is one of the efficient approaches to track the movement of objects. Optical flow studies the relative motion of objects across different frame sequences based on the velocity of movement of objects and illumination changes.
There are 2 types of optical flow. Dense and sparse. Dense finds flow for all the pixels while sparse finds flow for the selected points.
The selected points may be user specified, or calculated automatically using any of the feature detectors available in OpenCV. Most common feature detectors include GoodFeaturesToTrack which finds corners using cornerHarris or cornerMinEigenVal
The feature list is then passed to the KLT Tracker calcOpticalFlowPyrLK.
Feature can be any point in the image. Most common features are corners and edges.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With