pub trait BackgroundSubtractorKNNTrait: BackgroundSubtractorKNNTraitConst + BackgroundSubtractorTrait {
// Required method
fn as_raw_mut_BackgroundSubtractorKNN(&mut self) -> *mut c_void;
// Provided methods
fn set_history(&mut self, history: i32) -> Result<()> { ... }
fn set_n_samples(&mut self, _n_n: i32) -> Result<()> { ... }
fn set_dist2_threshold(&mut self, _dist2_threshold: f64) -> Result<()> { ... }
fn setk_nn_samples(&mut self, _nk_nn: i32) -> Result<()> { ... }
fn set_detect_shadows(&mut self, detect_shadows: bool) -> Result<()> { ... }
fn set_shadow_value(&mut self, value: i32) -> Result<()> { ... }
fn set_shadow_threshold(&mut self, threshold: f64) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::video::BackgroundSubtractorKNN
Required Methods§
fn as_raw_mut_BackgroundSubtractorKNN(&mut self) -> *mut c_void
Provided Methods§
Sourcefn set_history(&mut self, history: i32) -> Result<()>
fn set_history(&mut self, history: i32) -> Result<()>
Sets the number of last frames that affect the background model
Sourcefn set_n_samples(&mut self, _n_n: i32) -> Result<()>
fn set_n_samples(&mut self, _n_n: i32) -> Result<()>
Sets the number of data samples in the background model.
The model needs to be reinitalized to reserve memory.
Sourcefn set_dist2_threshold(&mut self, _dist2_threshold: f64) -> Result<()>
fn set_dist2_threshold(&mut self, _dist2_threshold: f64) -> Result<()>
Sets the threshold on the squared distance
Sourcefn setk_nn_samples(&mut self, _nk_nn: i32) -> Result<()>
fn setk_nn_samples(&mut self, _nk_nn: i32) -> Result<()>
Sets the k in the kNN. How many nearest neighbours need to match.
Sourcefn set_detect_shadows(&mut self, detect_shadows: bool) -> Result<()>
fn set_detect_shadows(&mut self, detect_shadows: bool) -> Result<()>
Enables or disables shadow detection
Sourcefn set_shadow_value(&mut self, value: i32) -> Result<()>
fn set_shadow_value(&mut self, value: i32) -> Result<()>
Sets the shadow value
Sourcefn set_shadow_threshold(&mut self, threshold: f64) -> Result<()>
fn set_shadow_threshold(&mut self, threshold: f64) -> Result<()>
Sets the shadow threshold
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.