Trait opencv::hub_prelude::MSER
source · [−]pub trait MSER: Feature2DTrait + MSERConst {
fn as_raw_mut_MSER(&mut self) -> *mut c_void;
fn detect_regions(
&mut self,
image: &dyn ToInputArray,
msers: &mut Vector<Vector<Point>>,
bboxes: &mut Vector<Rect>
) -> Result<()> { ... }
fn set_delta(&mut self, delta: i32) -> Result<()> { ... }
fn set_min_area(&mut self, min_area: i32) -> Result<()> { ... }
fn set_max_area(&mut self, max_area: i32) -> Result<()> { ... }
fn set_pass2_only(&mut self, f: bool) -> Result<()> { ... }
}Required Methods
source
fn as_raw_mut_MSER(&mut self) -> *mut c_void
Provided Methods
sourcefn detect_regions(
&mut self,
image: &dyn ToInputArray,
msers: &mut Vector<Vector<Point>>,
bboxes: &mut Vector<Rect>
) -> Result<()>
fn detect_regions(
&mut self,
image: &dyn ToInputArray,
msers: &mut Vector<Vector<Point>>,
bboxes: &mut Vector<Rect>
) -> 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
source
fn set_min_area(&mut self, min_area: i32) -> Result<()>
source
fn set_max_area(&mut self, max_area: i32) -> Result<()>
source
fn set_pass2_only(&mut self, f: bool) -> Result<()>
Implementations
sourceimpl dyn MSER + '_
impl dyn 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<dyn 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<dyn 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