Skip to content

optflow_SparseRLOFOpticalFlow

optflowclassOpenCV 5.0.0
import { optflow_SparseRLOFOpticalFlow } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSoptflow_SparseRLOFOpticalFlow
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

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

Class used for calculation sparse optical flow and feature tracking with robust local optical flow (RLOF) algorithms.

The RLOF is a fast local optical flow approach described in [Senst2012] [Senst2013] [Senst2014] and [Senst2016] similar to the pyramidal iterative Lucas-Kanade method as proposed by [Bouguet00]. More details and experiments can be found in the following thesis [Senst2019]. The implementation is derived from optflow::calcOpticalFlowPyrLK().

For the RLOF configuration see optflow::RLOFOpticalFlowParameter for further details. Parameters have been described in [Senst2012], [Senst2013], [Senst2014] and [Senst2016].

Note: SIMD parallelization is only available when compiling with SSE4.1. See: optflow::calcOpticalFlowSparseRLOF(), optflow::RLOFOpticalFlowParameter

Constructors and members

static create

Creates instance of SparseRLOFOpticalFlow

create(rlofParam: optflow_RLOFOpticalFlowParameter | null, forwardBackwardThreshold: number): optflow_SparseRLOFOpticalFlow | null;
3 available overloads
create(): optflow_SparseRLOFOpticalFlow | null;
create(rlofParam: optflow_RLOFOpticalFlowParameter | null): optflow_SparseRLOFOpticalFlow | null;
create(rlofParam: optflow_RLOFOpticalFlowParameter | null, forwardBackwardThreshold: number): optflow_SparseRLOFOpticalFlow | null;
rlofParam

see setRLOFOpticalFlowParameter

forwardBackwardThreshold

see setForwardBackward

Returns

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

setRLOFOpticalFlowParameter

Configure the rlofoptical flow parameter.

See: setRLOFOpticalFlowParameter

setRLOFOpticalFlowParameter(val: optflow_RLOFOpticalFlowParameter | null): void;
val

val argument (optflow_RLOFOpticalFlowParameter | null).

getRLOFOpticalFlowParameter

See: setRLOFOpticalFlowParameter

getRLOFOpticalFlowParameter(): optflow_RLOFOpticalFlowParameter | null;
Returns

The optflow_RLOFOpticalFlowParameter | null result.

setForwardBackward

Threshold for the forward backward confidence check For each feature point a motion vector d_{I0,I1}(\mathbf{x}) is computed. If the forward backward error

 EP_{FB} = || d_{I0,I1} + d_{I1,I0} || 
is larger than threshold given by this function then the status  will not be used by the following

vector field interpolation. d_{I1,I0} denotes the backward flow. Note, the forward backward test will only be applied if the threshold > 0. This may results into a doubled runtime for the motion estimation. See: setForwardBackward

setForwardBackward(val: number): void;
val

val argument (number).

getForwardBackward

Threshold for the forward backward confidence check For each feature point a motion vector d_{I0,I1}(\mathbf{x}) is computed. If the forward backward error

 EP_{FB} = || d_{I0,I1} + d_{I1,I0} || 
is larger than threshold given by this function then the status  will not be used by the following

vector field interpolation. d_{I1,I0} denotes the backward flow. Note, the forward backward test will only be applied if the threshold > 0. This may results into a doubled runtime for the motion estimation. See: setForwardBackward See: setForwardBackward

getForwardBackward(): number;
Returns

The number result.

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.