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

# PortraitProcessor.smileThreshold Property

Module: PortraitProcessor

Type: int

## Definition

Smile threshold.

If the Smile score is above this value, the detected face is definitely smiling.

Hint

Default value is 75.

Python

    smile_threshold: int

Exceptions

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

Dart

    int get smileThreshold => getSmileThreshold();
    set smileThreshold(int value) => setSmileThreshold(value);

Exceptions

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

C#

    public int smileThreshold
    {
        get => GetsmileThreshold();
        set => SetsmileThreshold(ref value);
    }

Exceptions

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

Java

    public int getSmileThreshold() throws FaceException
    public void setSmileThreshold(int smileThreshold) throws FaceException

Exceptions

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

Swift

    public var smileThreshold: Int
        get {
            return Int(try! getSmileThreshold())
        }
    }

Exceptions

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

C

    int id3FacePortraitProcessor_GetSmileThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int * smileThreshold)
    int id3FacePortraitProcessor_SetSmileThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int smileThreshold)

Returns

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