DenseOpticalFlow

Objective-C

@interface DenseOpticalFlow : Algorithm

Swift

class DenseOpticalFlow : Algorithm

Base class for dense optical flow algorithms

Member of Video

Methods

  • Calculates an optical flow.

    Declaration

    Objective-C

    - (void)calc:(nonnull Mat *)I0 I1:(nonnull Mat *)I1 flow:(nonnull Mat *)flow;

    Swift

    func calc(I0: Mat, I1: Mat, flow: Mat)

    Parameters

    I0

    first 8-bit single-channel input image.

    I1

    second input image of the same size and the same type as prev.

    flow

    computed flow image that has the same size as prev and type CV_32FC2.

  • Releases all inner buffers.

    Declaration

    Objective-C

    - (void)collectGarbage;

    Swift

    func collectGarbage()