Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Object for storing optical flow matrices

The `opticalFlow`

object stores the direction
and speed of a moving object from one image or video frame to another. Use the object
function `plot`

to plot the optical flow
vectors.

`flow = opticalFlow`

`flow = opticalFlow(Vx,Vy)`

creates an
optical flow object with default property values. `flow`

= opticalFlow

creates an optical flow object from two equal-sized matrices
`flow`

= opticalFlow(`Vx`

,`Vy`

)`Vx`

and `Vy`

. The matrices
`Vx`

and `Vy`

are the
*x* and *y* components of velocity
respectively. The input velocity components set the Properties of optical flow
object.

`plot` | Plot optical flow vectors |

`opticalFlowFarneback`

| `opticalFlowHS`

| `opticalFlowLK`

| `opticalFlowLKDoG`

| `quiver`