| class info |
| com.huawei.hms.mlsdk.face.MLFaceShape |
| 人脸关键轮廓,包含检测到的人脸关键轮廓(例如嘴巴)上的一组点。轮廓类型包括: TYPE_ALL:值为0,代表人脸所有轮廓; TYPE_FACE:值为1,代表脸部总体轮廓; TYPE_LEFT_EYE:值为2,代表左眼的轮廓; TYPE_RIGHT_EYE:值为3,代表右眼的轮廓; TYPE_BOTTOM_OF_LEFT_EYEBROW:值为4,代表左眉的底部轮廓; TYPE_BOTTOM_OF_RIGHT_EYEBROW:值为5,代表右眉的底部轮廓; TYPE_TOP_OF_LEFT_EYEBROW:值为6,代表左眉的顶部轮廓; TYPE_TOP_OF_RIGHT_EYEBROW:值为7,代表右眉的顶部轮廓; TYPE_BOTTOM_OF_LOWER_LIP:值为8,代表下嘴唇的底部轮廓; TYPE_TOP_OF_LOWER_LIP:值为9,代表下嘴唇的顶部轮廓; TYPE_TOP_OF_UPPER_LIP:值为10,代表上嘴唇的顶部轮廓; TYPE_BOTTOM_OF_UPPER_LIP:值为11,代表上嘴唇的底部轮廓; TYPE_BOTTOM_OF_NOSE:值为12,代表鼻子的底部轮廓; TYPE_BRIDGE_OF_NOSE:值为13,代表鼻梁的轮廓。 注意:文中所说的“左”、“右”,均指的是面向图像时你的左右,并非图像中人脸的左右。 |
| Type | Name | Desc |
| int | TYPE_ALL | 人脸所有关键轮廓。 |
| int | TYPE_BOTTOM_OF_LEFT_EYEBROW | 左眉的底部轮廓。 |
| int | TYPE_BOTTOM_OF_LOWER_LIP | 下嘴唇的底部轮廓。 |
| int | TYPE_BOTTOM_OF_NOSE | 鼻子的底部轮廓。 |
| int | TYPE_BOTTOM_OF_RIGHT_EYEBROW | 右眉的底部轮廓。 |
| int | TYPE_BOTTOM_OF_UPPER_LIP | 上嘴唇的底部轮廓。 |
| int | TYPE_BRIDGE_OF_NOSE | 鼻梁的轮廓。 |
| int | TYPE_FACE | 脸部总体轮廓。 |
| int | TYPE_LEFT_EYE | 左眼的轮廓。 |
| int | TYPE_RIGHT_EYE | 右眼的轮廓。 |
| int | TYPE_TOP_OF_LEFT_EYEBROW | 左眉的顶部轮廓。 |
| int | TYPE_TOP_OF_LOWER_LIP | 下嘴唇的顶部轮廓。 |
| int | TYPE_TOP_OF_RIGHT_EYEBROW | 右眉的顶部轮廓。 |
| int | TYPE_TOP_OF_UPPER_LIP | 上嘴唇的顶部轮廓。 |
| Return type | Method name |
| int | getFaceShapeType() |
| List<MLPosition> | getPoints() |
| String | toString() |
| Constant |
| public static final int TYPE_ALL |
| 人脸所有关键轮廓。 |
| Constant Value: 0 |
| Constant |
| public static final int TYPE_BOTTOM_OF_LEFT_EYEBROW |
| 左眉的底部轮廓。 |
| Constant Value: 4 |
| Constant |
| public static final int TYPE_BOTTOM_OF_LOWER_LIP |
| 下嘴唇的底部轮廓。 |
| Constant Value: 8 |
| Constant |
| public static final int TYPE_BOTTOM_OF_NOSE |
| 鼻子的底部轮廓。 |
| Constant Value: 12 |
| Constant |
| public static final int TYPE_BOTTOM_OF_RIGHT_EYEBROW |
| 右眉的底部轮廓。 |
| Constant Value: 5 |
| Constant |
| public static final int TYPE_BOTTOM_OF_UPPER_LIP |
| 上嘴唇的底部轮廓。 |
| Constant Value: 10 |
| Constant |
| public static final int TYPE_BRIDGE_OF_NOSE |
| 鼻梁的轮廓。 |
| Constant Value: 13 |
| Constant |
| public static final int TYPE_FACE |
| 脸部总体轮廓。 |
| Constant Value: 1 |
| Constant |
| public static final int TYPE_LEFT_EYE |
| 左眼的轮廓。 |
| Constant Value: 2 |
| Constant |
| public static final int TYPE_RIGHT_EYE |
| 右眼的轮廓。 |
| Constant Value: 3 |
| Constant |
| public static final int TYPE_TOP_OF_LEFT_EYEBROW |
| 左眉的顶部轮廓。 |
| Constant Value: 6 |
| Constant |
| public static final int TYPE_TOP_OF_LOWER_LIP |
| 下嘴唇的顶部轮廓。 |
| Constant Value: 9 |
| Constant |
| public static final int TYPE_TOP_OF_RIGHT_EYEBROW |
| 右眉的顶部轮廓。 |
| Constant Value: 7 |
| Constant |
| public static final int TYPE_TOP_OF_UPPER_LIP |
| 上嘴唇的顶部轮廓。 |
| Constant Value: 11 |
| Method |
| public int getFaceShapeType() |
| 获取人脸关键轮廓类型。 |
Return
| Type | desc |
| int | 返回人脸关键轮廓类型。 |
| Method |
| public List<MLPosition> getPoints() |
| 获取当前轮廓的所有点。 |
Return
| Type | desc |
| List<MLPosition> | 返回当前轮廓的所有点。 |
| Method |
| public String toString() |
| 当前实例转换为字符串。 |
Return
| Type | desc |
| String | 当前实例的字符串。 |