DenseOpticalFlow.evaluate

Evaluate dense optical flow method between two consecutive frames.

interface DenseOpticalFlow
evaluate
(
inout Image f1
,
inout Image f2
,
DenseFlow prealloc = emptySlice!([3], float)
,
bool usePrevious = false
)

Parameters

f1
Type: Image

First image, i.e. previous frame in the video.

f2
Type: Image

Second image of same size and type as f1, i.e. current frame in the video.

prealloc
Type: DenseFlow

Optional pre-allocated flow buffer. If provided, has to be of same size as input images are, and with 2 channels (u, v).

usePrevious
Type: bool

Should the previous flow be used. If true prealloc is treated as previous flow, and has to satisfy size requirements.

Return Value

Type: DenseFlow

Calculated flow field.

Meta