Creates MOG2 Background Subtractor
bs = cv.BackgroundSubtractorMOG2()
bs = cv.BackgroundSubtractorMOG2('OptionName', optionValue, ...)
Options
- History Length of the history. default 500
- VarThreshold Threshold 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. default 16
- DetectShadows If 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.
default true