public class FacialKeypoint extends Object implements ReadWriteableBinary
FacialKeypoint represents a keypoint on a face. Keypoints
are representative points found on all faces.
Keypoint types are based on Mark Everingham's Oxford VGG Baseline Face Processing Code
| Modifier and Type | Class and Description |
|---|---|
static class |
FacialKeypoint.FacialKeypointType
Types/locations of
FacialKeypoint. |
| Modifier and Type | Field and Description |
|---|---|
Point2dImpl |
position
The position of the keypoint in the image
|
FacialKeypoint.FacialKeypointType |
type
The type of facial keypoint
|
| Constructor and Description |
|---|
FacialKeypoint()
Default constructor.
|
FacialKeypoint(FacialKeypoint.FacialKeypointType type)
Construct a FacialKeypoint at the origin with the specified type.
|
FacialKeypoint(FacialKeypoint.FacialKeypointType type,
Point2d pt)
Construct a FacialKeypoint with the specified type and position.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
binaryHeader()
Header for binary input.
|
static FacialKeypoint |
getKeypoint(FacialKeypoint[] pts,
FacialKeypoint.FacialKeypointType type)
Search the given points for the a keypoint with the
specified type and return it.
|
void |
readBinary(DataInput in)
Read internal state from in.
|
protected static void |
updateImagePosition(FacialKeypoint[] kpts,
Jama.Matrix transform) |
protected void |
updatePosition(Jama.Matrix transform) |
void |
writeBinary(DataOutput out)
Write the content of this as binary to out.
|
public FacialKeypoint.FacialKeypointType type
public Point2dImpl position
public FacialKeypoint()
FacialKeypoint.FacialKeypointType.EYE_LEFT_CENTER
and position to the origin.public FacialKeypoint(FacialKeypoint.FacialKeypointType type)
type - the type of facial keypointpublic FacialKeypoint(FacialKeypoint.FacialKeypointType type, Point2d pt)
type - the type of facial keypointpt - the position in the image of the facial keypointprotected void updatePosition(Jama.Matrix transform)
protected static void updateImagePosition(FacialKeypoint[] kpts, Jama.Matrix transform)
public static FacialKeypoint getKeypoint(FacialKeypoint[] pts, FacialKeypoint.FacialKeypointType type)
pts - the points to searchtype - the type of facial keypointpublic 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