Package ai.deepar.ar
Class DeepAR.FaceData
java.lang.Object
ai.deepar.ar.DeepAR.FaceData
- Enclosing class:
DeepAR
Represents data structure containing all the information available about the detected face.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Detected anger on face.static final int
Detected happiness on face.static final int
Detected neutral face emotion.static final int
Detected sadness on face.static final int
Detected surprise on face.float[]
Estimated emotions for the face.boolean
Determines whether the face is detected or not.float[]
A rectangle containing the face in screen coordinates (X, Y, Width, Height).float[]
Detected face feature points in 3D space (X, Y, Z).float[]
Detected face feature points in 2D screen space coordinates (X, Y).float[]
Translation and rotation in matrix form (D3D style, column-major order).float[]
The pitch, yaw and roll rotation values in euler angles (degrees) of the face in the scene.float[]
The X, Y and Z translation values of the face in the scene. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EMOTION_IDX_NEUTRAL
public static final int EMOTION_IDX_NEUTRALDetected neutral face emotion.- See Also:
-
EMOTION_IDX_HAPPINESS
public static final int EMOTION_IDX_HAPPINESSDetected happiness on face.- See Also:
-
EMOTION_IDX_SURPRISE
public static final int EMOTION_IDX_SURPRISEDetected surprise on face.- See Also:
-
EMOTION_IDX_SADNESS
public static final int EMOTION_IDX_SADNESSDetected sadness on face.- See Also:
-
EMOTION_IDX_ANGER
public static final int EMOTION_IDX_ANGERDetected anger on face.- See Also:
-
faceDetected
public boolean faceDetectedDetermines whether the face is detected or not. -
translation
public float[] translationThe X, Y and Z translation values of the face in the scene. -
rotation
public float[] rotationThe pitch, yaw and roll rotation values in euler angles (degrees) of the face in the scene. -
poseMatrix
public float[] poseMatrixTranslation and rotation in matrix form (D3D style, column-major order). -
landmarks
public float[] landmarksDetected face feature points in 3D space (X, Y, Z). Read more here. -
landmarks2d
public float[] landmarks2dDetected face feature points in 2D screen space coordinates (X, Y). Usually more precise than 3D points but no estimation for Z translation. Read more here about feature points here. -
faceRect
public float[] faceRectA rectangle containing the face in screen coordinates (X, Y, Width, Height). -
emotions
public float[] emotionsEstimated emotions for the face. Each emotion has a value in [0.0, 1.0] range. The 1.0 value means 100% detected emotion.
We differentiate 5 different emotions:- Index 0 is neutral (
EMOTION_IDX_NEUTRAL
) - Index 1 is happiness (
EMOTION_IDX_HAPPINESS
) - Index 2 is surprise (
EMOTION_IDX_SURPRISE
) - Index 3 is sadness (
EMOTION_IDX_SADNESS
) - Index 4 is anger (
EMOTION_IDX_ANGER
)
- Index 0 is neutral (
-
-
Constructor Details
-
FaceData
public FaceData()Creates an empty face data.
-