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

# FaceAnalyser.computeAttributes Method

Module: FaceAnalyser

## Definition

Computes the attributes of a detected face.

Important

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

Python

    compute_attributes(self, image: Image, detected_face: DetectedFace) -> FaceAttributes

Parameters

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

Returns

> FaceAttributes
> The estimated attributes of the detected face.

Exceptions

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

Dart

    FaceAttributes computeAttributes(Image image, DetectedFace detectedFace)

Parameters

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

Returns

> FaceAttributes
> The estimated attributes of the detected face.

Exceptions

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

C#

    public FaceAttributes ComputeAttributes(Image image, DetectedFace detectedFace)

Parameters

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

Returns

> FaceAttributes
> The estimated attributes of the detected face.

Exceptions

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

Java

    public FaceAttributes computeAttributes(Image image, DetectedFace detectedFace) throws FaceException

Parameters

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

Returns

> FaceAttributes
> The estimated attributes of the detected face.

Exceptions

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

Swift

    public func computeAttributes(image: Image, detectedFace: DetectedFace) throws -> FaceAttributes

Parameters

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

Returns

> FaceAttributes
> The estimated attributes of the detected face.

Exceptions

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

C

    int id3FaceAnalyser_ComputeAttributes (
        ID3_FACE_ANALYSER hFaceAnalyser,
        ID3_FACE_IMAGE hImage,
        ID3_DETECTED_FACE hDetectedFace,
        id3FaceAttributes * sAttributes)

Parameters

> `hFaceAnalyser` ID3_FACE_ANALYSER
> in Handle to the FaceAnalyser object.
> `hImage` ID3_FACE_IMAGE
> in Source image to process.
> `hDetectedFace` ID3_DETECTED_FACE
> in Detected face to process.
> `sAttributes` id3FaceAttributes *
> out The estimated attributes of the detected face.

Returns

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