Optical flow for motion estimation in video

Optical flow is the distribution of the apparent velocities of objects in an image. By estimating optical flow between video frames, you can measure the velocities of objects in the video. In general, moving objects that are closer to the camera will display more apparent motion than distant objects that are moving at the same speed.

Optical flow estimation is used in computer vision to characterize and quantify the motion of objects in a video stream, often for motion-based object detection and tracking systems.

Moving object detection in a series of frames using optical flow

Moving object detection in a series of frames using optical flow. See example for details.

For more information, see Computer Vision System Toolbox, which supports common techniques such as the Horn-Schunk method and Lucas-Kanade algorithm. For additional techniques, see downloads in the MATLAB user community.

Optical flow estimation to obtain motion vectors and pixel velocity magnitudes

Optical flow estimation to obtain motion vectors (left) and pixel velocity magnitudes (right).

Examples and How To

Software Reference

See also: motion estimation, object detection, object tracking, image stabilization, image and video processing, image recognition, object recognition, digital image processing, feature detection, feature matching, feature extraction, ransac