@Reference(type=Article, author={"J Matas","O Chum","M Urban","T Pajdla"}, title="Robust wide-baseline stereo from maximally stable extremal regions", year="2004", journal="Image and Vision Computing", pages={"761 "," 767"}, url="http://www.sciencedirect.com/science/article/pii/S0262885604000435", number="10", volume="22", customData={"issn","0262-8856","doi","10.1016/j.imavis.2004.02.006","keywords","Robust metric"}) public class MSERFeatureGenerator extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MSERFeatureGenerator.MSERDirection
A way of representing how the MSER should be processed.
|
Constructor and Description |
---|
MSERFeatureGenerator(Class<? extends ComponentFeature>... featureClasses)
Default constructor
|
MSERFeatureGenerator(int delta,
int maxArea,
int minArea,
float maxVariation,
float minDiversity,
Class<? extends ComponentFeature>... featureClasses)
Constructor that takes all the parameters for the MSER process.
|
Modifier and Type | Method and Description |
---|---|
int |
countMSERs(TreeNode<Component> tree)
Returns a count of the number of components in the tree that are marked
as MSERs.
|
List<Component> |
generateMSERs(FImage img)
Performs a watershed then an MSER detection on the given image and
returns the MSERs.
|
List<Component> |
generateMSERs(FImage img,
MSERFeatureGenerator.MSERDirection dir)
Performs a watershed then an MSER detection on the given image and
returns the MSERs.
|
int |
getDelta() |
int |
getMaxArea() |
float |
getMaxVariation() |
int |
getMinArea() |
float |
getMinDiversity() |
List<Component> |
performMSERDetection(List<MergeTreeBuilder> mtbs,
MSERFeatureGenerator.MSERDirection dir)
Performs MSER detection on the trees provided.
|
List<MergeTreeBuilder> |
performWatershed(FImage img)
Perform the watershed algorithm on the given image.
|
void |
setDelta(int delta) |
void |
setMaxArea(int maxArea) |
void |
setMaxVariation(float maxVariation) |
void |
setMinArea(int minArea) |
void |
setMinDiversity(float minDiversity) |
@SafeVarargs public MSERFeatureGenerator(Class<? extends ComponentFeature>... featureClasses)
featureClasses
- features to generate for each mser@SafeVarargs public MSERFeatureGenerator(int delta, int maxArea, int minArea, float maxVariation, float minDiversity, Class<? extends ComponentFeature>... featureClasses)
delta
- maxArea
- minArea
- maxVariation
- minDiversity
- featureClasses
- features to generate for each mserpublic List<Component> generateMSERs(FImage img)
img
- The image to analyse.Component
spublic List<Component> generateMSERs(FImage img, MSERFeatureGenerator.MSERDirection dir)
img
- The image to analyse.#dir
- The direction which to process the MSERSComponent
spublic List<MergeTreeBuilder> performWatershed(FImage img)
img
- The image to perform the watershed onMergeTreeBuilder
s (down first, up second)public List<Component> performMSERDetection(List<MergeTreeBuilder> mtbs, MSERFeatureGenerator.MSERDirection dir)
MergeTreeBuilder
s, the first being the downward
watershed, the second being the upward watershed.mtbs
- The list of MergeTreeBuilder
sdir
- The direction to detect MSERs fromComponent
spublic int countMSERs(TreeNode<Component> tree)
tree
- The tree to count MSERs inpublic int getDelta()
public void setDelta(int delta)
delta
- the delta to setpublic int getMaxArea()
public void setMaxArea(int maxArea)
maxArea
- the maxArea to setpublic int getMinArea()
public void setMinArea(int minArea)
minArea
- the minArea to setpublic float getMaxVariation()
public void setMaxVariation(float maxVariation)
maxVariation
- the maxVariation to setpublic float getMinDiversity()
public void setMinDiversity(float minDiversity)
minDiversity
- the minDiversity to set