Class CudaBackgroundSubtractorMOG
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
intLength of the history.
nMixtures
intNumber of Gaussian mixtures.
backgroundRatio
doubleBackground ratio.
noiseSigma
doubleNoise 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
BackgroundSubtractorPtr
Pointer to the unmanaged BackgroundSubtractor object
public nint BackgroundSubtractorPtr { get; }
Property Value
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
IInputArrayNext video frame.
foregroundMask
IOutputArrayThe foregroundMask
learningRate
doubleThe learning rate, use -1.0f for default value.
stream
StreamUse a Stream to call the function asynchronously (non-blocking) or null to call the function synchronously (blocking).