Package com.appliedrec.verid.core2
Class Face
- java.lang.Object
-
- com.appliedrec.verid.core2.Face
-
- All Implemented Interfaces:
android.os.Parcelable
- Direct Known Subclasses:
RecognizableFace
public class Face extends java.lang.Object implements android.os.Parcelable
Face detected in an image- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Modifier Constructor Description Face(android.graphics.RectF bounds, EulerAngle angle, android.graphics.PointF leftEye, android.graphics.PointF rightEye, byte[] data, float quality, android.graphics.PointF[] landmarks, float[] dlibLandmarks)
protected
Face(android.os.Parcel in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
describeContents()
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.boolean
equals(java.lang.Object o)
Face
flipped(Size imageSize)
EulerAngle
getAngle()
Get the angle of the face.android.graphics.RectF
getBounds()
Get bounds of the face in the image.byte[]
getData()
Get a serialized representation of the face.float[]
getDlibLandmarks()
android.graphics.PointF[]
getLandmarks()
android.graphics.PointF
getLeftEye()
Get the position of the left eye in the image.float
getQuality()
android.graphics.PointF
getRightEye()
Get the position of the right eye in the image.RecognizableType
getType()
int
hashCode()
void
setLandmarks(android.graphics.PointF[] landmarks)
void
writeToParcel(android.os.Parcel dest, int flags)
Flatten this object in to a Parcel.
-
-
-
Field Detail
-
CREATOR
public static final android.os.Parcelable.Creator<Face> CREATOR
-
-
Constructor Detail
-
Face
protected Face(android.os.Parcel in)
-
Face
public Face(@NonNull android.graphics.RectF bounds, @NonNull EulerAngle angle, @Nullable android.graphics.PointF leftEye, @Nullable android.graphics.PointF rightEye, @NonNull byte[] data, float quality, @NonNull android.graphics.PointF[] landmarks, @NonNull @Size(10L) float[] dlibLandmarks)
-
-
Method Detail
-
getDlibLandmarks
public float[] getDlibLandmarks()
-
getBounds
@NonNull public android.graphics.RectF getBounds()
Get bounds of the face in the image.- Returns:
- Bounds of the face in pixels
- Since:
- 1.0.0
-
getAngle
@NonNull public EulerAngle getAngle()
Get the angle of the face.- Returns:
- Face angle
- Since:
- 1.0.0
-
getLeftEye
@Nullable public android.graphics.PointF getLeftEye()
Get the position of the left eye in the image.- Returns:
- Point
- Since:
- 1.0.0
-
getRightEye
@Nullable public android.graphics.PointF getRightEye()
Get the position of the right eye in the image.- Returns:
- Point
- Since:
- 1.0.0
-
getType
@NonNull public RecognizableType getType()
-
getData
@NonNull public byte[] getData()
Get a serialized representation of the face.- Returns:
- Byte array
- Since:
- 1.0.0
-
getQuality
public float getQuality()
-
getLandmarks
public android.graphics.PointF[] getLandmarks()
- Returns:
- Face landmarks array
- Since:
- 1.10.0
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
setLandmarks
public void setLandmarks(android.graphics.PointF[] landmarks)
- Parameters:
landmarks
- Face landmarks- Since:
- 1.10.0
-
describeContents
public int describeContents()
Description copied from interface:android.os.Parcelable
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output ofParcelable.writeToParcel(Parcel, int)
, the return value of this method must include theParcelable.CONTENTS_FILE_DESCRIPTOR
bit.- Specified by:
describeContents
in interfaceandroid.os.Parcelable
- Returns:
- a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)
Description copied from interface:android.os.Parcelable
Flatten this object in to a Parcel.- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Parameters:
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written. May be 0 orParcelable.PARCELABLE_WRITE_RETURN_VALUE
.
-
-