BackgroundSubtractorCNTTrait

Trait BackgroundSubtractorCNTTrait 

Source
pub trait BackgroundSubtractorCNTTrait: BackgroundSubtractorCNTTraitConst + BackgroundSubtractorTrait {
    // Required method
    fn as_raw_mut_BackgroundSubtractorCNT(&mut self) -> *mut c_void;

    // Provided methods
    fn apply(
        &mut self,
        image: &impl ToInputArray,
        fgmask: &mut impl ToOutputArray,
        learning_rate: f64,
    ) -> Result<()> { ... }
    fn apply_def(
        &mut self,
        image: &impl ToInputArray,
        fgmask: &mut impl ToOutputArray,
    ) -> Result<()> { ... }
    fn set_min_pixel_stability(&mut self, value: i32) -> Result<()> { ... }
    fn set_max_pixel_stability(&mut self, value: i32) -> Result<()> { ... }
    fn set_use_history(&mut self, value: bool) -> Result<()> { ... }
    fn set_is_parallel(&mut self, value: bool) -> Result<()> { ... }
}
Expand description

Required Methods§

Provided Methods§

Source

fn apply( &mut self, image: &impl ToInputArray, fgmask: &mut impl ToOutputArray, learning_rate: f64, ) -> Result<()>

§C++ default parameters
  • learning_rate: -1
Source

fn apply_def( &mut self, image: &impl ToInputArray, fgmask: &mut impl ToOutputArray, ) -> Result<()>

§Note

This alternative version of BackgroundSubtractorCNTTrait::apply function uses the following default values for its arguments:

  • learning_rate: -1
Source

fn set_min_pixel_stability(&mut self, value: i32) -> Result<()>

Sets the number of frames with same pixel color to consider stable.

Source

fn set_max_pixel_stability(&mut self, value: i32) -> Result<()>

Sets the maximum allowed credit for a pixel in history.

Source

fn set_use_history(&mut self, value: bool) -> Result<()>

Sets if we’re giving a pixel credit for being stable for a long time.

Source

fn set_is_parallel(&mut self, value: bool) -> Result<()>

Sets if we’re parallelizing the algorithm.

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.

Implementors§