Interface ObjectComparison<T,V>
-
- All Known Implementing Classes:
PositionComparisonImpl
public interface ObjectComparison<T,V>
Compares form of two different objects and returns information how close these objects are.- Since:
- 1.0
- Author:
- Christoph Praschl, Andreas Pointner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
compare(RecognizedObject<T,V> object1, RecognizedObject<T,V> object2)
Compares form of the two objects.double
findClosest(RecognizedObject<T,V> compareMe, List<RecognizedObject<T,V>> objects, RecognizedObject<T,V> closest)
Compares one object with a list of other objects.
-
-
-
Method Detail
-
compare
double compare(RecognizedObject<T,V> object1, RecognizedObject<T,V> object2)
Compares form of the two objects. Returns how close said objects are using a percent value (e.g. 1.0 = objects are exactly the same).- Parameters:
object1
- object to compareobject2
- object to compare- Returns:
- percent value how close the objects are to each other
-
findClosest
double findClosest(RecognizedObject<T,V> compareMe, List<RecognizedObject<T,V>> objects, RecognizedObject<T,V> closest)
Compares one object with a list of other objects. Finds the object, which is closest to the first one and puts it into the "closest" variable. Additionally, returns the percent value of how close the closest found is with the given object.- Parameters:
compareMe
- object to compare with the other objectsobjects
- list of objects that will be compared to the first objectclosest
- closest found object will be put into this variable- Returns:
- percent value how close the closest object is with the given object
-
-