Skip to content

bgsegm_SyntheticSequenceGenerator

bgsegmclassOpenCV 5.0.0
import { bgsegm_SyntheticSequenceGenerator } from '@banou/opencv-wasm'

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

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

Synthetic frame sequence generator for testing background subtraction algorithms.

It will generate the moving object on top of the background. It will apply some distortion to the background to make the test more complex.

Constructors and members

static new

Creates an instance of SyntheticSequenceGenerator.

new(background: Mat, _1: Mat, amplitude: number, wavelength: number, wavespeed: number, objspeed: number): bgsegm_SyntheticSequenceGenerator;
background

Background image for object.

_1

Object image which will move slowly over the background.

amplitude

Amplitude of wave distortion applied to background.

wavelength

Length of waves in distortion applied to background.

wavespeed

How fast waves will move.

objspeed

How fast object will fly over background.

Returns

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

getNextFrame

Obtain the next frame in the sequence.

getNextFrame(frame: Mat, gtMask: Mat): void;
frame

Output destination, filled by the native operation. Output frame.

gtMask

Output destination, filled by the native operation. Output ground-truth (reference) segmentation mask object/background.

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.