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

# PortraitProcessor.glassesThreshold Property

Module: PortraitProcessor

Type: int

## Definition

Glasses detection threshold.

If the score is above this value, the person is probably wearing glasses.

Hint

Default value 90.

Python

    glasses_threshold: int

Exceptions

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

Dart

    int get glassesThreshold => getGlassesThreshold();
    set glassesThreshold(int value) => setGlassesThreshold(value);

Exceptions

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

C#

    public int glassesThreshold
    {
        get => GetglassesThreshold();
        set => SetglassesThreshold(ref value);
    }

Exceptions

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

Java

    public int getGlassesThreshold() throws FaceException
    public void setGlassesThreshold(int glassesThreshold) throws FaceException

Exceptions

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

Swift

    public var glassesThreshold: Int
        get {
            return Int(try! getGlassesThreshold())
        }
    }

Exceptions

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

C

    int id3FacePortraitProcessor_GetGlassesThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int * glassesThreshold)
    int id3FacePortraitProcessor_SetGlassesThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int glassesThreshold)

Returns

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