Learn Before
Concept

Optical Flow in OpenCV

OpenCV implements the Lucas-Kanade optical flow which does a least squares fit on the motion of 9 points (3x3 neighborhood of pixels). The algorithm is represented on little movement between frames since the motion is being represented in 2D. The function is called cv2.calcOpticalFlowPyrLK() and takes in the previous and next frame as well as the points from previous. It then returns the points for the next frame along with a status value telling you whether or not the point has been dropped (not found in the next frame).

0

1

Updated 2021-10-22

Tags

Data Science