Table of Contents

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

bool

MaxPixelStability

Maximum allowed credit for a pixel in history.

public int MaxPixelStability { get; set; }

Property Value

int

MinPixelStability

Number of frames with same pixel color to consider stable.

public int MinPixelStability { get; set; }

Property Value

int

UseHistory

Whether we're giving a pixel credit for being stable for a long time.

public bool UseHistory { get; set; }

Property Value

bool

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

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

Returns

BackgroundSubtractorCNT