Trait opencv::prelude::ERFilter

source ·
pub trait ERFilter: AlgorithmTrait + ERFilterConst {
    // Required method
    fn as_raw_mut_ERFilter(&mut self) -> *mut c_void;

    // Provided methods
    fn run(
        &mut self,
        image: &dyn ToInputArray,
        regions: &mut Vector<ERStat>
    ) -> Result<()> { ... }
    fn set_callback(&mut self, cb: &Ptr<dyn 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

Base class for 1st and 2nd stages of Neumann and Matas scene text detection algorithm Neumann12. :

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

Required Methods§

Provided Methods§

source

fn run( &mut self, image: &dyn 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<dyn 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<()>

Implementors§