Table of Contents

Class BackgroundSubtractorCNT

Namespace
Emgu.CV.BgSegm
Assembly
Emgu.CV.dll

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 int

number of frames with same pixel color to consider stable

useHistory bool

determines if we're giving a pixel credit for being stable for a long time

maxPixelStability int

maximum allowed credit for a pixel in history

isParallel bool

determines if we're parallelizing the algorithm

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 memory associated with this background model.

protected override void DisposeObject()