| class info |
| com.huawei.hms.mlsdk.face.MLFaceAnalyzerSetting |
| Represents the face analysis configurator, which sets the attributes of the face analyzer. The face analyzer attributes include: 1. Whether to detect facial key-points 2. Whether to detect facial shapes 3. Whether to detect facial expressions and features, such as smiling and wearing a hat 4. Speed/precision preference mode for the analyzer to choose precision or speed priority in performing face detection 5. Whether to enable the face tracking function6. Smallest proportion of a face in an image 7. Whether to detect only the largest face |
| Type | Name | Desc |
| int | TYPE_FEATURES | Detect facial features and expressions in addition to basic data. |
| int | TYPE_KEYPOINTS | Detects facial key-points. |
| int | TYPE_PRECISION | Precision preference mode. This mode will detect more faces and be more precise in detecting key points and shapes, but will run slower. |
| int | TYPE_SHAPES | Detects facial shapes. |
| int | TYPE_SPEED | Speed preference mode. Compared with the precision preference mode, this mode will detect fewer faces and be less precise in detecting key points and shapes, but will run faster. |
| int | TYPE_UNSUPPORT_FEATURES | Detects only basic data: including shapes, key points, and three-dimensional rotation angles; does not detect facial features or expressions. |
| int | TYPE_UNSUPPORT_KEYPOINTS | Does not detect facial key-points. |
| int | TYPE_UNSUPPORT_SHAPES | Does not detect facial shapes. |
| Return type | Method name |
| boolean | equals(Object object) |
| int | getFeatureType() |
| int | getKeyPointType() |
| float | getMinFaceProportion() |
| int | getPerformanceType() |
| int | getShapeType() |
| int | hashCode() |
| boolean | isMaxSizeFaceOnly() |
| boolean | isTracingAllowed() |
| String | toString() |
| Constant |
| public static final int TYPE_FEATURES |
| Detect facial features and expressions in addition to basic data. Constant value: 1 |
| Constant |
| public static final int TYPE_KEYPOINTS |
| Detects facial key-points. Constant value: 1 |
| Constant |
| public static final int TYPE_PRECISION |
| Precision preference mode. This mode will detect more faces and be more precise in detecting key points and shapes, but will run slower. Constant value: 1 |
| Constant |
| public static final int TYPE_SHAPES |
| Detects facial shapes. Constant value: 2 |
| Constant |
| public static final int TYPE_SPEED |
| Speed preference mode. This mode will detect fewer faces and be less precise in detecting key points and shapes, but will run faster. Constant value: 2 |
| Constant |
| public static final int TYPE_UNSUPPORT_KEYPOINTS |
| Does not detect facial key points. Constant value: 0 |
| Constant |
| public static final int TYPE_UNSUPPORT_SHAPES |
| Does not detect facial shapes. Constant value: 3 |
| Method |
| public boolean equals(Object object) |
| Determines whether the input instance is equal to the current instance. |
Parameters
| Parameter name | Parameter desc |
| object | Instance to be compared. |
Return
| Type | desc |
| boolean | true: The instances are equal. false: The instances are not equal. |
| Method |
| public int getFeatureType() |
| Obtains the detection mode of facial features and expressions of the analyzer. |
Return
| Type | desc |
| int | Returns the detection mode of facial features and expressions of the analyzer. The default value is 1 (TYPE_FEATURES), indicating that facial features and expressions are detected. |
| Method |
| public int getKeyPointType() |
| Obtains the facial key-point detection mode of the analyzer. |
Return
| Type | desc |
| int | Returns the facial key-point detection mode of the analyzer. The default value is 1 (TYPE_KEYPOINTS), indicating that facial key-points are detected. |
| Method |
| public float getMinFaceProportion() |
| Obtains the smallest proportion of a face in an image. The proportion is equal to the head width divided by the image width. |
Return
| Type | desc |
| float | Returns the smallest face proportion set by the user. The default value is 0.1. |
| Method |
| public int getPerformanceType() |
| Obtains the preference mode of the analyzer. |
Return
| Type | desc |
| int | Returns the preference mode of the analyzer. The default value is 1 (TYPE_PRECISION), representing a preference for precision. |
| Method |
| public int getShapeType() |
| Obtains the facial shape detection mode of the analyzer. |
Return
| Type | desc |
| int | Returns the facial shape detection mode of the analyzer. The default value is 2 (TYPE_SHAPES), indicating that facial shapes are detected. |
| Method |
| public int hashCode() |
| Obtains the hash value of the current instance. |
Return
| Type | desc |
| int | Hash value of the instance. |
| Method |
| public boolean isMaxSizeFaceOnly() |
| Indicates whether to detect only the largest face in an image. |
Return
| Type | desc |
| boolean | Indicates whether to detect only the largest face. The default value is false, indicating that all faces are detected. |
| Method |
| public boolean isTracingAllowed() |
| Indicates whether to enable face tracking. |
Return
| Type | desc |
| boolean | Indicates whether to enable face tracking. The default value is false, indicating that face tracking is disabled. |
| Method |
| public String toString() |
| Converts the current instance into a character string. |
Return
| Type | desc |
| String | Character string of the current instance. |