Optical Flow

Compute optical flow motion vectors between image frames.

What it does

Optical Flow compares two frames of an image and produces the per-pixel motion between them: a flow map for wiring into Displace to warp along motion, a colour Visualization where hue shows direction and brightness shows speed, and a greyscale magnitude map of how much movement there is at each pixel.

By default the previous frame is buffered and compared against the current one, so a live source can be fed straight in. Wire an explicit image into Reference to compare against a specific frame instead of one frame ago.

Current status: this node is a placeholder in this build. It always reports no motion (a flat flow map, a black visualisation, zero magnitude) rather than running real motion estimation.

When to use it

ParameterTypeDefault
imageOneOf([FieldOf(Raster)])
referenceOneOf([FieldOf(Raster)])
qualityString"fast"
enabledBooleantrue
flow_scaleNumber1
thresholdNumber0
opacityNumber1

Gotchas

This node does not currently compute real optical flow. Every output is a constant no-motion value: flow map centred at zero displacement, black visualisation, zero magnitude. Quality, Flow Scale, Threshold, and Position have no effect yet. The wiring is ready; nothing live sits behind it in this build.

Worked example

  1. Add an Optical Flow node and wire a video or camera source into Image.

  2. Leave Reference unconnected to compare automatically against the previous frame, or wire in a specific frame to compare against that instead.

  3. Wire Flow Map into a Displace node's displacement input to warp along detected motion, or preview Visualization directly to see direction and speed as colour.

See also

Video · Vision Analyze · Point Tracker · Rasters (images)