Class BackgroundSubtractorCNT
Background subtraction based on counting.
public class BackgroundSubtractorCNT : UnmanagedObject, IDisposable, IBackgroundSubtractor, IAlgorithm
- Inheritance
-
BackgroundSubtractorCNT
- Implements
- Inherited Members
- Extension Methods
Remarks
About as fast as MOG2 on a high end system. More than twice faster than MOG2 on cheap hardware (benchmarked on Raspberry Pi3).
Constructors
BackgroundSubtractorCNT(int, bool, int, bool)
Creates a CNT Background Subtractor.
public BackgroundSubtractorCNT(int minPixelStability = 15, bool useHistory = true, int maxPixelStability = 900, bool isParallel = true)
Parameters
minPixelStability
intnumber of frames with same pixel color to consider stable
useHistory
booldetermines if we're giving a pixel credit for being stable for a long time
maxPixelStability
intmaximum allowed credit for a pixel in history
isParallel
booldetermines if we're parallelizing the algorithm
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 memory associated with this background model.
protected override void DisposeObject()