Face.State


public final class Face.State implements Trackable.State


The representation of the current state of Face.

Summary

Public methods

boolean
equals(Object other)
final @NonNull Map<@NonNull FaceBlendShapeType, @NonNull Float>
final Pose

the pose at the center of the face, defined to have the origin located behind the nose and between the two cheek bones

final @FloatRange(from = 0.0, to = 1.0, fromInclusive = true, toInclusive = true) float

Gets the confidence value of the face tracker for the given region.

final Mesh

the polygonal representation of the face as observed by the perception system

final @NonNull Map<@NonNull FaceMeshRegionPose>

Map of Pose values on the Face for each FaceMeshRegion

@NonNull TrackingState

the current TrackingState of the face.

int
@NonNull String

Public methods

equals

public boolean equals(Object other)

getBlendShapes

Added in 1.0.0-alpha12
public final @NonNull Map<@NonNull FaceBlendShapeType, @NonNull FloatgetBlendShapes()

getCenterPose

Added in 1.0.0-alpha12
public final Pose getCenterPose()

the pose at the center of the face, defined to have the origin located behind the nose and between the two cheek bones

Z+ is forward out of the nose, Y+ is upwards, and X+ is towards the left. The units are in meters.

centerPose will be null if the Session is not configured with FaceTrackingMode.MESHES.

getConfidence

Added in 1.0.0-alpha12
public final @FloatRange(from = 0.0, to = 1.0, fromInclusive = true, toInclusive = true) float getConfidence(@NonNull FaceConfidenceRegion region)

Gets the confidence value of the face tracker for the given region.

Parameters
@NonNull FaceConfidenceRegion region

the FaceConfidenceRegion to get the confidence value for

Returns
@FloatRange(from = 0.0, to = 1.0, fromInclusive = true, toInclusive = true) float

the confidence value in the range [0.0, 1.0] of the face tracker for the given region

Throws
IllegalArgumentException

if the region does not exist

IllegalStateException

if the Face does not provide confidence values

getMesh

Added in 1.0.0-alpha12
public final Mesh getMesh()

the polygonal representation of the face as observed by the perception system

mesh will be null if the Session is not configured with FaceTrackingMode.MESHES.

getRegionPoses

Added in 1.0.0-alpha12
public final @NonNull Map<@NonNull FaceMeshRegionPosegetRegionPoses()

Map of Pose values on the Face for each FaceMeshRegion

Each Pose value in the Map will be null if the Session is not configured with FaceTrackingMode.MESHES.

getTrackingState

public @NonNull TrackingState getTrackingState()

the current TrackingState of the face.

hashCode

public int hashCode()

toString

public @NonNull String toString()