Skip to content

bgsegm_BackgroundSubtractorGSOC

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

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

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

Implementation of the different yet better algorithm which is called GSOC, as it was implemented during GSOC and was not originated from any paper.

This algorithm demonstrates better performance on CDNET 2014 dataset compared to other algorithms in OpenCV.

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_BackgroundSubtractorGSOC 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.