Java API: adding missing class
This commit is contained in:
parent
2a6dd2e807
commit
f1d24e1868
50
modules/java/src/java/features2d+DMatch.java
Normal file
50
modules/java/src/java/features2d+DMatch.java
Normal file
@ -0,0 +1,50 @@
|
||||
package org.opencv.features2d;
|
||||
|
||||
//C++: class DMatch
|
||||
//javadoc: DMatch
|
||||
public class DMatch {
|
||||
|
||||
//javadoc: DMatch::queryIdx
|
||||
public int queryIdx;
|
||||
//javadoc: DMatch::trainIdx
|
||||
public int trainIdx;
|
||||
//javadoc: DMatch::imgIdx
|
||||
public int imgIdx;
|
||||
//javadoc: DMatch::distance
|
||||
public float distance;
|
||||
|
||||
|
||||
//javadoc: DMatch::DMatch()
|
||||
public DMatch() {
|
||||
this(-1, -1, Float.MAX_VALUE);
|
||||
}
|
||||
|
||||
|
||||
public DMatch( int _queryIdx, int _trainIdx, float _distance ) {
|
||||
queryIdx = _queryIdx;
|
||||
trainIdx = _trainIdx;
|
||||
imgIdx = -1;
|
||||
distance = _distance;
|
||||
}
|
||||
|
||||
|
||||
public DMatch( int _queryIdx, int _trainIdx, int _imgIdx, float _distance ) {
|
||||
queryIdx = _queryIdx;
|
||||
trainIdx = _trainIdx;
|
||||
imgIdx = _imgIdx;
|
||||
distance = _distance;
|
||||
}
|
||||
|
||||
// less is better
|
||||
boolean lessThan(DMatch it) {
|
||||
return distance < it.distance;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DMatch [queryIdx=" + queryIdx + ", trainIdx=" + trainIdx
|
||||
+ ", imgIdx=" + imgIdx + ", distance=" + distance + "]";
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user