@Reference(type=Article, author={"Tan, Xiaoyang","Triggs, Bill"}, title="Enhanced local texture feature sets for face recognition under difficult lighting conditions", year="2010", journal="Trans. Img. Proc.", pages={"1635","1650"}, url="http://dx.doi.org/10.1109/TIP.2010.2042645", month="June", number="6", publisher="IEEE Press", volume="19") public class ReversedLtpDtFeatureComparator extends Object implements FacialFeatureComparator<LtpDtFeature>
This comparator differs from that described in the original paper as it computes the distance map only on the query, rather than on each database target. This increases query time, but requires less memory.
Constructor and Description |
---|
ReversedLtpDtFeatureComparator() |
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
double |
compare(LtpDtFeature query,
LtpDtFeature 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 ReversedLtpDtFeatureComparator()
public double compare(LtpDtFeature query, LtpDtFeature target)
DistanceComparator
compare
in interface DistanceComparator<LtpDtFeature>
query
- the first objecttarget
- the second objectpublic boolean isDistance()
isDistance
in interface DistanceComparator<LtpDtFeature>
public void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
in
- source to read from.IOException
- an error reading inputpublic byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
public void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
out
- sink to write toIOException
- an error writing to out