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

# FaceEncoder.computeQuality Method

Module: FaceEncoder

## Definition

Computes the quality of a detected face.

Here, quality expresses the match capability of an image: a high quality image will generate less match errors (false acceptance or false rejection) than a low quality one.

Warning

A minimum interocular distance (IOD) of 30 pixels for the detected face is required for this function, below this value it will output an error.

Important

Loading the `FaceEncodingQualityEstimator` model is required to use this function.

Python

    compute_quality(self, image: Image, detected_face: DetectedFace) -> int

Parameters

> `image` Image
> in Source image to process.
> `detected_face` DetectedFace
> in Detected face to process.

Returns

> `int`
> The estimated quality of the detected face. Range is [0:100].

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    int computeQuality(Image image, DetectedFace detectedFace)

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.

Returns

> `int`
> The estimated quality of the detected face. Range is [0:100].

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public int ComputeQuality(Image image, DetectedFace detectedFace)

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.

Returns

> `int`
> The estimated quality of the detected face. Range is [0:100].

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public int computeQuality(Image image, DetectedFace detectedFace) throws FaceException

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.

Returns

> `int`
> The estimated quality of the detected face. Range is [0:100].

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public func computeQuality(image: Image, detectedFace: DetectedFace) throws -> Int32

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.

Returns

> `Int`
> The estimated quality of the detected face. Range is [0:100].

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FaceEncoder_ComputeQuality (
        ID3_FACE_ENCODER hFaceEncoder,
        ID3_FACE_IMAGE hImage,
        ID3_DETECTED_FACE hDetectedFace,
        int * quality)

Parameters

> `hFaceEncoder` ID3_FACE_ENCODER
> in Handle to the FaceEncoder object.
> `hImage` ID3_FACE_IMAGE
> in Source image to process.
> `hDetectedFace` ID3_DETECTED_FACE
> in Detected face to process.
> `quality` int *
> out The estimated quality of the detected face. Range is [0:100].

Returns

> `int`
> An error code.
> See id3FaceError file for the list of possible error codes.