T - Type of featureQ - Type of featurevectorpublic class FaceFVComparator<T extends FacialFeature & FeatureVectorProvider<Q>,Q extends FeatureVector> extends Object implements FacialFeatureComparator<T>
FacialFeatureComparator for FacialFeatures that can
provide FeatureVectors through the FeatureVectorProvider
interface. Any compatible FVComparator can be used to compare
features.| Constructor and Description |
|---|
FaceFVComparator(FVComparator<Q> comp)
Construct with the given
FVComparator |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
binaryHeader()
Header for binary input.
|
double |
compare(T query,
T target)
Compare two objects, returning a score
or distance.
|
boolean |
isDistance() |
void |
readBinary(DataInput in)
Read internal state from in.
|
String |
toString() |
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public FaceFVComparator(FVComparator<Q> comp)
FVComparatorcomp - the comparison techniquepublic double compare(T query, T target)
DistanceComparatorcompare in interface DistanceComparator<T extends FacialFeature & FeatureVectorProvider<Q>>query - the first objecttarget - the second objectpublic boolean isDistance()
isDistance in interface DistanceComparator<T extends FacialFeature & FeatureVectorProvider<Q>>public void readBinary(DataInput in) throws IOException
ReadableBinaryreadBinary in interface ReadableBinaryin - source to read from.IOException - an error reading inputpublic byte[] binaryHeader()
ReadableBinarybinaryHeader in interface ReadableBinarybinaryHeader in interface WriteableBinarypublic void writeBinary(DataOutput out) throws IOException
WriteableBinarywriteBinary in interface WriteableBinaryout - sink to write toIOException - an error writing to out