opencv::prelude

Trait ERFilterTrait

Source
pub trait ERFilterTrait: AlgorithmTrait + ERFilterTraitConst {
    // Required method
    fn as_raw_mut_ERFilter(&mut self) -> *mut c_void;

    // Provided methods
    fn run(
        &mut self,
        image: &impl ToInputArray,
        regions: &mut Vector<ERStat>,
    ) -> Result<()> { ... }
    fn set_callback(&mut self, cb: &Ptr<ERFilter_Callback>) -> Result<()> { ... }
    fn set_threshold_delta(&mut self, threshold_delta: i32) -> Result<()> { ... }
    fn set_min_area(&mut self, min_area: f32) -> Result<()> { ... }
    fn set_max_area(&mut self, max_area: f32) -> Result<()> { ... }
    fn set_min_probability(&mut self, min_probability: f32) -> Result<()> { ... }
    fn set_min_probability_diff(
        &mut self,
        min_probability_diff: f32,
    ) -> Result<()> { ... }
    fn set_non_max_suppression(
        &mut self,
        non_max_suppression: bool,
    ) -> Result<()> { ... }
}
Expand description

Mutable methods for crate::text::ERFilter

Required Methods§

Provided Methods§

Source

fn run( &mut self, image: &impl ToInputArray, regions: &mut Vector<ERStat>, ) -> Result<()>

The key method of ERFilter algorithm.

Takes image on input and returns the selected regions in a vector of ERStat only distinctive ERs which correspond to characters are selected by a sequential classifier

§Parameters
  • image: Single channel image CV_8UC1

  • regions: Output for the 1st stage and Input/Output for the 2nd. The selected Extremal Regions are stored here.

Extracts the component tree (if needed) and filter the extremal regions (ER’s) by using a given classifier.

Source

fn set_callback(&mut self, cb: &Ptr<ERFilter_Callback>) -> Result<()>

set/get methods to set the algorithm properties,

Source

fn set_threshold_delta(&mut self, threshold_delta: i32) -> Result<()>

Source

fn set_min_area(&mut self, min_area: f32) -> Result<()>

Source

fn set_max_area(&mut self, max_area: f32) -> Result<()>

Source

fn set_min_probability(&mut self, min_probability: f32) -> Result<()>

Source

fn set_min_probability_diff(&mut self, min_probability_diff: f32) -> Result<()>

Source

fn set_non_max_suppression(&mut self, non_max_suppression: bool) -> Result<()>

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§