@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 ); the chi_table.h file is taken directly from paper's source code which is distributed under GPL.
- (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(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) |
BytePointer |
getDefaultName()
Returns the algorithm string identifier.
|
int |
getDelta() |
int |
getMaxArea() |
int |
getMinArea() |
boolean |
getPass2Only() |
void |
setDelta(int delta) |
void |
setMaxArea(int maxArea) |
void |
setMinArea(int minArea) |
void |
setPass2Only(boolean f) |
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, 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, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public MSER(Pointer p)
Pointer.Pointer(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 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@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()
@opencv_core.Str public BytePointer getDefaultName()
Algorithm
getDefaultName
in class Feature2D
Copyright © 2020. All rights reserved.