T
- @Reference(type=Article,author="David Lowe",title="Distinctive image features from scale-invariant keypoints",year="2004",journal="IJCV",pages={"91","110"},month="January",number="2",volume="60") @Reference(type=Inproceedings,author="David Lowe",title="Object recognition from local scale-invariant features",year="1999",booktitle="Proc. of the International Conference on Computer Vision {ICCV}",pages={"1150","1157"}) public class BasicMatcher<T extends LocalFeature<?,?>> extends Object implements LocalFeatureMatcher<T>
Modifier and Type | Field and Description |
---|---|
protected List<Pair<T>> |
matches |
protected List<T> |
modelKeypoints |
protected int |
thresh |
Constructor and Description |
---|
BasicMatcher(int threshold)
Initialise the matcher setting the threshold which the difference between the
scores of the top two best matches must differ in order to count the first as
a good match.
|
Modifier and Type | Method and Description |
---|---|
protected T |
checkForMatch(T query,
List<T> features)
This searches through the keypoints in klist for the two closest matches to
key.
|
boolean |
findMatches(List<T> keys1)
Attempt to find matches between the model features from the database, and
given query features.
|
List<Pair<T>> |
getMatches()
Get the matches detected by the underlying algorithm
|
void |
setModelFeatures(List<T> modelkeys)
Set the features that represent the database to match queries against
|
void |
setThreshold(int thresh)
Set the matching threshold
|
protected List<T extends LocalFeature<?,?>> modelKeypoints
protected List<Pair<T extends LocalFeature<?,?>>> matches
protected int thresh
public BasicMatcher(int threshold)
threshold
- (as an integer percentage)public List<Pair<T>> getMatches()
LocalFeatureMatcher
getMatches
in interface LocalFeatureMatcher<T extends LocalFeature<?,?>>
public boolean findMatches(List<T> keys1)
LocalFeatureMatcher
findMatches
in interface LocalFeatureMatcher<T extends LocalFeature<?,?>>
keys1
- features from the queryprotected T checkForMatch(T query, List<T> features)
threshold
times distance to
second closest, then return the closest match. Otherwise, return NULL.public void setModelFeatures(List<T> modelkeys)
LocalFeatureMatcher
setModelFeatures
in interface LocalFeatureMatcher<T extends LocalFeature<?,?>>
modelkeys
- database of featurespublic void setThreshold(int thresh)
thresh
- the threshold