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

# PortraitProcessor.hatThreshold Property

Module: PortraitProcessor

Type: int

## Definition

Threshold for confirming that the person is wearing a hat.

Hint

Default value is 98.

Python

    hat_threshold: int

Exceptions

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

Dart

    int get hatThreshold => getHatThreshold();
    set hatThreshold(int value) => setHatThreshold(value);

Exceptions

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

C#

    public int hatThreshold
    {
        get => GethatThreshold();
        set => SethatThreshold(ref value);
    }

Exceptions

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

Java

    public int getHatThreshold() throws FaceException
    public void setHatThreshold(int hatThreshold) throws FaceException

Exceptions

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

Swift

    public var hatThreshold: Int
        get {
            return Int(try! getHatThreshold())
        }
    }

Exceptions

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

C

    int id3FacePortraitProcessor_GetHatThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int * hatThreshold)
    int id3FacePortraitProcessor_SetHatThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int hatThreshold)

Returns

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