FaceContour
Stay organized with collections
Save and categorize content based on your preferences.
Represent a face contour. A contour is a list of points on a detected face, such as the
mouth.
When 'left' and 'right' are used, they are relative to the subject in the image. For
example, the LEFT_EYE
landmark is the subject's left eye, not the eye that is on the left when viewing the
image.
Public Method Summary
int |
|
List<PointF>
|
getPoints()
Gets a list of 2D points for this face contour, where (0, 0) is the upper-left
corner of the image.
|
String
|
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Constants
public static final int
FACE
The outline of the subject's face.
Constant Value: 1
public static final int
LEFT_CHEEK
The center of the left cheek.
Constant Value: 14
public static final int
LEFT_EYE
The outline of the subject's left eye cavity.
Constant Value: 6
public static final int
LEFT_EYEBROW_BOTTOM
The bottom outline of the subject's left eyebrow.
Constant Value: 3
public static final int
LEFT_EYEBROW_TOP
The top outline of the subject's left eyebrow.
Constant Value: 2
public static final int
LOWER_LIP_BOTTOM
The bottom outline of the subject's lower lip.
Constant Value: 11
public static final int
LOWER_LIP_TOP
The top outline of the subject's lower lip.
Constant Value: 10
public static final int
NOSE_BOTTOM
The outline of the subject's nose bridge.
Constant Value: 13
public static final int
NOSE_BRIDGE
The outline of the subject's nose bridge.
Constant Value: 12
public static final int
RIGHT_CHEEK
The center of the right cheek.
Constant Value: 15
public static final int
RIGHT_EYE
The outline of the subject's right eye cavity.
Constant Value: 7
public static final int
RIGHT_EYEBROW_BOTTOM
The bottom outline of the subject's right eyebrow.
Constant Value: 5
public static final int
RIGHT_EYEBROW_TOP
The top outline of the subject's right eyebrow.
Constant Value: 4
public static final int
UPPER_LIP_BOTTOM
The bottom outline of the subject's upper lip.
Constant Value: 9
public static final int
UPPER_LIP_TOP
The top outline of the subject's upper lip.
Constant Value: 8
Public Methods
public int getFaceContourType ()
public List<PointF>
getPoints ()
Gets a list of 2D points for this face contour, where (0, 0) is the upper-left
corner of the image. The point is guaranteed to be within the bounds of the image.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eFaceContour\u003c/code\u003e represents a list of points outlining facial features like the mouth or eyes, detected on a face within an image.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides constants for various facial features, such as \u003ccode\u003eLEFT_EYE\u003c/code\u003e, \u003ccode\u003eRIGHT_EYE\u003c/code\u003e, \u003ccode\u003eNOSE_BRIDGE\u003c/code\u003e, and \u003ccode\u003eUPPER_LIP_TOP\u003c/code\u003e, allowing developers to easily target these areas.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve the contour type and a list of 2D points representing the contour using \u003ccode\u003egetFaceContourType()\u003c/code\u003e and \u003ccode\u003egetPoints()\u003c/code\u003e respectively.\u003c/p\u003e\n"],["\u003cp\u003eWhen referring to 'left' or 'right', the orientation is from the perspective of the subject in the image, not the viewer's perspective.\u003c/p\u003e\n"]]],[],null,["# FaceContour\n\npublic class **FaceContour** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nRepresent a face contour. A contour is a list of points on a detected face, such as the\nmouth.\n\nWhen 'left' and 'right' are used, they are relative to the subject in the image. For\nexample, the [LEFT_EYE](/android/reference/com/google/mlkit/vision/face/FaceContour#LEFT_EYE)\nlandmark is the subject's left eye, not the eye that is on the left when viewing the\nimage. \n\n### Nested Class Summary\n\n|------------|---|---|-------------------------|\n| @interface | [FaceContour.ContourType](/android/reference/com/google/mlkit/vision/face/FaceContour.ContourType) || Contour types for face. |\n\n### Constant Summary\n\n|-----|----------------------------------------------------------------------------------------------------------|----------------------------------------------------|\n| int | [FACE](/android/reference/com/google/mlkit/vision/face/FaceContour#FACE) | The outline of the subject's face. |\n| int | [LEFT_CHEEK](/android/reference/com/google/mlkit/vision/face/FaceContour#LEFT_CHEEK) | The center of the left cheek. |\n| int | [LEFT_EYE](/android/reference/com/google/mlkit/vision/face/FaceContour#LEFT_EYE) | The outline of the subject's left eye cavity. |\n| int | [LEFT_EYEBROW_BOTTOM](/android/reference/com/google/mlkit/vision/face/FaceContour#LEFT_EYEBROW_BOTTOM) | The bottom outline of the subject's left eyebrow. |\n| int | [LEFT_EYEBROW_TOP](/android/reference/com/google/mlkit/vision/face/FaceContour#LEFT_EYEBROW_TOP) | The top outline of the subject's left eyebrow. |\n| int | [LOWER_LIP_BOTTOM](/android/reference/com/google/mlkit/vision/face/FaceContour#LOWER_LIP_BOTTOM) | The bottom outline of the subject's lower lip. |\n| int | [LOWER_LIP_TOP](/android/reference/com/google/mlkit/vision/face/FaceContour#LOWER_LIP_TOP) | The top outline of the subject's lower lip. |\n| int | [NOSE_BOTTOM](/android/reference/com/google/mlkit/vision/face/FaceContour#NOSE_BOTTOM) | The outline of the subject's nose bridge. |\n| int | [NOSE_BRIDGE](/android/reference/com/google/mlkit/vision/face/FaceContour#NOSE_BRIDGE) | The outline of the subject's nose bridge. |\n| int | [RIGHT_CHEEK](/android/reference/com/google/mlkit/vision/face/FaceContour#RIGHT_CHEEK) | The center of the right cheek. |\n| int | [RIGHT_EYE](/android/reference/com/google/mlkit/vision/face/FaceContour#RIGHT_EYE) | The outline of the subject's right eye cavity. |\n| int | [RIGHT_EYEBROW_BOTTOM](/android/reference/com/google/mlkit/vision/face/FaceContour#RIGHT_EYEBROW_BOTTOM) | The bottom outline of the subject's right eyebrow. |\n| int | [RIGHT_EYEBROW_TOP](/android/reference/com/google/mlkit/vision/face/FaceContour#RIGHT_EYEBROW_TOP) | The top outline of the subject's right eyebrow. |\n| int | [UPPER_LIP_BOTTOM](/android/reference/com/google/mlkit/vision/face/FaceContour#UPPER_LIP_BOTTOM) | The bottom outline of the subject's upper lip. |\n| int | [UPPER_LIP_TOP](/android/reference/com/google/mlkit/vision/face/FaceContour#UPPER_LIP_TOP) | The top outline of the subject's upper lip. |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| int | [getFaceContourType](/android/reference/com/google/mlkit/vision/face/FaceContour#getFaceContourType())() Gets the [FaceContour.ContourType](/android/reference/com/google/mlkit/vision/face/FaceContour.ContourType) type. |\n| [List](//developer.android.com/reference/java/util/List.html)\\\u003c[PointF](//developer.android.com/reference/android/graphics/PointF.html)\\\u003e | [getPoints](/android/reference/com/google/mlkit/vision/face/FaceContour#getPoints())() Gets a list of 2D points for this face contour, where (0, 0) is the upper-left corner of the image. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/mlkit/vision/face/FaceContour#toString())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final int\n**FACE**\n\nThe outline of the subject's face. \nConstant Value: 1 \n\n#### public static final int\n**LEFT_CHEEK**\n\nThe center of the left cheek. \nConstant Value: 14 \n\n#### public static final int\n**LEFT_EYE**\n\nThe outline of the subject's left eye cavity. \nConstant Value: 6 \n\n#### public static final int\n**LEFT_EYEBROW_BOTTOM**\n\nThe bottom outline of the subject's left eyebrow. \nConstant Value: 3 \n\n#### public static final int\n**LEFT_EYEBROW_TOP**\n\nThe top outline of the subject's left eyebrow. \nConstant Value: 2 \n\n#### public static final int\n**LOWER_LIP_BOTTOM**\n\nThe bottom outline of the subject's lower lip. \nConstant Value: 11 \n\n#### public static final int\n**LOWER_LIP_TOP**\n\nThe top outline of the subject's lower lip. \nConstant Value: 10 \n\n#### public static final int\n**NOSE_BOTTOM**\n\nThe outline of the subject's nose bridge. \nConstant Value: 13 \n\n#### public static final int\n**NOSE_BRIDGE**\n\nThe outline of the subject's nose bridge. \nConstant Value: 12 \n\n#### public static final int\n**RIGHT_CHEEK**\n\nThe center of the right cheek. \nConstant Value: 15 \n\n#### public static final int\n**RIGHT_EYE**\n\nThe outline of the subject's right eye cavity. \nConstant Value: 7 \n\n#### public static final int\n**RIGHT_EYEBROW_BOTTOM**\n\nThe bottom outline of the subject's right eyebrow. \nConstant Value: 5 \n\n#### public static final int\n**RIGHT_EYEBROW_TOP**\n\nThe top outline of the subject's right eyebrow. \nConstant Value: 4 \n\n#### public static final int\n**UPPER_LIP_BOTTOM**\n\nThe bottom outline of the subject's upper lip. \nConstant Value: 9 \n\n#### public static final int\n**UPPER_LIP_TOP**\n\nThe top outline of the subject's upper lip. \nConstant Value: 8\n\nPublic Methods\n--------------\n\n#### public int **getFaceContourType** ()\n\nGets the [FaceContour.ContourType](/android/reference/com/google/mlkit/vision/face/FaceContour.ContourType)\ntype. \n\n#### public [List](//developer.android.com/reference/java/util/List.html)\\\u003c[PointF](//developer.android.com/reference/android/graphics/PointF.html)\\\u003e\n**getPoints** ()\n\nGets a list of 2D points for this face contour, where (0, 0) is the upper-left\ncorner of the image. The point is guaranteed to be within the bounds of the image. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()"]]