[−][src]Trait opencv::features2d::MSER
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 ); the chi_table.h file is taken directly from paper's source code which is distributed under GPL.
-
(Python) A complete example showing the use of the %MSER detector can be found at samples/python/mser.py
Required methods
fn as_raw_MSER(&self) -> *mut c_void
Provided methods
fn detect_regions(
&mut self,
image: &dyn ToInputArray,
msers: &mut VectorOfVectorOfPoint,
bboxes: &mut VectorOfRect
) -> Result<()>
&mut self,
image: &dyn ToInputArray,
msers: &mut VectorOfVectorOfPoint,
bboxes: &mut VectorOfRect
) -> Result<()>
Detect %MSER regions
Parameters
- image: input image (8UC1, 8UC3 or 8UC4, must be greater or equal than 3x3)
- msers: resulting list of point sets
- bboxes: resulting bounding boxes
fn set_delta(&mut self, delta: i32) -> Result<()>
fn get_delta(&self) -> Result<i32>
fn set_min_area(&mut self, min_area: i32) -> Result<()>
fn get_min_area(&self) -> Result<i32>
fn set_max_area(&mut self, max_area: i32) -> Result<()>
fn get_max_area(&self) -> Result<i32>
fn set_pass2_only(&mut self, f: bool) -> Result<()>
fn get_pass2_only(&self) -> Result<bool>
fn get_default_name(&self) -> Result<String>
Methods
impl<'_> dyn MSER + '_
[src]
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<PtrOfMSER>
[src]
_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<PtrOfMSER>
Full consturctor 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