public class KEDetectedFace extends DetectedFace
Modifier and Type | Field and Description |
---|---|
protected FacialKeypoint[] |
keypoints
A list of detected facial keypoints.
|
bounds, confidence, facePatch
Constructor and Description |
---|
KEDetectedFace()
Default constructor
|
KEDetectedFace(Rectangle bounds,
FImage patch,
FacialKeypoint[] keypoints,
float confidence)
Construct with parameters.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
binaryHeader()
Header for binary input.
|
FacialKeypoint |
getKeypoint(FacialKeypoint.FacialKeypointType type)
Get a keypoint of the specified type.
|
FacialKeypoint |
getKeypointInterpolated(FacialKeypoint.FacialKeypointType type)
Get a keypoint of the specified type, interpolating the position if the
internal model doesn't have a matching point.
|
FacialKeypoint[] |
getKeypoints() |
void |
readBinary(DataInput in)
Read internal state from in.
|
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
getBounds, getConfidence, getFacePatch, getShape, setBounds, setConfidence, setFacePatch
protected FacialKeypoint[] keypoints
public KEDetectedFace()
public KEDetectedFace(Rectangle bounds, FImage patch, FacialKeypoint[] keypoints, float confidence)
bounds
- the bounds rectangle in the detection imagepatch
- the patchkeypoints
- the detected facial keypoints.confidence
- the confidence of detectionpublic FacialKeypoint getKeypoint(FacialKeypoint.FacialKeypointType type)
type
- the type of keypointpublic FacialKeypoint getKeypointInterpolated(FacialKeypoint.FacialKeypointType type)
FacialKeypoint.FacialKeypointType.MOUTH_CENTER
,
FacialKeypoint.FacialKeypointType.EYE_LEFT_CENTER
and
FacialKeypoint.FacialKeypointType.EYE_RIGHT_CENTER
points are supported iff the
corresponding left and right points are available.type
- the type of keypointpublic FacialKeypoint[] getKeypoints()
FacialKeypoint
s associated with this detectionpublic void writeBinary(DataOutput out) throws IOException
WriteableBinary
writeBinary
in interface WriteableBinary
writeBinary
in class DetectedFace
out
- sink to write toIOException
- an error writing to outpublic byte[] binaryHeader()
ReadableBinary
binaryHeader
in interface ReadableBinary
binaryHeader
in interface WriteableBinary
binaryHeader
in class DetectedFace
public void readBinary(DataInput in) throws IOException
ReadableBinary
readBinary
in interface ReadableBinary
readBinary
in class DetectedFace
in
- source to read from.IOException
- an error reading input