Skip to content

writeOpticalFlow

Motion and trackingfunctionOpenCV 5.0.0
import { writeOpticalFlow } from '@banou/opencv-wasm'

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

ARGUMENTSpath, flow
FUNCTIONwriteOpticalFlow
RETURN TYPEboolean
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Write a .flo to disk

writeOpticalFlow(path: EmbindString, flow: Mat): boolean;
path

Path to the file to be written

flow

Flow field to be stored

The function stores a flow field in a file, returns true on success, false otherwise. The flow field must be a 2-channel, floating-point matrix (CV_32FC2). First channel corresponds to the flow in the horizontal direction (u), second - vertical (v).

Returns

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