目录

class info
com.huawei.hms.mlsdk.face.MLFaceShape
Represents a facial shape, which contains a set of points that outlines a facial region. Shape types include:
TYPE_ALL: The value is 0, representing all shapes of a face.
TYPE_FACE: The value is 1, representing the overall facial shape.
TYPE_LEFT_EYE: The value is 2, representing the shape of the left eye.
TYPE_RIGHT_EYE: The value is 3, representing the shape of the right eye.
TYPE_BOTTOM_OF_LEFT_EYEBROW: The value is 4, representing the bottom shape of the left eyebrow.
TYPE_BOTTOM_OF_RIGHT_EYEBROW: The value is 5, representing the bottom shape of the right eyebrow.
TYPE_TOP_OF_LEFT_EYEBROW: The value is 6, representing the top shape of the left eyebrow.
TYPE_TOP_OF_RIGHT_EYEBROW: The value is 7, representing the top shape of the right eyebrow.
TYPE_BOTTOM_OF_LOWER_LIP: The value is 8, representing the bottom shape of the lower lip.
TYPE_TOP_OF_LOWER_LIP: The value is 9, representing the top shape of the lower lip.
TYPE_TOP_OF_UPPER_LIP: The value is 10, representing the top shape of the upper lip.
TYPE_BOTTOM_OF_UPPER_LIP: The value is 11, representing the bottom shape of the upper lip.
TYPE_BOTTOM_OF_NOSE: The value is 12, representing the bottom shape of the nose.
TYPE_BRIDGE_OF_NOSE: The value is 13, representing the shape of the nose bridge.
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_ALLAll shapes of a face.
intTYPE_BOTTOM_OF_LEFT_EYEBROWBottom shape of the left eyebrow.
intTYPE_BOTTOM_OF_LOWER_LIPBottom shape of the lower lip.
intTYPE_BOTTOM_OF_NOSEBottom shape of the nose.
intTYPE_BOTTOM_OF_RIGHT_EYEBROWBottom shape of the right eyebrow.
intTYPE_BOTTOM_OF_UPPER_LIPBottom shape of the upper lip.
intTYPE_BRIDGE_OF_NOSEShape of the nose bridge.
intTYPE_FACEOverall face shape.
intTYPE_LEFT_EYEShape of the left eye.
intTYPE_RIGHT_EYEShape of the right eye.
intTYPE_TOP_OF_LEFT_EYEBROWTop shape of the left eyebrow.
intTYPE_TOP_OF_LOWER_LIPTop shape of the lower lip.
intTYPE_TOP_OF_RIGHT_EYEBROWTop shape of the right eyebrow.
intTYPE_TOP_OF_UPPER_LIPTop shape of the upper lip.

Public Method Summary

Return typeMethod name
intgetFaceShapeType()
List<MLPosition>getPoints()
StringtoString()

Constants

Constant
public static final int TYPE_ALL
All shapes of a face.
Constant value: 0
Constant
public static final int TYPE_BOTTOM_OF_LEFT_EYEBROW
Bottom shape of the left eyebrow.
Constant value: 4
Constant
public static final int TYPE_BOTTOM_OF_LOWER_LIP
Bottom shape of the lower lip.
Constant value: 8
Constant
public static final int TYPE_BOTTOM_OF_NOSE
Bottom shape of the nose.
Constant value: 12
Constant
public static final int TYPE_BOTTOM_OF_RIGHT_EYEBROW
Bottom shape of the right eyebrow.
Constant value: 5
Constant
public static final int TYPE_BOTTOM_OF_UPPER_LIP
Bottom shape of the upper lip.
Constant value: 10
Constant
public static final int TYPE_BRIDGE_OF_NOSE
Shape of the nose bridge.
Constant value: 13
Constant
public static final int TYPE_FACE
Overall face shape.
Constant value: 1
Constant
public static final int TYPE_LEFT_EYE
Shape of the left eye.
Constant value: 2
Constant
public static final int TYPE_RIGHT_EYE
Shape of the right eye.
Constant value: 3
Constant
public static final int TYPE_TOP_OF_LEFT_EYEBROW
Top shape of the left eyebrow.
Constant value: 6
Constant
public static final int TYPE_TOP_OF_LOWER_LIP
Top shape of the lower lip.
Constant value: 9
Constant
public static final int TYPE_TOP_OF_RIGHT_EYEBROW
Top shape of the right eyebrow.
Constant value: 7
Constant
public static final int TYPE_TOP_OF_UPPER_LIP
Top shape of the upper lip.
Constant value: 11

Public Methods

Method
public int getFaceShapeType()
Obtains the facial shape type.

Return

Typedesc
intReturns the facial shape type.
Method
public List<MLPosition> getPoints()
Obtains all points of the current shape.

Return

Typedesc
List<MLPosition>Returns all points of the current shape.
Method
public String toString()
Converts the current instance into a character string.

Return

Typedesc
StringCharacter string of the current instance.