Class cv::MSER#
Maximally stable extremal region extractor. View details
#include <opencv2/features.hpp>Collaboration diagram for cv::MSER:
Public Member Functions#
Public Member Functions inherited from cv::Feature2D
Return |
Name |
Description |
|---|---|---|
|
|
Computes the descriptors for a set of keypoints detected in an image (first variant) or image set (second variant). |
|
||
|
||
|
||
|
||
|
|
Detects keypoints in an image (first variant) or image set (second variant). |
|
||
|
||
|
Return true if detector object is empty. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
||
|
Stores algorithm parameters in a file storage. |
|
|
Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Clears the algorithm state. |
|
|
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. |
|
|
Reads algorithm parameters from a file storage. |
|
|
||
|
|
|
|
Stores algorithm parameters in a file storage. |
|
|
Static Public Member Functions#
Static Public Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
|
Loads algorithm from the file. |
|
|
Loads algorithm from a String. |
|
Reads algorithm from the file node. |
Additional Inherited Members#
Protected Member Functions inherited from cv::Algorithm
Return |
Name |
Description |
|---|---|---|
|
Detailed 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
- Examples
- samples/python/snippets/mser.py.
Member Function Documentation#
create()#
static Ptr< MSER > cv::MSER::create(
int delta = 5,
int min_area = 60,
int max_area = 14400,
double max_variation = 0.25,
double min_diversity = .2,
int max_evolution = 200,
double area_threshold = 1.01,
double min_margin = 0.003,
int edge_blur_size = 5 )
Python:
cv.MSER.create([, delta[, min_area[, max_area[, max_variation[, min_diversity[, max_evolution[, area_threshold[, min_margin[, edge_blur_size]]]]]]]]]) -> retval
cv.MSER_create([, delta[, min_area[, max_area[, max_variation[, min_diversity[, max_evolution[, area_threshold[, min_margin[, edge_blur_size]]]]]]]]]) -> retval
Full constructor for MSER detector.
Parameters
delta— it compares \((size_{i}-size_{i-delta})/size_{i-delta}\)min_area— prune the area which smaller than minAreamax_area— prune the area which bigger than maxAreamax_variation— prune the area have similar size to its childrenmin_diversity— for color image, trace back to cut off mser with diversity less than min_diversitymax_evolution— for color image, the evolution stepsarea_threshold— for color image, the area threshold to cause re-initializemin_margin— for color image, ignore too small marginedge_blur_size— for color image, the aperture size for edge blur
detectRegions()#
void cv::MSER::detectRegions(
InputArray image,
std::vector< std::vector< Point > > & msers,
std::vector< Rect > & bboxes )
Python:
cv.MSER.detectRegions(image) -> msers, bboxes
Detect MSER regions.
Parameters
image— input image (8UC1, 8UC3 or 8UC4, must be greater or equal than 3x3)msers— resulting list of point setsbboxes— resulting bounding boxes
getAreaThreshold()#
double cv::MSER::getAreaThreshold()
Python:
cv.MSER.getAreaThreshold() -> retval
getDefaultName()#
String cv::MSER::getDefaultName()
Python:
cv.MSER.getDefaultName() -> retval
Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.
getDelta()#
int cv::MSER::getDelta()
Python:
cv.MSER.getDelta() -> retval
getEdgeBlurSize()#
int cv::MSER::getEdgeBlurSize()
Python:
cv.MSER.getEdgeBlurSize() -> retval
getMaxArea()#
int cv::MSER::getMaxArea()
Python:
cv.MSER.getMaxArea() -> retval
getMaxEvolution()#
int cv::MSER::getMaxEvolution()
Python:
cv.MSER.getMaxEvolution() -> retval
getMaxVariation()#
double cv::MSER::getMaxVariation()
Python:
cv.MSER.getMaxVariation() -> retval
getMinArea()#
int cv::MSER::getMinArea()
Python:
cv.MSER.getMinArea() -> retval
getMinDiversity()#
double cv::MSER::getMinDiversity()
Python:
cv.MSER.getMinDiversity() -> retval
getMinMargin()#
double cv::MSER::getMinMargin()
Python:
cv.MSER.getMinMargin() -> retval
getPass2Only()#
bool cv::MSER::getPass2Only()
Python:
cv.MSER.getPass2Only() -> retval
setAreaThreshold()#
void cv::MSER::setAreaThreshold(double areaThreshold)
Python:
cv.MSER.setAreaThreshold(areaThreshold)
setDelta()#
void cv::MSER::setDelta(int delta)
Python:
cv.MSER.setDelta(delta)
setEdgeBlurSize()#
void cv::MSER::setEdgeBlurSize(int edge_blur_size)
Python:
cv.MSER.setEdgeBlurSize(edge_blur_size)
setMaxArea()#
void cv::MSER::setMaxArea(int maxArea)
Python:
cv.MSER.setMaxArea(maxArea)
setMaxEvolution()#
void cv::MSER::setMaxEvolution(int maxEvolution)
Python:
cv.MSER.setMaxEvolution(maxEvolution)
setMaxVariation()#
void cv::MSER::setMaxVariation(double maxVariation)
Python:
cv.MSER.setMaxVariation(maxVariation)
setMinArea()#
void cv::MSER::setMinArea(int minArea)
Python:
cv.MSER.setMinArea(minArea)
setMinDiversity()#
void cv::MSER::setMinDiversity(double minDiversity)
Python:
cv.MSER.setMinDiversity(minDiversity)
setMinMargin()#
void cv::MSER::setMinMargin(double min_margin)
Python:
cv.MSER.setMinMargin(min_margin)
setPass2Only()#
void cv::MSER::setPass2Only(bool f)
Python:
cv.MSER.setPass2Only(f)
Source file#
The documentation for this class was generated from the following file:
opencv2/features.hpp