Skip to content

FarnebackOpticalFlow

Motion and trackingclassOpenCV 5.0.0
import { FarnebackOpticalFlow } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits DenseOpticalFlow.

Class computing a dense optical flow using the Gunnar Farneback's algorithm.

Constructors and members

static create

Create an owned FarnebackOpticalFlow instance with the supplied configuration.

Class computing a dense optical flow using the Gunnar Farneback's algorithm.

create(numLevels: number, pyrScale: number, fastPyramids: boolean, winSize: number, numIters: number, polyN: number, polySigma: number, flags: number): FarnebackOpticalFlow | null;
9 available overloads
create(): FarnebackOpticalFlow | null;
create(numLevels: number): FarnebackOpticalFlow | null;
create(numLevels: number, pyrScale: number): FarnebackOpticalFlow | null;
create(numLevels: number, pyrScale: number, fastPyramids: boolean): FarnebackOpticalFlow | null;
create(numLevels: number, pyrScale: number, fastPyramids: boolean, winSize: number): FarnebackOpticalFlow | null;
create(numLevels: number, pyrScale: number, fastPyramids: boolean, winSize: number, numIters: number): FarnebackOpticalFlow | null;
create(numLevels: number, pyrScale: number, fastPyramids: boolean, winSize: number, numIters: number, polyN: number): FarnebackOpticalFlow | null;
create(numLevels: number, pyrScale: number, fastPyramids: boolean, winSize: number, numIters: number, polyN: number, polySigma: number): FarnebackOpticalFlow | null;
create(numLevels: number, pyrScale: number, fastPyramids: boolean, winSize: number, numIters: number, polyN: number, polySigma: number, flags: number): FarnebackOpticalFlow | null;
numLevels

num levels argument (number).

pyrScale

pyr scale argument (number).

fastPyramids

fast pyramids argument (boolean).

winSize

win size argument (number).

numIters

num iters argument (number).

polyN

poly n argument (number).

polySigma

poly sigma argument (number).

flags

flags argument (number).

Returns

The FarnebackOpticalFlow | null result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

getNumLevels

Return the num levels configured on this FarnebackOpticalFlow object.

getNumLevels(): number;
Returns

The number result.

setNumLevels

Set the num levels used by this FarnebackOpticalFlow object.

setNumLevels(numLevels: number): void;
numLevels

num levels argument (number).

getPyrScale

Return the pyr scale configured on this FarnebackOpticalFlow object.

getPyrScale(): number;
Returns

The number result.

setPyrScale

Set the pyr scale used by this FarnebackOpticalFlow object.

setPyrScale(pyrScale: number): void;
pyrScale

pyr scale argument (number).

getFastPyramids

Return the fast pyramids configured on this FarnebackOpticalFlow object.

getFastPyramids(): boolean;
Returns

The boolean result.

setFastPyramids

Set the fast pyramids used by this FarnebackOpticalFlow object.

setFastPyramids(fastPyramids: boolean): void;
fastPyramids

fast pyramids argument (boolean).

getWinSize

Return the win size configured on this FarnebackOpticalFlow object.

getWinSize(): number;
Returns

The number result.

setWinSize

Set the win size used by this FarnebackOpticalFlow object.

setWinSize(winSize: number): void;
winSize

win size argument (number).

getNumIters

Return the num iters configured on this FarnebackOpticalFlow object.

getNumIters(): number;
Returns

The number result.

setNumIters

Set the num iters used by this FarnebackOpticalFlow object.

setNumIters(numIters: number): void;
numIters

num iters argument (number).

getPolyN

Return the poly n configured on this FarnebackOpticalFlow object.

getPolyN(): number;
Returns

The number result.

setPolyN

Set the poly n used by this FarnebackOpticalFlow object.

setPolyN(polyN: number): void;
polyN

poly n argument (number).

getPolySigma

Return the poly sigma configured on this FarnebackOpticalFlow object.

getPolySigma(): number;
Returns

The number result.

setPolySigma

Set the poly sigma used by this FarnebackOpticalFlow object.

setPolySigma(polySigma: number): void;
polySigma

poly sigma argument (number).

getFlags

Return the flags configured on this FarnebackOpticalFlow object.

getFlags(): number;
Returns

The number result.

setFlags

Set the flags used by this FarnebackOpticalFlow object.

setFlags(flags: number): void;
flags

flags argument (number).

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.