Struct opencv::features2d::MSER
source · pub struct MSER { /* private fields */ }
Expand description
Maximally stable extremal region extractor
The class encapsulates all the parameters of the %MSER extraction algorithm (see wiki article).
-
there are two different implementation of %MSER: one for grey image, one for color image
-
the grey image algorithm is taken from: nister2008linear ; the paper claims to be faster than union-find method; it actually get 1.5~2m/s on my centrino L7200 1.2GHz laptop.
-
the color image algorithm is taken from: forssen2007maximally ; it should be much slower than grey image method ( 3~4 times )
-
(Python) A complete example showing the use of the %MSER detector can be found at samples/python/mser.py
Implementations§
source§impl MSER
impl MSER
sourcepub fn create(
delta: i32,
min_area: i32,
max_area: i32,
max_variation: f64,
min_diversity: f64,
max_evolution: i32,
area_threshold: f64,
min_margin: f64,
edge_blur_size: i32
) -> Result<Ptr<MSER>>
pub fn create( delta: i32, min_area: i32, max_area: i32, max_variation: f64, min_diversity: f64, max_evolution: i32, area_threshold: f64, min_margin: f64, edge_blur_size: i32 ) -> Result<Ptr<MSER>>
Full constructor for %MSER detector
Parameters
- delta: it compares
- min_area: prune the area which smaller than minArea
- max_area: prune the area which bigger than maxArea
- max_variation: prune the area have similar size to its children
- min_diversity: for color image, trace back to cut off mser with diversity less than min_diversity
- max_evolution: for color image, the evolution steps
- area_threshold: for color image, the area threshold to cause re-initialize
- min_margin: for color image, ignore too small margin
- edge_blur_size: for color image, the aperture size for edge blur
C++ default parameters
- delta: 5
- min_area: 60
- max_area: 14400
- max_variation: 0.25
- min_diversity: .2
- max_evolution: 200
- area_threshold: 1.01
- min_margin: 0.003
- edge_blur_size: 5
sourcepub fn create_def() -> Result<Ptr<MSER>>
pub fn create_def() -> Result<Ptr<MSER>>
Full constructor for %MSER detector
Parameters
- delta: it compares
- min_area: prune the area which smaller than minArea
- max_area: prune the area which bigger than maxArea
- max_variation: prune the area have similar size to its children
- min_diversity: for color image, trace back to cut off mser with diversity less than min_diversity
- max_evolution: for color image, the evolution steps
- area_threshold: for color image, the area threshold to cause re-initialize
- min_margin: for color image, ignore too small margin
- edge_blur_size: for color image, the aperture size for edge blur
Note
This alternative version of [create] function uses the following default values for its arguments:
- delta: 5
- min_area: 60
- max_area: 14400
- max_variation: 0.25
- min_diversity: .2
- max_evolution: 200
- area_threshold: 1.01
- min_margin: 0.003
- edge_blur_size: 5