Skip to content

SparsePyrLKOpticalFlow

Motion and trackingclassOpenCV 5.0.0
import { SparsePyrLKOpticalFlow } 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 SparseOpticalFlow.

Class used for calculating a sparse optical flow.

The class can calculate an optical flow for a sparse feature set using the iterative Lucas-Kanade method with pyramids.

See: calcOpticalFlowPyrLK

Constructors and members

static create

Create an owned SparsePyrLKOpticalFlow instance with the supplied configuration.

Class used for calculating a sparse optical flow.

create(winSize: Size, maxLevel: number, crit: TermCriteria, flags: number, minEigThreshold: number): SparsePyrLKOpticalFlow | null;
6 available overloads
create(): SparsePyrLKOpticalFlow | null;
create(winSize: Size): SparsePyrLKOpticalFlow | null;
create(winSize: Size, maxLevel: number): SparsePyrLKOpticalFlow | null;
create(winSize: Size, maxLevel: number, crit: TermCriteria): SparsePyrLKOpticalFlow | null;
create(winSize: Size, maxLevel: number, crit: TermCriteria, flags: number): SparsePyrLKOpticalFlow | null;
create(winSize: Size, maxLevel: number, crit: TermCriteria, flags: number, minEigThreshold: number): SparsePyrLKOpticalFlow | null;
winSize

win size argument (Size).

maxLevel

max level argument (number).

crit

crit argument (TermCriteria).

flags

flags argument (number).

minEigThreshold

min eig threshold argument (number).

Returns

The SparsePyrLKOpticalFlow | 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.

getWinSize

Return the win size configured on this SparsePyrLKOpticalFlow object.

getWinSize(): Size;
Returns

The Size result.

setWinSize

Set the win size used by this SparsePyrLKOpticalFlow object.

setWinSize(winSize: Size): void;
winSize

win size argument (Size).

getMaxLevel

Return the max level configured on this SparsePyrLKOpticalFlow object.

getMaxLevel(): number;
Returns

The number result.

setMaxLevel

Set the max level used by this SparsePyrLKOpticalFlow object.

setMaxLevel(maxLevel: number): void;
maxLevel

max level argument (number).

getTermCriteria

Return the term criteria configured on this SparsePyrLKOpticalFlow object.

getTermCriteria(): TermCriteria;
Returns

The TermCriteria result.

setTermCriteria

Set the term criteria used by this SparsePyrLKOpticalFlow object.

setTermCriteria(crit: TermCriteria): void;
crit

crit argument (TermCriteria).

getFlags

Return the flags configured on this SparsePyrLKOpticalFlow object.

getFlags(): number;
Returns

The number result.

setFlags

Set the flags used by this SparsePyrLKOpticalFlow object.

setFlags(flags: number): void;
flags

flags argument (number).

getMinEigThreshold

Return the min eig threshold configured on this SparsePyrLKOpticalFlow object.

getMinEigThreshold(): number;
Returns

The number result.

setMinEigThreshold

Set the min eig threshold used by this SparsePyrLKOpticalFlow object.

setMinEigThreshold(minEigThreshold: number): void;
minEigThreshold

min eig threshold 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.