Class BackgroundSubtractorCNT
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Background subtraction based on counting. About as fast as MOG2 on a high end system. More than twice faster than MOG2 on cheap hardware (benchmarked on Raspberry Pi3).
public class BackgroundSubtractorCNT : BackgroundSubtractor, IDisposable
- Inheritance
-
BackgroundSubtractorCNT
- Implements
- Inherited Members
Properties
IsParallel
Whether we're parallelizing the algorithm.
public bool IsParallel { get; set; }
Property Value
MaxPixelStability
Maximum allowed credit for a pixel in history.
public int MaxPixelStability { get; set; }
Property Value
MinPixelStability
Number of frames with same pixel color to consider stable.
public int MinPixelStability { get; set; }
Property Value
UseHistory
Whether we're giving a pixel credit for being stable for a long time.
public bool UseHistory { get; set; }
Property Value
Methods
Create(int, bool, int, bool)
Creates a CNT Background Subtractor
public static BackgroundSubtractorCNT Create(int minPixelStability = 15, bool useHistory = true, int maxPixelStability = 900, bool isParallel = true)
Parameters
minPixelStabilityintnumber of frames with same pixel color to consider stable
useHistorybooldetermines if we're giving a pixel credit for being stable for a long time
maxPixelStabilityintmaximum allowed credit for a pixel in history
isParallelbooldetermines if we're parallelizing the algorithm