Represent face mesh detected by FaceMeshDetector
.
When
FaceMeshDetectorOptions.BOUNDING_BOX_ONLY
is selected, FaceMesh
only
contains valid bounding box.
When FaceMeshDetectorOptions.FACE_MESH
is selected. FaceMesh
also
contains a group of 468 3D face mesh points and related triangle information. Each point is
represented by FaceMeshPoint
describing a specific position in detected face. The triangle information is a group of 3
FaceMeshPoint
s
representing a valid surface on Face (e.g. a valid small surface on nose tip).
Nested Class Summary
@interface | FaceMesh.ContourType | Type of face contour. |
Constant Summary
int | FACE_OVAL | The outline of the subject's face. |
int | LEFT_EYE | The outline of the subject's left eye cavity. |
int | LEFT_EYEBROW_BOTTOM | The bottom outline of the subject's left eyebrow. |
int | LEFT_EYEBROW_TOP | The top outline of the subject's left eyebrow. |
int | LOWER_LIP_BOTTOM | The bottom outline of the subject's lower lip. |
int | LOWER_LIP_TOP | The top outline of the subject's lower lip. |
int | NOSE_BRIDGE | The outline of the subject's nose bridge. |
int | RIGHT_EYE | The outline of the subject's right eye cavity. |
int | RIGHT_EYEBROW_BOTTOM | The bottom outline of the subject's right eyebrow. |
int | RIGHT_EYEBROW_TOP | The top outline of the subject's right eyebrow. |
int | UPPER_LIP_BOTTOM | The bottom outline of the subject's upper lip. |
int | UPPER_LIP_TOP | The top outline of the subject's upper lip. |
Public Method Summary
List<FaceMeshPoint> |
getAllPoints()
Gets a list of
FaceMeshPoint
representing the whole detected face.
|
List<Triangle<FaceMeshPoint>> |
getAllTriangles()
Gets a list of
Triangle
representing logical triangle surfaces of detected face.
|
Rect |
getBoundingBox()
Returns the
NonNull axis-aligned bounding rectangle of the
detected face mesh.
|
List<FaceMeshPoint> |
getPoints(int contourType)
Gets a list of
FaceMeshPoint
representing a specific contour.
|
Inherited Method Summary
Constants
public static final int FACE_OVAL
The outline of the subject's face. It might include invisible points when user rotates the head to a certain angle.
public static final int LEFT_EYE
The outline of the subject's left eye cavity.
public static final int LEFT_EYEBROW_BOTTOM
The bottom outline of the subject's left eyebrow.
public static final int LEFT_EYEBROW_TOP
The top outline of the subject's left eyebrow.
public static final int LOWER_LIP_BOTTOM
The bottom outline of the subject's lower lip.
public static final int LOWER_LIP_TOP
The top outline of the subject's lower lip.
public static final int NOSE_BRIDGE
The outline of the subject's nose bridge.
public static final int RIGHT_EYE
The outline of the subject's right eye cavity.
public static final int RIGHT_EYEBROW_BOTTOM
The bottom outline of the subject's right eyebrow.
public static final int RIGHT_EYEBROW_TOP
The top outline of the subject's right eyebrow.
public static final int UPPER_LIP_BOTTOM
The bottom outline of the subject's upper lip.
public static final int UPPER_LIP_TOP
The top outline of the subject's upper lip.
Public Methods
public List<FaceMeshPoint> getAllPoints ()
Gets a list of FaceMeshPoint
representing the whole detected face. Returns empty list if
FaceMeshDetectorOptions.BOUNDING_BOX_ONLY
is selected.
public List<Triangle<FaceMeshPoint>> getAllTriangles ()
Gets a list of Triangle
representing logical triangle surfaces of detected face. Returns empty list if
FaceMeshDetectorOptions.BOUNDING_BOX_ONLY
is selected.
Each Triangle
contains 3 FaceMeshPoint
,
representing 3 points of the triangle surface. The sequence of the 3 points are
constant and always counter clockwise in face mesh.
public Rect getBoundingBox ()
Returns the NonNull
axis-aligned bounding rectangle of the detected
face mesh.
public List<FaceMeshPoint> getPoints (int contourType)
Gets a list of FaceMeshPoint
representing a specific contour. Returns empty list if
FaceMeshDetectorOptions.BOUNDING_BOX_ONLY
is selected.