Class CudaBackgroundSubtractorGMG
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
intThe number of frames used for initialization
decisionThreshold
doubleThe 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
IInputArrayNext video frame.
foregroundMask
IOutputArrayThe output foreground mask as an 8-bit binary image.
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).
DisposeObject()
Release all the unmanaged resource associated with this object
protected override void DisposeObject()