目录

class info
com.huawei.hms.mlsdk.face.MLFaceFeature
人脸特征类,包含七种人脸特征:
1、左眼睁开的程度;
2、右眼睁开的程度;
3、戴眼镜的可能性;
4、性别的可能性;
5、戴帽子的可能性;
6、有胡子的可能性;
7、年龄。

Public Method Summary

Return typeMethod name
intgetAge()
floatgetHatProbability()
floatgetLeftEyeOpenProbability()
floatgetMoustacheProbability()
floatgetRightEyeOpenProbability()
floatgetSexProbability()
floatgetSunGlassProbability()
StringtoString()

Public Methods

Method
public int getAge()
获取人脸年龄。

Return

Typedesc
int返回人脸年龄。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回年龄;否则,返回-1。
Method
public float getHatProbability()
获取人脸戴帽子的可能性。

Return

Typedesc
float返回人脸戴帽子的可能性,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回戴帽子的可能性;否则,返回-1。
Method
public float getLeftEyeOpenProbability()
获取人脸左眼睁开的程度。

Return

Typedesc
float返回人脸左眼睁开的程度,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回左眼睁开的程度;否则,返回-1。
Method
public float getMoustacheProbability()
获取人脸有胡子的可能性。

Return

Typedesc
float返回人脸有胡子的可能性,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回有胡子的可能性;否则,返回-1。
Method
public float getRightEyeOpenProbability()
获取人脸右眼睁开的程度。

Return

Typedesc
float返回人脸右眼睁开的程度,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回右眼睁开的程度;否则,返回-1。
Method
public float getSexProbability()
获取人脸性别的可能性。

Return

Typedesc
float返回人脸性别的可能性,以0.0-1.0表示,0.0-0.5代表性别可能为男性,0.5-1.0代表性别可能为女性。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回性别的可能性;否则,返回-1。
Method
public float getSunGlassProbability()
获取人脸戴眼镜的可能性。

Return

Typedesc
float返回人脸戴眼镜的可能性,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回戴眼镜的可能性;否则,返回-1。
Method
public String toString()
当前实例转换为字符串。

Return

Typedesc
String当前实例的字符串。