Table of Contents

Class CudaBackgroundSubtractorGMG

Namespace
Emgu.CV.Cuda
Assembly
Emgu.CV.dll

Background/Foreground Segmentation Algorithm.

public class CudaBackgroundSubtractorGMG : SharedPtrObject, IDisposable
Inheritance
CudaBackgroundSubtractorGMG
Implements
Inherited Members

Constructors

CudaBackgroundSubtractorGMG(int, double)

Create a Background/Foreground Segmentation model

public CudaBackgroundSubtractorGMG(int initializationFrames = 120, double decisionThreshold = 0.8)

Parameters

initializationFrames int

The number of frames used for initialization

decisionThreshold double

The decision threshold

Methods

Apply(IInputArray, IOutputArray, double, Stream)

Updates the background model

public void Apply(IInputArray frame, IOutputArray foregroundMask, double learningRate = -1, Stream stream = null)

Parameters

frame IInputArray

Next video frame.

foregroundMask IOutputArray

The output foreground mask as an 8-bit binary image.

learningRate double

The learning rate, use -1.0f for default value.

stream Stream

Use a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).

DisposeObject()

Release all the unmanaged resource associated with this object

protected override void DisposeObject()