T
- Type of DetectedFace
.public static class LocalLBPHistogram.Extractor<T extends DetectedFace> extends Object implements FacialFeatureExtractor<LocalLBPHistogram,T>
FacialFeatureExtractor
for building LocalLBPHistogram
s.Constructor and Description |
---|
Extractor()
Construct with a
IdentityAligner |
Extractor(FaceAligner<T> aligner)
Construct with the given aligner.
|
Extractor(FaceAligner<T> aligner,
int blocksX,
int blocksY,
int samples,
int radius)
Construct with the given aligner, parameters describing how the image
is broken into blocks and parameters describing the radius of the LBP
extraction circle, and how many samples are made.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
LocalLBPHistogram |
extractFeature(T detectedFace)
Extract features from an object and return them.
|
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 Extractor()
IdentityAligner
public Extractor(FaceAligner<T> aligner)
aligner
- the alignerpublic Extractor(FaceAligner<T> aligner, int blocksX, int blocksY, int samples, int radius)
aligner
- The face alignerblocksX
- The number of blocks in the x-directionblocksY
- The number of blocks in the y-directionsamples
- The number of samples around the circle for the
ExtendedLocalBinaryPattern
radius
- the radius used for the ExtendedLocalBinaryPattern
.public LocalLBPHistogram extractFeature(T detectedFace)
FeatureExtractor
extractFeature
in interface FeatureExtractor<LocalLBPHistogram,T extends DetectedFace>
detectedFace
- the object to extract frompublic 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