Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Motion Estimation

Track object motion between video frames

Motion estimation is the process of determining the movement of blocks between adjacent video frames. This toolbox includes motion estimation algorithms, such as optical flow, block matching, and template matching. These algorithms create motion vectors, which relate to the whole image, blocks, arbitrary patches, or individual pixels. For block and template matching, the evaluation metrics for finding the best match include MSE, MAD, MaxAD, SAD, and SSD.

Functions

opticalFlowObject for storing optical flow matrices
opticalFlowFarnebackEstimate optical flow using Farneback method
opticalFlowHSEstimate optical flow using Horn-Schunck method
opticalFlowLKEstimate optical flow using Lucas-Kanade method
opticalFlowLKDoGEstimate optical flow using Lucas-Kanade derivative of Gaussian method
vision.BlockMatcherEstimate motion between images or video frames
vision.TemplateMatcherLocate template in image

Blocks

Block MatchingEstimate motion between images or video frames
Optical FlowEstimate object velocities
Template MatchingLocate a template in an image

Topics

MATLAB Workflow

Optical Flow Estimation Using the Farneback Algorithm

Estimate car motion using the Farneback algorithm.

Compute Optical Flow Using Lucas-Kanade derivative of Gaussian

Estimate car motion using the Lucas-Kanade derivative of Gaussian.

Compute Optical Flow Using Horn-Schunck Method

Estimate car motion using the Horn-Schunck method.

Construct Optical Flow Object and Plot Its Velocity

Plot the velocity of a moving object in a quiver plot.

Simulink Workflow

Color-based Road Tracking

This example shows how to use color information to detect and track road edges set in primarily residential settings where lane markings may not be present.

Lane Departure Warning System

This example shows how to detect and track road lane markers in a video sequence and notifies the driver if they are moving across a lane.

Tracking Cars Using Foreground Detection

This example shows how to detect and count cars in a video sequence using Gaussian mixture models (GMMs).

Tracking Cars Using Optical Flow

This example shows how to detect and track cars in a video sequence using optical flow estimation.