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

# FaceAnalyser.detectOcclusions Method

Module: FaceAnalyser

## Definition

Detects occlusions on the subject’s face.

Important

This function requires the `FaceOcclusionDetector` model to be loaded.

Python

    detect_occlusions(self, image: Image, detected_face: DetectedFace) -> FaceOcclusionScores

Parameters

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

Returns

> FaceOcclusionScores
> The occlusion scores of the detected face.

Exceptions

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

Dart

    FaceOcclusionScores detectOcclusions(Image image, DetectedFace detectedFace)

Parameters

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

Returns

> FaceOcclusionScores
> The occlusion scores of the detected face.

Exceptions

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

C#

    public FaceOcclusionScores DetectOcclusions(Image image, DetectedFace detectedFace)

Parameters

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

Returns

> FaceOcclusionScores
> The occlusion scores of the detected face.

Exceptions

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

Java

    public FaceOcclusionScores detectOcclusions(Image image, DetectedFace detectedFace) throws FaceException

Parameters

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

Returns

> FaceOcclusionScores
> The occlusion scores of the detected face.

Exceptions

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

Swift

    public func detectOcclusions(image: Image, detectedFace: DetectedFace) throws -> FaceOcclusionScores

Parameters

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

Returns

> FaceOcclusionScores
> The occlusion scores of the detected face.

Exceptions

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

C

    int id3FaceAnalyser_DetectOcclusions (
        ID3_FACE_ANALYSER hFaceAnalyser,
        ID3_FACE_IMAGE hImage,
        ID3_DETECTED_FACE hDetectedFace,
        id3FaceOcclusionScores * sScores)

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.
> `sScores` id3FaceOcclusionScores *
> out The occlusion scores of the detected face.

Returns

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