@Namespace(value="cv") @Properties(inherit=opencv_features2d.class) public class MSER extends Feature2D
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
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
MSER(Algorithm pointer)
Downcast constructor.
|
MSER(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
static MSER |
create() |
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)
\brief Full constructor for %MSER detector
|
void |
detectRegions(GpuMat image,
PointVectorVector msers,
RectVector bboxes) |
void |
detectRegions(Mat image,
PointVectorVector msers,
RectVector bboxes)
\brief Detect %MSER regions
|
void |
detectRegions(UMat image,
PointVectorVector msers,
RectVector bboxes) |
double |
getAreaThreshold() |
BytePointer |
getDefaultName()
Returns the algorithm string identifier.
|
int |
getDelta() |
int |
getEdgeBlurSize() |
int |
getMaxArea() |
int |
getMaxEvolution() |
double |
getMaxVariation() |
int |
getMinArea() |
double |
getMinDiversity() |
double |
getMinMargin() |
boolean |
getPass2Only() |
void |
setAreaThreshold(double areaThreshold) |
void |
setDelta(int delta) |
void |
setEdgeBlurSize(int edge_blur_size) |
void |
setMaxArea(int maxArea) |
void |
setMaxEvolution(int maxEvolution) |
void |
setMaxVariation(double maxVariation) |
void |
setMinArea(int minArea) |
void |
setMinDiversity(double minDiversity) |
void |
setMinMargin(double min_margin) |
void |
setPass2Only(boolean f) |
asAlgorithm, asAlgorithm, compute, compute, compute, compute, compute, compute, defaultNorm, descriptorSize, descriptorType, detect, detect, detect, detect, detect, detect, detect, detect, detect, detect, detect, detect, detectAndCompute, detectAndCompute, detectAndCompute, detectAndCompute, detectAndCompute, detectAndCompute, empty, getPointer, position, read, read, read, write, write, write, write, write
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public MSER(Pointer p)
Pointer(Pointer)
.public MSER(Algorithm pointer)
@opencv_core.Ptr public 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)
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@opencv_core.Ptr public static MSER create()
public void detectRegions(@ByVal Mat image, @ByRef PointVectorVector msers, @ByRef RectVector bboxes)
image
- input image (8UC1, 8UC3 or 8UC4, must be greater or equal than 3x3)msers
- resulting list of point setsbboxes
- resulting bounding boxespublic void detectRegions(@ByVal UMat image, @ByRef PointVectorVector msers, @ByRef RectVector bboxes)
public void detectRegions(@ByVal GpuMat image, @ByRef PointVectorVector msers, @ByRef RectVector bboxes)
public void setDelta(int delta)
public int getDelta()
public void setMinArea(int minArea)
public int getMinArea()
public void setMaxArea(int maxArea)
public int getMaxArea()
public void setMaxVariation(double maxVariation)
public double getMaxVariation()
public void setMinDiversity(double minDiversity)
public double getMinDiversity()
public void setMaxEvolution(int maxEvolution)
public int getMaxEvolution()
public void setAreaThreshold(double areaThreshold)
public double getAreaThreshold()
public void setMinMargin(double min_margin)
public double getMinMargin()
public void setEdgeBlurSize(int edge_blur_size)
public int getEdgeBlurSize()
@opencv_core.Str public BytePointer getDefaultName()
Algorithm
getDefaultName
in class Feature2D
Copyright © 2024. All rights reserved.