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

# PortraitProcessor.faceDetectionThreshold Property

Module: PortraitProcessor

Type: int

## Definition

Specifies the face detection confidence threshold, in the range is [0;100].

Hint

Default value is 50. Setting a high threshold reduces false detections but may increase the number of undetected faces.

Python

    face_detection_threshold: int

Exceptions

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

Dart

    int get faceDetectionThreshold => getFaceDetectionThreshold();
    set faceDetectionThreshold(int value) => setFaceDetectionThreshold(value);

Exceptions

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

C#

    public int faceDetectionThreshold
    {
        get => GetfaceDetectionThreshold();
        set => SetfaceDetectionThreshold(ref value);
    }

Exceptions

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

Java

    public int getFaceDetectionThreshold() throws FaceException
    public void setFaceDetectionThreshold(int faceDetectionThreshold) throws FaceException

Exceptions

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

Swift

    public var faceDetectionThreshold: Int
        get {
            return Int(try! getFaceDetectionThreshold())
        }
    }

Exceptions

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

C

    int id3FacePortraitProcessor_GetFaceDetectionThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int * faceDetectionThreshold)
    int id3FacePortraitProcessor_SetFaceDetectionThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int faceDetectionThreshold)

Returns

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