| class info |
| com.huawei.hms.mlsdk.face.MLFaceEmotion |
| Represents a facial expression class. Seven facial expressions are included: smiling, neutral, anger, disgust, fear, sadness, and surprise. The sum of the measurements of all the facial expressions is 1. |
Public Method Summary
Public Methods
| Method |
| public float getAngryProbability() |
| Obtains the measurement of anger. |
Return
| Type | desc |
| float | Returns the measurement of anger, which is represented by a value ranging from 0.0 to 1.0. If facial feature and expression detection is enabled using the MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES) method, the measurement of anger is returned. Otherwise, –1 is returned. |
| Method |
| public float getDisgustProbability() |
| Obtains the measurement of disgust. |
Return
| Type | desc |
| float | Returns the measurement of disgust, which is represented by a value ranging from 0.0 to 1.0. If facial feature and expression detection is enabled using the MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES) method, the measurement of disgust is returned. Otherwise, –1 is returned. |
| Method |
| public float getFearProbability() |
| Obtains the measurement of fear. |
Return
| Type | desc |
| float | Returns the measurement of fear, which is represented by a value ranging from 0.0 to 1.0. If facial feature and expression detection is enabled using the MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES) method, the measurement of fear is returned. Otherwise, –1 is returned. |
| Method |
| public float getNeutralProbability() |
| Obtains the measurement of a neutral expression. |
Return
| Type | desc |
| float | Returns the measurement of a neutral expression, which is represented by a value ranging from 0.0 to 1.0. If facial feature and expression detection is enabled using the MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES) method, the measurement of a neutral expression is returned. Otherwise, –1 is returned. |
| Method |
| public float getSadProbability() |
| Obtains the measurement of sadness. |
Return
| Type | desc |
| float | Returns the measurement of sadness, which is represented by a value ranging from 0.0 to 1.0. If facial feature and expression detection is enabled using the MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES) method, the measurement of sadness is returned. Otherwise, –1 is returned. |
| Method |
| public float getSmilingProbability() |
| Obtains the measurement of smiling. |
Return
| Type | desc |
| float | Returns the measurement of smiling, which is represented by a value ranging from 0.0 to 1.0. If facial feature and expression detection is enabled using the MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES) method, the measurement of smiling is returned. Otherwise, –1 is returned. |
| Method |
| public float getSurpriseProbability() |
| Obtains the measurement of surprise. |
Return
| Type | desc |
| float | Returns the measurement of surprise, which is represented by a value ranging from 0.0 to 1.0. If facial feature and expression detection is enabled using the MLFaceAnalyzerSetting.Factory.setFeatureType(MLFaceAnalyzerSetting.TYPE_FEATURES) method, the measurement of surprise is returned. Otherwise, –1 is returned. |
| Method |
| public String toString() |
| Converts the current instance into a character string. |
Return
| Type | desc |
| String | Character string of the current instance. |
This page may contain third-party content. For details, click
here.