Skip to content

DenseOpticalFlow

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

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

ARGUMENTSConstructor or factory
CLASSDenseOpticalFlow
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 Algorithm.

example: samples/python/snippets/dis_opt_flow.py An example using the dense optical flow and DIS optical flow algorithms in python example: samples/cpp/snippets/dis_opticalflow.cpp An example using the dense optical flow and DIS optical flow algorithms Base class for dense optical flow algorithms

Constructors and members

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.

calc

Calculates an optical flow.

calc(I0: Mat, I1: Mat, flow: Mat): void;
I0

first 8-bit single-channel input image.

I1

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

flow

Input/output value, modified by the native operation. computed flow image that has the same size as prev and type CV_32FC2.

collectGarbage

Releases all inner buffers.

collectGarbage(): void;

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.