Class cv::MSER#

Maximally stable extremal region extractor. View details

Collaboration diagram for cv::MSER:

Public Member Functions#

Public Member Functions inherited from cv::Feature2D
Public Member Functions inherited from cv::Algorithm

Return

Name

Description

Algorithm()

~Algorithm()

void

clear()

Clears the algorithm state.

bool

empty()

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.

String

getDefaultName()

void

read(const FileNode & fn)

Reads algorithm parameters from a file storage.

void

save(const String & filename)

void

write(
    const Ptr< FileStorage > & fs,
    const String & name = String() )

void

write(FileStorage & fs)

Stores algorithm parameters in a file storage.

void

write(
    FileStorage & fs,
    const String & name )

Static Public Member Functions#

Static Public Member Functions inherited from cv::Algorithm

Return

Name

Description

static Ptr< _Tp >

load(
    const String & filename,
    const String & objname = String() )

Loads algorithm from the file.

static Ptr< _Tp >

loadFromString(
    const String & strModel,
    const String & objname = String() )

Loads algorithm from a String.

static Ptr< _Tp >

read(const FileNode & fn)

Reads algorithm from the file node.

Additional Inherited Members#

Protected Member Functions inherited from cv::Algorithm

Return

Name

Description

void

writeFormat(FileStorage & fs)

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 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

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 sets

  • bboxes — 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: