[−][src]Function opencv::video::create_background_subtractor_mog2
pub fn create_background_subtractor_mog2(
history: i32,
var_threshold: f64,
detect_shadows: bool
) -> Result<PtrOfBackgroundSubtractorMOG2>
Creates MOG2 Background Subtractor
Parameters
- history: Length of the history.
- 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.
- 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.
C++ default parameters
- history: 500
- var_threshold: 16
- detect_shadows: true