public class FacePatchFeature extends Object implements FacialFeature, FeatureVectorProvider<FloatFV>
FacialFeature
that is built by concatenating each of the normalised
facial part patches from a detected face.Modifier and Type | Class and Description |
---|---|
static class |
FacePatchFeature.DetectedFacePart
A
FacialKeypoint with an associated feature |
static class |
FacePatchFeature.Extractor
A
FacialFeatureExtractor for producing FacialFeature s |
Modifier and Type | Field and Description |
---|---|
protected List<FacePatchFeature.DetectedFacePart> |
faceParts |
protected FloatFV |
featureVector |
protected int |
radius
The radius of the descriptor samples about each point
|
protected float |
scl
The scale of the descriptor samples about each point
|
Constructor and Description |
---|
FacePatchFeature()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
protected FloatFV |
createFeatureVector() |
protected void |
extractFeatures(KEDetectedFace face) |
FloatFV |
getFeatureVector()
Get the FeatureVector associated with this object.
|
protected void |
initialise(KEDetectedFace face) |
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
protected FloatFV featureVector
protected int radius
protected float scl
protected List<FacePatchFeature.DetectedFacePart> faceParts
public FacePatchFeature()
protected void initialise(KEDetectedFace face)
protected FloatFV createFeatureVector()
protected void extractFeatures(KEDetectedFace face)
public FloatFV getFeatureVector()
FeatureVectorProvider
getFeatureVector
in interface FeatureVectorProvider<FloatFV>
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