Skip to content

bgsegm_BackgroundSubtractorLSBP

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

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

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

Background Subtraction using Local SVD Binary Pattern. More details about the algorithm can be found at [LGuo2016]

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.

apply

BackgroundSubtractor interface

apply(image: Mat, fgmask: Mat, learningRate: number): void;
2 available overloads
apply(image: Mat, fgmask: Mat): void;
apply(image: Mat, fgmask: Mat, learningRate: number): void;
image

image argument (Mat).

fgmask

Output destination, filled by the native operation. fgmask argument (Mat).

learningRate

learning rate argument (number).

apply1

BackgroundSubtractor interface

apply1(image: Mat, knownForegroundMask: Mat, fgmask: Mat, learningRate: number): void;
2 available overloads
apply1(image: Mat, knownForegroundMask: Mat, fgmask: Mat): void;
apply1(image: Mat, knownForegroundMask: Mat, fgmask: Mat, learningRate: number): void;
image

image argument (Mat).

knownForegroundMask

known foreground mask argument (Mat).

fgmask

Output destination, filled by the native operation. fgmask argument (Mat).

learningRate

learning rate argument (number).

getBackgroundImage

Return the background image configured on this bgsegm_BackgroundSubtractorLSBP object.

getBackgroundImage(backgroundImage: Mat): void;
backgroundImage

Output destination, filled by the native operation. background image argument (Mat).

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.