目录

class info
com.huawei.hms.mlsdk.face.MLFaceKeyPoint
Represents a key point on a detected face. Key-point types include:
TYPE_BOTTOM_OF_MOUTH: The value is 1, representing the center of the lower lip.
TYPE_LEFT_CHEEK: The value is 2, representing the center of the left cheek.
TYPE_LEFT_EAR: The value is 3, representing the center of the left ear tragus.
TYPE_TIP_OF_LEFT_EAR: The value is 4, representing the tip of the left ear.
TYPE_LEFT_EYE: The value is 5, representing the center of the left eyeball.
TYPE_LEFT_SIDE_OF_MOUTH: The value is 6, representing the left mouth corner point.
TYPE_TIP_OF_NOSE: The value is 7, representing the center of the nasal tip.
TYPE_RIGHT_CHEEK: The value is 8, representing the center of the right cheek.
TYPE_RIGHT_EAR: The value is 9, representing the center of the right ear tragus.
TYPE_TIP_OF_RIGHT_EAR: The value is 10, representing the tip of the right ear.
TYPE_RIGHT_EYE: The value is 11, representing the center of the right eyeball.
TYPE_RIGHT_SIDE_OF_MOUTH: The value is 12, representing the right mouth corner point.
Note: In this document, “left” and “right” refer to the sides you are facing the image, not the sides of the face in the image.

Constant Summary

TypeNameDesc
intTYPE_BOTTOM_OF_MOUTHCenter of the lower lip.
intTYPE_LEFT_CHEEKCenter of the left cheek.
intTYPE_LEFT_EARCenter of the left ear tragus.
intTYPE_LEFT_EYECenter of the left eyeball.
intTYPE_LEFT_SIDE_OF_MOUTHLeft mouth corner point.
intTYPE_RIGHT_CHEEKCenter of the right cheek.
intTYPE_RIGHT_EARCenter of the right ear tragus.
intTYPE_RIGHT_EYECenter of the right eyeball.
intTYPE_RIGHT_SIDE_OF_MOUTHRight mouth corner point.
intTYPE_TIP_OF_LEFT_EARTip of the left ear.
intTYPE_TIP_OF_NOSECenter of the nasal tip.
intTYPE_TIP_OF_RIGHT_EARTip of the right ear.

Public Method Summary

Return typeMethod name
MLPositiongetPoint()
intgetType()
StringtoString()

Constants

Constant
public static final int TYPE_BOTTOM_OF_MOUTH
Center of the lower lip.
Constant value: 1
Constant
public static final int TYPE_LEFT_CHEEK
Center of the left cheek.
Constant value: 2
Constant
public static final int TYPE_LEFT_EAR
Center of the left ear tragus.
Constant value: 3
Constant
public static final int TYPE_LEFT_EYE
Center of the left eyeball.
Constant value: 5
Constant
public static final int TYPE_LEFT_SIDE_OF_MOUTH
Left mouth corner point.
Constant value: 6
Constant
public static final int TYPE_RIGHT_CHEEK
Center of the right cheek.
Constant value: 8
Constant
public static final int TYPE_RIGHT_EAR
Center of the right ear tragus.
Constant value: 9
Constant
public static final int TYPE_RIGHT_EYE
Center of the right eyeball.
Constant value: 11
Constant
public static final int TYPE_RIGHT_SIDE_OF_MOUTH
Right mouth corner point.
Constant value: 12
Constant
public static final int TYPE_TIP_OF_LEFT_EAR
Tip of the left ear.
Constant value: 4
Constant
public static final int TYPE_TIP_OF_NOSE
Center of the nasal tip.
Constant value: 7
Constant
public static final int TYPE_TIP_OF_RIGHT_EAR
Tip of the right ear.
Constant value: 10

Public Methods

Method
public MLPosition getPoint()
Obtains the (x, y, z) position of a facial key-point, where (0, 0, 0) is the upper-left corner of the image.

Return

Typedesc
MLPositionReturns the MLPosition instance. Currently, the z parameter of the MLPosition class is reserved. The value is 0.
Method
public int getType()
Obtains the facial key-point type.

Return

Typedesc
intReturns the facial key-point type.
Method
public String toString()
Converts the current instance into a character string.

Return

Typedesc
StringCharacter string of the current instance.