Table of Contents

Class CudaBackgroundSubtractorMOG

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

Gaussian Mixture-based Background/Foreground Segmentation Algorithm.

public class CudaBackgroundSubtractorMOG : SharedPtrObject, IDisposable, IBackgroundSubtractor, IAlgorithm
Inheritance
CudaBackgroundSubtractorMOG
Implements
Inherited Members
Extension Methods

Constructors

CudaBackgroundSubtractorMOG(int, int, double, double)

Create a Gaussian Mixture-based Background/Foreground Segmentation model

public CudaBackgroundSubtractorMOG(int history = 200, int nMixtures = 4, double backgroundRatio = 0.7, double noiseSigma = 0)

Parameters

history int

Length of the history.

nMixtures int

Number of Gaussian mixtures.

backgroundRatio double

Background ratio.

noiseSigma double

Noise strength (standard deviation of the brightness or each color channel). 0 means some automatic value.

Properties

AlgorithmPtr

Pointer to the unmanaged Algorithm object

public nint AlgorithmPtr { get; }

Property Value

nint

BackgroundSubtractorPtr

Pointer to the unmanaged BackgroundSubtractor object

public nint BackgroundSubtractorPtr { get; }

Property Value

nint

Methods

DisposeObject()

Release all the unmanaged resource associated with this object

protected override void DisposeObject()

Update(IInputArray, IOutputArray, double, Stream)

Updates the background model

public void Update(IInputArray frame, IOutputArray foregroundMask, double learningRate, Stream stream = null)

Parameters

frame IInputArray

Next video frame.

foregroundMask IOutputArray

The foregroundMask

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