目录

class info
com.huawei.hms.mlsdk.face.MLFaceEmotion
人脸表情类,包含人脸七种表情:微笑、无表情、愤怒、厌恶、惊恐、悲伤和惊讶。所有表情的程度值相加等于1。

Public Method Summary

Return typeMethod name
floatgetAngryProbability()
floatgetDisgustProbability()
floatgetFearProbability()
floatgetNeutralProbability()
floatgetSadProbability()
floatgetSmilingProbability()
floatgetSurpriseProbability()
StringtoString()

Public Methods

Method
public float getAngryProbability()
获取人脸愤怒的程度。

Return

Typedesc
float返回人脸愤怒的程度,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回人脸愤怒的程度;否则,返回-1。
Method
public float getDisgustProbability()
获取人脸厌恶的程度。

Return

Typedesc
float返回人脸厌恶的程度,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType (MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回人脸厌恶的程度;否则,返回-1。
Method
public float getFearProbability()
获取人脸惊恐的程度。

Return

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

Return

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

Return

Typedesc
float返回人脸悲伤的程度,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType (MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回人脸悲伤的程度;否则,返回-1。
Method
public float getSmilingProbability()
获取人脸微笑的程度。

Return

Typedesc
float返回人脸微笑的程度,以0.0-1.0表示。如果通过方法MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES)启用了“人脸表情和特征检测”功能,则返回人脸微笑的程度;否则,返回-1。
Method
public float getSurpriseProbability()
获取人脸惊讶的程度。

Return

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

Return

Typedesc
String当前实例的字符串。