Method Create
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
Create(int, double, bool)
Creates MOG2 Background Subtractor.
public static BackgroundSubtractorMOG2 Create(int history = 500, double varThreshold = 16, bool detectShadows = true)
Parameters
historyintLength of the history.
varThresholddoubleThreshold on the squared Mahalanobis distance between the pixel and the model to decide whether a pixel is well described by the background model. This parameter does not affect the background update.
detectShadowsboolIf true, the algorithm will detect shadows and mark them. It decreases the speed a bit, so if you do not need this feature, set the parameter to false.