Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# FaceAnalyser Class

Namespace: id3.Face

## Definition

Provides methods for analysing the characteristics of portrait image.
Python

    class FaceAnalyser

Dart

    class FaceAnalyser implements Finalizable

C#

    public partial class FaceAnalyser

Java

    public class FaceAnalyser implements AutoCloseable, Serializable

Swift

    public class FaceAnalyser

C

    typedef struct id3FaceAnalyser *ID3_FACE_ANALYSER;

## Usage

Python

    faceAnalyserInstance = id3face.FaceAnalyser()

Explicit destruction

    # ...
    del faceAnalyserInstance

Dart

    final faceAnalyserInstance = sdk.FaceAnalyser();
    // ...

Explicit destruction

    // ...
    faceAnalyserInstance.dispose()

C#

    using (var faceAnalyserInstance = new FaceAnalyser())
    {
       // ...
    }

Explicit destruction

    var faceAnalyserInstance = new FaceAnalyser()
    // ...
    faceAnalyserInstance.Dispose()

Java

    try (FaceAnalyser faceAnalyserInstance = new FaceAnalyser()) {
    // ...
    }

Explicit destruction

    FaceAnalyser faceAnalyserInstance = new FaceAnalyser();
    // ...
    faceAnalyserInstance.close();

Swift

    private var faceAnalyserInstance: FaceAnalyser? = nil
    faceAnalyserInstance = try FaceAnalyser()

C

    ID3_FACE_ANALYSER hFaceAnalyser{};
    int err = id3FaceAnalyser_Initialize(&hFaceAnalyser);
    if (err == ID3_SUCCESS) {
        // ...
        id3FaceAnalyser_Dispose(&hFaceAnalyser);
    }

## Properties

Name | Type | Description
--- | --- | ---
expressionSensibility | int | Sensibility of the expression classifier.
overExposureSensibility | int | Sensibility of the over-exposure classifier, from 0 to 255.
threadCount | int | Number of threads to be used for face analysis.
underExposureSensibility | int | Sensibility of the under-exposure classifier, from 0 to 255.

## Methods

Name | Description
--- | ---
applyAlphaMask | Applies an alpha mask to suppress the background and returns a 32-bit BGRA image.
applyMask | Applies a mask to replace the background with the specified color and returns a 24-bit BGR image.
checkColorizedImage | Verifies if an image is colorized or grayscale.
computeAge | Computes the age of a detected face.
computeAttributes | Computes the attributes of a detected face.
computeBackgroundUniformity | Computes the background uniformity behind a detected face.
computeExpression | Computes the expression of a detected face.
computeEyeGaze | Computes the eye gaze of a detected face.
computeEyeOpenness | Computes the eye openness of a detected face.
computeEyeRedness | Computes the eye redness of a detected face.
computeGeometricAttributes | Computes the geometric attributes of a detected face. This function must be used for a portrait image with only one face in it.
computeGlassesAttributes | Computes the glasses attributes of a detected face. This function must be used for a portrait image with only one face in it.
computeLandmarks | Computes 68 landmarks of a detected face.
computeNoise | Measures the image noise.
computePhotographicAttributes | Computes the photographic attributes of a detected face. This function must be used for a portrait image with only one face in it.
computePose | Computes the pose of a detected face.
computePoseWithLandmarks | Computes the pose of a detected face using the specified 68-point landmarks.
detectFaceMask | Detects the presence of a face mask on a detected face.
detectOcclusions | Detects occlusions on the subject’s face.
removeCompressionArtifacts | Upscale and enhance the image of a face.
segmentBackground | Computes face segmentation mask for background removal.
segmentFace | Computes a segmentation map of a face.