Package org.opencv.features2d
Class MSER
- java.lang.Object
- 
- org.opencv.core.Algorithm
- 
- org.opencv.features2d.Feature2D
- 
- org.opencv.features2d.MSER
 
 
 
- 
 public class MSER extends Feature2D Maximally stable extremal region extractor The class encapsulates all the parameters of the %MSER extraction algorithm (see [wiki article](http://en.wikipedia.org/wiki/Maximally_stable_extremal_regions)).- there are two different implementation of %MSER: one for grey image, one for color image
 - the grey image algorithm is taken from: CITE: 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: CITE: 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
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedMSER(long addr)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MSER__fromPtr__(long addr)static MSERcreate()Full constructor for %MSER detectorstatic MSERcreate(int delta)Full constructor for %MSER detectorstatic MSERcreate(int delta, int min_area)Full constructor for %MSER detectorstatic MSERcreate(int delta, int min_area, int max_area)Full constructor for %MSER detectorstatic MSERcreate(int delta, int min_area, int max_area, double max_variation)Full constructor for %MSER detectorstatic MSERcreate(int delta, int min_area, int max_area, double max_variation, double min_diversity)Full constructor for %MSER detectorstatic MSERcreate(int delta, int min_area, int max_area, double max_variation, double min_diversity, int max_evolution)Full constructor for %MSER detectorstatic MSERcreate(int delta, int min_area, int max_area, double max_variation, double min_diversity, int max_evolution, double area_threshold)Full constructor for %MSER detectorstatic MSERcreate(int delta, int min_area, int max_area, double max_variation, double min_diversity, int max_evolution, double area_threshold, double min_margin)Full constructor for %MSER detectorstatic MSERcreate(int delta, int min_area, int max_area, double max_variation, double min_diversity, int max_evolution, double area_threshold, double min_margin, int edge_blur_size)Full constructor for %MSER detectorvoiddetectRegions(Mat image, java.util.List<MatOfPoint> msers, MatOfRect bboxes)Detect %MSER regionsprotected voidfinalize()doublegetAreaThreshold()java.lang.StringgetDefaultName()Returns the algorithm string identifier.intgetDelta()intgetEdgeBlurSize()intgetMaxArea()intgetMaxEvolution()doublegetMaxVariation()intgetMinArea()doublegetMinDiversity()doublegetMinMargin()booleangetPass2Only()voidsetAreaThreshold(double areaThreshold)voidsetDelta(int delta)voidsetEdgeBlurSize(int edge_blur_size)voidsetMaxArea(int maxArea)voidsetMaxEvolution(int maxEvolution)voidsetMaxVariation(double maxVariation)voidsetMinArea(int minArea)voidsetMinDiversity(double minDiversity)voidsetMinMargin(double min_margin)voidsetPass2Only(boolean f)- 
Methods inherited from class org.opencv.features2d.Feature2Dcompute, compute, defaultNorm, descriptorSize, descriptorType, detect, detect, detect, detect, detectAndCompute, detectAndCompute, empty, read, write
 - 
Methods inherited from class org.opencv.core.Algorithmclear, getNativeObjAddr, save
 
- 
 
- 
- 
- 
Method Detail- 
__fromPtr__public static MSER __fromPtr__(long addr) 
 - 
createpublic static MSER create(int delta, int min_area, int max_area, double max_variation, double min_diversity, int max_evolution, double area_threshold, double min_margin, int edge_blur_size) 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
- Returns:
- automatically generated
 
 - 
createpublic static MSER create(int delta, int min_area, int max_area, double max_variation, double min_diversity, int max_evolution, double area_threshold, double min_margin) 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
- Returns:
- automatically generated
 
 - 
createpublic static MSER create(int delta, int min_area, int max_area, double max_variation, double min_diversity, int max_evolution, double area_threshold) 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
- Returns:
- automatically generated
 
 - 
createpublic static MSER create(int delta, int min_area, int max_area, double max_variation, double min_diversity, int max_evolution) 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
- Returns:
- automatically generated
 
 - 
createpublic static MSER create(int delta, int min_area, int max_area, double max_variation, double min_diversity) 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
- Returns:
- automatically generated
 
 - 
createpublic static MSER create(int delta, int min_area, int max_area, double max_variation) 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
- Returns:
- automatically generated
 
 - 
createpublic static MSER create(int delta, int min_area, int max_area) 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
- Returns:
- automatically generated
 
 - 
createpublic static MSER create(int delta, int min_area) 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
- Returns:
- automatically generated
 
 - 
createpublic static MSER create(int delta) Full constructor for %MSER detector- Parameters:
- delta- it compares \((size_{i}-size_{i-delta})/size_{i-delta}\)
- Returns:
- automatically generated
 
 - 
createpublic static MSER create() Full constructor for %MSER detector- Returns:
- automatically generated
 
 - 
detectRegionspublic void detectRegions(Mat image, java.util.List<MatOfPoint> msers, MatOfRect 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
 
 - 
setDeltapublic void setDelta(int delta) 
 - 
getDeltapublic int getDelta() 
 - 
setMinAreapublic void setMinArea(int minArea) 
 - 
getMinAreapublic int getMinArea() 
 - 
setMaxAreapublic void setMaxArea(int maxArea) 
 - 
getMaxAreapublic int getMaxArea() 
 - 
setMaxVariationpublic void setMaxVariation(double maxVariation) 
 - 
getMaxVariationpublic double getMaxVariation() 
 - 
setMinDiversitypublic void setMinDiversity(double minDiversity) 
 - 
getMinDiversitypublic double getMinDiversity() 
 - 
setMaxEvolutionpublic void setMaxEvolution(int maxEvolution) 
 - 
getMaxEvolutionpublic int getMaxEvolution() 
 - 
setAreaThresholdpublic void setAreaThreshold(double areaThreshold) 
 - 
getAreaThresholdpublic double getAreaThreshold() 
 - 
setMinMarginpublic void setMinMargin(double min_margin) 
 - 
getMinMarginpublic double getMinMargin() 
 - 
setEdgeBlurSizepublic void setEdgeBlurSize(int edge_blur_size) 
 - 
getEdgeBlurSizepublic int getEdgeBlurSize() 
 - 
setPass2Onlypublic void setPass2Only(boolean f) 
 - 
getPass2Onlypublic boolean getPass2Only() 
 - 
getDefaultNamepublic java.lang.String getDefaultName() Description copied from class:AlgorithmReturns 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.- Overrides:
- getDefaultNamein class- Feature2D
- Returns:
- automatically generated
 
 
- 
 
-