eu.id3.face

## Class PortraitProcessor

- java.lang.Object
- - eu.id3.face.PortraitProcessor

- All Implemented Interfaces:
    java.io.Serializable, java.lang.AutoCloseable

      public class PortraitProcessor
      extends java.lang.Object
      implements java.lang.AutoCloseable, java.io.Serializable

  Facilitates the creation of portraits in various scenarios such as enrolment or face verification.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PortraitProcessor()` Creates a new instance of the PortraitProcessor class.
    `PortraitProcessor(long handle)` Creates a new instance of the PortraitProcessor class.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Releases all resources used by this PortraitProcessor.
    `Portrait` | `createPortrait(Image image)` Analyses an image and creates a portrait with the first detected face or the currently tracked face if the update parameter is activated.
    `Image` | `cropIcaoPortrait(Portrait portrait)` Creates an ICAO-compliant portrait image by cropping the source image around the detected face.
    `Image` | `cropPortrait(Portrait portrait)` Creates a portrait image by cropping the source image around the detected face.
    `void` | `detectOcclusions(Portrait portrait)` Detects occlusions on the subject's face.
    `void` | `detectPresentationAttack(Portrait portrait)` Detects a possible presentation attack.
    `void` | `estimateAge(Portrait portrait)` Estimates the age of the person.
    `void` | `estimateBackgroundUniformity(Portrait portrait)` Checks the background uniformity of the specified portrait.
    `void` | `estimateExpression(Portrait portrait)` Estimates the subject's expression on the specified portrait.
    `void` | `estimateFaceAttributes(Portrait portrait)` Estimates the face attributes of the specified portrait.
    `void` | `estimateGeometryQuality(Portrait portrait)` Estimates the geometric quality of the specified portrait according to the ICAO portrait parameters.
    `void` | `estimatePhotographicQuality(Portrait portrait)` Etimates the photographic quality of the specified portrait.
    `protected void` | `finalize()` Finalizer for this class.
    `int` | `getBackgroundColorUniformityThreshold()` Gets the background color uniformity threshold.
    `int` | `getBackgroundStructureUniformityThreshold()` Gets the background structure uniformity threshold.
    `float` | `getCropAspectRatio()` Gets the aspect ratio (height to width) of the cropped portrait image.
    `float` | `getCropEyePositionRatio()` Gets the ratio between the vertical eye position and the image height for ICAO portrait cropping.
    `float` | `getCropIodRatio()` Gets the ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping.
    `float` | `getCropMargin()` Gets the relative margin around the face for basic portrait cropping.
    `int` | `getDynamicRangeThreshold()` Gets the face dynamic range threshold.
    `int` | `getEqualBrightnessThreshold()` Gets the equal brightness threshold.
    `int` | `getExpressionSensibility()` Gets the sensibility of the expression classifier.
    `int` | `getEyeOcclusionThreshold()` Gets the visible eye threshold.
    `int` | `getEyeOpeningThreshold()` Gets the eye opening threshold.
    `int` | `getFaceDetectionImageSize()` Gets the the size, in pixels, of the downscaled image used for face detection.
    `FaceModel` | `getFaceDetectionModel()` Gets the specifies the model used to detect and track faces.
    `int` | `getFaceDetectionThreshold()` Gets the specifies the face detection confidence threshold, in the range is [0;100].
    `FaceModel` | `getFaceEncodingModel()` Gets the model used to create features and assess consistancy among views of a given face.
    `int` | `getFaceMaskThreshold()` Gets the face mask detection threshold.
    `int` | `getGlassesThreshold()` Gets the glasses detection threshold.
    `long` | `getHandle()` Gets the native handle.
    `int` | `getHatThreshold()` Gets the threshold for confirming that the person is wearing a hat.
    `int` | `getMakeupThreshold()` Gets the make-up detection threshold.
    `int` | `getMaleThreshold()` Gets the male gender detection threshold.
    `int` | `getMaximumEyeGazeX()` Gets the maximum value of the eye gaze alongside the X axis.
    `int` | `getMaximumEyeGazeY()` Gets the maximum value of the eye gaze alongside the Y axis.
    `int` | `getMaximumHeadHeightRatio()` Gets the maximum distance between the base of the chin and the crown is less than 80% of the total height of the image.
    `int` | `getMaximumHeadWidthRatio()` Gets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5.
    `int` | `getMaximumHorizontalPosition()` Gets the value indicating if the head is correctly centered horizontally.
    `int` | `getMaximumIod()` Gets the maximum interocular distance (IOD), in pixels.
    `float` | `getMaximumPitchAngle()` Gets the maximum head pitch angle, in degrees, for frontal positioning.
    `float` | `getMaximumRollAngle()` Gets the maximum head roll angle, in degrees, for frontal positioning.
    `int` | `getMaximumVerticalPosition()` Gets the maximum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.
    `float` | `getMaximumYawAngle()` Gets the maximum head yaw angle, in degrees, for frontal positioning.
    `int` | `getMinimumHeadHeightRatio()` Gets the minimum distance between the base of the chin and the crown is less than 80% of the total height of the image.
    `int` | `getMinimumHeadWidthRatio()` Gets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5.
    `int` | `getMinimumHorizontalPosition()` Gets the value indicating if the head is correctly centered horizontally.
    `int` | `getMinimumIod()` Gets the minimum intra-occular distance, in pixels.
    `int` | `getMinimumVerticalPosition()` Gets the minimum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.
    `int` | `getMouthOcclusionThreshold()` Gets the mouth occlusion threshold.
    `int` | `getMouthOpenThreshold()` Gets the mouth opening threshold.
    `int` | `getNaturalSkinColorThreshold()` Gets the natural skin color threshold.
    `int` | `getNoFlashReflectionThreshold()` Gets the flash reflexion detection threshold.
    `int` | `getNoiseThreshold()` Gets the threshold for confirming the presence of noise in the image.
    `int` | `getNoseOcclusionThreshold()` Gets the nose occlusion threshold.
    `int` | `getOverExposureThreshold()` Gets the over exposure threshold.
    `int` | `getPadThreshold()` Gets the presentation attack detection threshold, from 0 to 100.
    `int` | `getPixelationThreshold()` Gets the pixelation detection threshold.
    `int` | `getRedEyeThreshold()` Gets the threshold for confirming the presence of red eyes.
    `int` | `getResolutionThreshold()` Gets the threshold indicating whether the image resolution is sufficient.
    `int` | `getSharpnessThreshold()` Gets the sharpness threshold.
    `int` | `getSmileThreshold()` Gets the smile threshold.
    `int` | `getThreadCount()` Gets the number of threads to be used for portrait processing.
    `int` | `getTintedGlassThreshold()` Gets the tinted glass detection threshold.
    `int` | `getTrackerMatchingThreshold()` Gets the minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'.
    `int` | `getTrackerMaximumFaceAge()` Gets the maximum number of consecutive non-detections to be reached before deleting a tracked face.
    `int` | `getTrackerMinimumFaceAge()` Gets the minimum number of consecutive detections to reach before creating a tracked face.
    `int` | `getTrackerNmsIouThreshold()` Gets the non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range [0;100].
    `int` | `getUnderExposureThreshold()` Gets the under exposure threshold.
    `void` | `removeBackground(Image image, int red, int green, int blue)` Removes the background on the specified portrait image.
    `void` | `reset()` Resets the face tracker.
    `void` | `setBackgroundColorUniformityThreshold(int backgroundColorUniformityThreshold)` Sets the background color uniformity threshold.
    `void` | `setBackgroundStructureUniformityThreshold(int backgroundStructureUniformityThreshold)` Sets the background structure uniformity threshold.
    `void` | `setCropAspectRatio(float cropAspectRatio)` Sets the aspect ratio (height to width) of the cropped portrait image.
    `void` | `setCropEyePositionRatio(float cropEyePositionRatio)` Sets the ratio between the vertical eye position and the image height for ICAO portrait cropping.
    `void` | `setCropIodRatio(float cropIodRatio)` Sets the ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping.
    `void` | `setCropMargin(float cropMargin)` Sets the relative margin around the face for basic portrait cropping.
    `void` | `setDynamicRangeThreshold(int dynamicRangeThreshold)` Sets the face dynamic range threshold.
    `void` | `setEqualBrightnessThreshold(int equalBrightnessThreshold)` Sets the equal brightness threshold.
    `void` | `setExpressionSensibility(int expressionSensibility)` Sets the sensibility of the expression classifier.
    `void` | `setEyeOcclusionThreshold(int eyeOcclusionThreshold)` Sets the visible eye threshold.
    `void` | `setEyeOpeningThreshold(int eyeOpeningThreshold)` Sets the eye opening threshold.
    `void` | `setFaceDetectionImageSize(int faceDetectionImageSize)` Sets the the size, in pixels, of the downscaled image used for face detection.
    `void` | `setFaceDetectionModel(FaceModel faceDetectionModel)` Sets the specifies the model used to detect and track faces.
    `void` | `setFaceDetectionThreshold(int faceDetectionThreshold)` Sets the specifies the face detection confidence threshold, in the range is [0;100].
    `void` | `setFaceEncodingModel(FaceModel faceEncodingModel)` Sets the model used to create features and assess consistancy among views of a given face.
    `void` | `setFaceMaskThreshold(int faceMaskThreshold)` Sets the face mask detection threshold.
    `void` | `setGlassesThreshold(int glassesThreshold)` Sets the glasses detection threshold.
    `void` | `setHatThreshold(int hatThreshold)` Sets the threshold for confirming that the person is wearing a hat.
    `void` | `setMakeupThreshold(int makeupThreshold)` Sets the make-up detection threshold.
    `void` | `setMaleThreshold(int maleThreshold)` Sets the male gender detection threshold.
    `void` | `setMaximumEyeGazeX(int maximumEyeGazeX)` Sets the maximum value of the eye gaze alongside the X axis.
    `void` | `setMaximumEyeGazeY(int maximumEyeGazeY)` Sets the maximum value of the eye gaze alongside the Y axis.
    `void` | `setMaximumHeadHeightRatio(int maximumHeadHeightRatio)` Sets the maximum distance between the base of the chin and the crown is less than 80% of the total height of the image.
    `void` | `setMaximumHeadWidthRatio(int maximumHeadWidthRatio)` Sets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5.
    `void` | `setMaximumHorizontalPosition(int maximumHorizontalPosition)` Sets the value indicating if the head is correctly centered horizontally.
    `void` | `setMaximumIod(int maximumIod)` Sets the maximum interocular distance (IOD), in pixels.
    `void` | `setMaximumPitchAngle(float maximumPitchAngle)` Sets the maximum head pitch angle, in degrees, for frontal positioning.
    `void` | `setMaximumRollAngle(float maximumRollAngle)` Sets the maximum head roll angle, in degrees, for frontal positioning.
    `void` | `setMaximumVerticalPosition(int maximumVerticalPosition)` Sets the maximum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.
    `void` | `setMaximumYawAngle(float maximumYawAngle)` Sets the maximum head yaw angle, in degrees, for frontal positioning.
    `void` | `setMinimumHeadHeightRatio(int minimumHeadHeightRatio)` Sets the minimum distance between the base of the chin and the crown is less than 80% of the total height of the image.
    `void` | `setMinimumHeadWidthRatio(int minimumHeadWidthRatio)` Sets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5.
    `void` | `setMinimumHorizontalPosition(int minimumHorizontalPosition)` Sets the value indicating if the head is correctly centered horizontally.
    `void` | `setMinimumIod(int minimumIod)` Sets the minimum intra-occular distance, in pixels.
    `void` | `setMinimumVerticalPosition(int minimumVerticalPosition)` Sets the minimum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.
    `void` | `setMouthOcclusionThreshold(int mouthOcclusionThreshold)` Sets the mouth occlusion threshold.
    `void` | `setMouthOpenThreshold(int mouthOpenThreshold)` Sets the mouth opening threshold.
    `void` | `setNaturalSkinColorThreshold(int naturalSkinColorThreshold)` Sets the natural skin color threshold.
    `void` | `setNoFlashReflectionThreshold(int noFlashReflectionThreshold)` Sets the flash reflexion detection threshold.
    `void` | `setNoiseThreshold(int noiseThreshold)` Sets the threshold for confirming the presence of noise in the image.
    `void` | `setNoseOcclusionThreshold(int noseOcclusionThreshold)` Sets the nose occlusion threshold.
    `void` | `setOverExposureThreshold(int overExposureThreshold)` Sets the over exposure threshold.
    `void` | `setPadThreshold(int padThreshold)` Sets the presentation attack detection threshold, from 0 to 100.
    `void` | `setPixelationThreshold(int pixelationThreshold)` Sets the pixelation detection threshold.
    `void` | `setRedEyeThreshold(int redEyeThreshold)` Sets the threshold for confirming the presence of red eyes.
    `void` | `setResolutionThreshold(int resolutionThreshold)` Sets the threshold indicating whether the image resolution is sufficient.
    `void` | `setSharpnessThreshold(int sharpnessThreshold)` Sets the sharpness threshold.
    `void` | `setSmileThreshold(int smileThreshold)` Sets the smile threshold.
    `void` | `setThreadCount(int threadCount)` Sets the number of threads to be used for portrait processing.
    `void` | `setTintedGlassThreshold(int tintedGlassThreshold)` Sets the tinted glass detection threshold.
    `void` | `setTrackerMatchingThreshold(int trackerMatchingThreshold)` Sets the minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'.
    `void` | `setTrackerMaximumFaceAge(int trackerMaximumFaceAge)` Sets the maximum number of consecutive non-detections to be reached before deleting a tracked face.
    `void` | `setTrackerMinimumFaceAge(int trackerMinimumFaceAge)` Sets the minimum number of consecutive detections to reach before creating a tracked face.
    `void` | `setTrackerNmsIouThreshold(int trackerNmsIouThreshold)` Sets the non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range [0;100].
    `void` | `setUnderExposureThreshold(int underExposureThreshold)` Sets the under exposure threshold.
    `void` | `updatePortrait(Portrait portrait, Image image)` Analyses an image and updates the specified portrait with the first detected face or the currently tracked face.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PortraitProcessor

          public PortraitProcessor()
                            throws FaceException

      Creates a new instance of the PortraitProcessor class.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### PortraitProcessor

          public PortraitProcessor(long handle)
                            throws FaceException

      Creates a new instance of the PortraitProcessor class.
      Parameters:
        `handle` - Handle to the PortraitProcessor.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

  - ### Method Detail

    - #### close

          public void close()

      Releases all resources used by this PortraitProcessor.
      Specified by:
        `close` in interface `java.lang.AutoCloseable`

    - #### finalize

          protected void finalize()

      Finalizer for this class. Finalizers are deprecated since Java 9+. This method is not guaranteed to be called. To release all memory held by this class please be sure to call the close() method.
      Overrides:
        `finalize` in class `java.lang.Object`

    - #### getHandle

          public long getHandle()

      Gets the native handle.
      Returns:
        The native handle.

    - #### getBackgroundColorUniformityThreshold

          public int getBackgroundColorUniformityThreshold()
                                                    throws FaceException

      Gets the background color uniformity threshold. If the score is above this value, the background color of the image is definitely uniform. Hint: Default value is 80.
      Returns:
        Background color uniformity threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setBackgroundColorUniformityThreshold

          public void setBackgroundColorUniformityThreshold(int backgroundColorUniformityThreshold)
                                                     throws FaceException

      Sets the background color uniformity threshold. If the score is above this value, the background color of the image is definitely uniform. Hint: Default value is 80.
      Parameters:
        `backgroundColorUniformityThreshold` - Background color uniformity threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getBackgroundStructureUniformityThreshold

          public int getBackgroundStructureUniformityThreshold()
                                                        throws FaceException

      Gets the background structure uniformity threshold. If the score is above this value, the background structure of the image is definitely uniform. Hint: Default value is 80.
      Returns:
        Background structure uniformity threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setBackgroundStructureUniformityThreshold

          public void setBackgroundStructureUniformityThreshold(int backgroundStructureUniformityThreshold)
                                                         throws FaceException

      Sets the background structure uniformity threshold. If the score is above this value, the background structure of the image is definitely uniform. Hint: Default value is 80.
      Parameters:
        `backgroundStructureUniformityThreshold` - Background structure uniformity threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getCropAspectRatio

          public float getCropAspectRatio()
                                   throws FaceException

      Gets the aspect ratio (height to width) of the cropped portrait image. Hint: Default value is 4/3.
      Returns:
        Aspect ratio (height to width) of the cropped portrait image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setCropAspectRatio

          public void setCropAspectRatio(float cropAspectRatio)
                                  throws FaceException

      Sets the aspect ratio (height to width) of the cropped portrait image. Hint: Default value is 4/3.
      Parameters:
        `cropAspectRatio` - Aspect ratio (height to width) of the cropped portrait image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getCropEyePositionRatio

          public float getCropEyePositionRatio()
                                        throws FaceException

      Gets the ratio between the vertical eye position and the image height for ICAO portrait cropping. Must be in the range ]0;1[. Hint: Default value is 0.45.
      Returns:
        Ratio between the vertical eye position and the image height for ICAO portrait cropping. Must be in the range ]0;1[.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setCropEyePositionRatio

          public void setCropEyePositionRatio(float cropEyePositionRatio)
                                       throws FaceException

      Sets the ratio between the vertical eye position and the image height for ICAO portrait cropping. Must be in the range ]0;1[. Hint: Default value is 0.45.
      Parameters:
        `cropEyePositionRatio` - Ratio between the vertical eye position and the image height for ICAO portrait cropping. Must be in the range ]0;1[.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getCropIodRatio

          public float getCropIodRatio()
                                throws FaceException

      Gets the ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range ]0;1[. Hint: Default value is 0.25.
      Returns:
        Ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range ]0;1[.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setCropIodRatio

          public void setCropIodRatio(float cropIodRatio)
                               throws FaceException

      Sets the ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range ]0;1[. Hint: Default value is 0.25.
      Parameters:
        `cropIodRatio` - Ratio between the interocular distance (IOD) and the image width for ICAO portrait cropping. Must be in the range ]0;1[.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getCropMargin

          public float getCropMargin()
                              throws FaceException

      Gets the relative margin around the face for basic portrait cropping. Hint: Default value is 0.5.
      Returns:
        Relative margin around the face for basic portrait cropping.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setCropMargin

          public void setCropMargin(float cropMargin)
                             throws FaceException

      Sets the relative margin around the face for basic portrait cropping. Hint: Default value is 0.5.
      Parameters:
        `cropMargin` - Relative margin around the face for basic portrait cropping.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getDynamicRangeThreshold

          public int getDynamicRangeThreshold()
                                       throws FaceException

      Gets the face dynamic range threshold. Above this threshold, the dynamic range of the image in the face region is good enough. Hint: Default value is 128.
      Returns:
        Face dynamic range threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setDynamicRangeThreshold

          public void setDynamicRangeThreshold(int dynamicRangeThreshold)
                                        throws FaceException

      Sets the face dynamic range threshold. Above this threshold, the dynamic range of the image in the face region is good enough. Hint: Default value is 128.
      Parameters:
        `dynamicRangeThreshold` - Face dynamic range threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getEqualBrightnessThreshold

          public int getEqualBrightnessThreshold()
                                          throws FaceException

      Gets the equal brightness threshold. Above this value, the face is equally exposed. Hint: Default value is 10.
      Returns:
        Equal brightness threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setEqualBrightnessThreshold

          public void setEqualBrightnessThreshold(int equalBrightnessThreshold)
                                           throws FaceException

      Sets the equal brightness threshold. Above this value, the face is equally exposed. Hint: Default value is 10.
      Parameters:
        `equalBrightnessThreshold` - Equal brightness threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getExpressionSensibility

          public int getExpressionSensibility()
                                       throws FaceException

      Gets the sensibility of the expression classifier. The higher the value, the more sensitive the algorithm will be, meaning that it will be less likely to estimate neutral expression out of the detected face. Hint: Default value is 60.
      Returns:
        Sensibility of the expression classifier.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setExpressionSensibility

          public void setExpressionSensibility(int expressionSensibility)
                                        throws FaceException

      Sets the sensibility of the expression classifier. The higher the value, the more sensitive the algorithm will be, meaning that it will be less likely to estimate neutral expression out of the detected face. Hint: Default value is 60.
      Parameters:
        `expressionSensibility` - Sensibility of the expression classifier.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getEyeOcclusionThreshold

          public int getEyeOcclusionThreshold()
                                       throws FaceException

      Gets the visible eye threshold. If the score is above this value, the eye is probably occluded. Hint: Default value 80.
      Returns:
        Visible eye threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setEyeOcclusionThreshold

          public void setEyeOcclusionThreshold(int eyeOcclusionThreshold)
                                        throws FaceException

      Sets the visible eye threshold. If the score is above this value, the eye is probably occluded. Hint: Default value 80.
      Parameters:
        `eyeOcclusionThreshold` - Visible eye threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getEyeOpeningThreshold

          public int getEyeOpeningThreshold()
                                     throws FaceException

      Gets the eye opening threshold. If the score is above this value, the eyes are definitely open. Hint: Default value is 5.
      Returns:
        Eye opening threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setEyeOpeningThreshold

          public void setEyeOpeningThreshold(int eyeOpeningThreshold)
                                      throws FaceException

      Sets the eye opening threshold. If the score is above this value, the eyes are definitely open. Hint: Default value is 5.
      Parameters:
        `eyeOpeningThreshold` - Eye opening threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getFaceDetectionImageSize

          public int getFaceDetectionImageSize()
                                        throws FaceException

      Gets the the size, in pixels, of the downscaled image used for face detection. Hint: Default value is 256. Low values tend to ignore small faces in the input image, while higher values tend to take longer to process.
      Returns:
        The size, in pixels, of the downscaled image used for face detection.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setFaceDetectionImageSize

          public void setFaceDetectionImageSize(int faceDetectionImageSize)
                                         throws FaceException

      Sets the the size, in pixels, of the downscaled image used for face detection. Hint: Default value is 256. Low values tend to ignore small faces in the input image, while higher values tend to take longer to process.
      Parameters:
        `faceDetectionImageSize` - The size, in pixels, of the downscaled image used for face detection.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getFaceDetectionModel

          public FaceModel getFaceDetectionModel()
                                          throws FaceException

      Gets the specifies the model used to detect and track faces. Hint: Default value is ``FaceDetector4B``. Some better accuracy/speed balances can be found by choosing another model.
      Returns:
        Specifies the model used to detect and track faces.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setFaceDetectionModel

          public void setFaceDetectionModel(FaceModel faceDetectionModel)
                                     throws FaceException

      Sets the specifies the model used to detect and track faces. Hint: Default value is ``FaceDetector4B``. Some better accuracy/speed balances can be found by choosing another model.
      Parameters:
        `faceDetectionModel` - Specifies the model used to detect and track faces.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getFaceDetectionThreshold

          public int getFaceDetectionThreshold()
                                        throws FaceException

      Gets the 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.
      Returns:
        Specifies the face detection confidence threshold, in the range is [0;100].
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setFaceDetectionThreshold

          public void setFaceDetectionThreshold(int faceDetectionThreshold)
                                         throws FaceException

      Sets the 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.
      Parameters:
        `faceDetectionThreshold` - Specifies the face detection confidence threshold, in the range is [0;100].
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getFaceEncodingModel

          public FaceModel getFaceEncodingModel()
                                         throws FaceException

      Gets the model used to create features and assess consistancy among views of a given face. Hint: Default value is ``FaceEncoder9B``. Some better accuracy/speed balances can be found by choosing another model.
      Returns:
        Model used to create features and assess consistancy among views of a given face.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setFaceEncodingModel

          public void setFaceEncodingModel(FaceModel faceEncodingModel)
                                    throws FaceException

      Sets the model used to create features and assess consistancy among views of a given face. Hint: Default value is ``FaceEncoder9B``. Some better accuracy/speed balances can be found by choosing another model.
      Parameters:
        `faceEncodingModel` - Model used to create features and assess consistancy among views of a given face.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getFaceMaskThreshold

          public int getFaceMaskThreshold()
                                   throws FaceException

      Gets the face mask detection threshold. If the detection score is above this value, the person is probably wearing a mask. Hint: Default value is 35.
      Returns:
        Face mask detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setFaceMaskThreshold

          public void setFaceMaskThreshold(int faceMaskThreshold)
                                    throws FaceException

      Sets the face mask detection threshold. If the detection score is above this value, the person is probably wearing a mask. Hint: Default value is 35.
      Parameters:
        `faceMaskThreshold` - Face mask detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getGlassesThreshold

          public int getGlassesThreshold()
                                  throws FaceException

      Gets the glasses detection threshold. If the score is above this value, the person is probably wearing glasses. Hint: Default value 90.
      Returns:
        Glasses detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setGlassesThreshold

          public void setGlassesThreshold(int glassesThreshold)
                                   throws FaceException

      Sets the glasses detection threshold. If the score is above this value, the person is probably wearing glasses. Hint: Default value 90.
      Parameters:
        `glassesThreshold` - Glasses detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getHatThreshold

          public int getHatThreshold()
                              throws FaceException

      Gets the threshold for confirming that the person is wearing a hat. Hint: Default value is 98.
      Returns:
        Threshold for confirming that the person is wearing a hat.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setHatThreshold

          public void setHatThreshold(int hatThreshold)
                               throws FaceException

      Sets the threshold for confirming that the person is wearing a hat. Hint: Default value is 98.
      Parameters:
        `hatThreshold` - Threshold for confirming that the person is wearing a hat.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMakeupThreshold

          public int getMakeupThreshold()
                                 throws FaceException

      Gets the make-up detection threshold. If the detection score is above this value, the persone is definitely wearing make-up. Hint: Default value 50.
      Returns:
        Make-up detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMakeupThreshold

          public void setMakeupThreshold(int makeupThreshold)
                                  throws FaceException

      Sets the make-up detection threshold. If the detection score is above this value, the persone is definitely wearing make-up. Hint: Default value 50.
      Parameters:
        `makeupThreshold` - Make-up detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaleThreshold

          public int getMaleThreshold()
                               throws FaceException

      Gets the male gender detection threshold. If the score is higher than this value, the person is probably male. Hint: Default value is 50.
      Returns:
        Male gender detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaleThreshold

          public void setMaleThreshold(int maleThreshold)
                                throws FaceException

      Sets the male gender detection threshold. If the score is higher than this value, the person is probably male. Hint: Default value is 50.
      Parameters:
        `maleThreshold` - Male gender detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumEyeGazeX

          public int getMaximumEyeGazeX()
                                 throws FaceException

      Gets the maximum value of the eye gaze alongside the X axis. Hint: Default value is 10.
      Returns:
        Maximum value of the eye gaze alongside the X axis.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumEyeGazeX

          public void setMaximumEyeGazeX(int maximumEyeGazeX)
                                  throws FaceException

      Sets the maximum value of the eye gaze alongside the X axis. Hint: Default value is 10.
      Parameters:
        `maximumEyeGazeX` - Maximum value of the eye gaze alongside the X axis.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumEyeGazeY

          public int getMaximumEyeGazeY()
                                 throws FaceException

      Gets the maximum value of the eye gaze alongside the Y axis. Hint: Default value is 10.
      Returns:
        Maximum value of the eye gaze alongside the Y axis.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumEyeGazeY

          public void setMaximumEyeGazeY(int maximumEyeGazeY)
                                  throws FaceException

      Sets the maximum value of the eye gaze alongside the Y axis. Hint: Default value is 10.
      Parameters:
        `maximumEyeGazeY` - Maximum value of the eye gaze alongside the Y axis.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumHeadHeightRatio

          public int getMaximumHeadHeightRatio()
                                        throws FaceException

      Gets the maximum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 90.
      Returns:
        Maximum distance between the base of the chin and the crown is less than 80% of the total height of the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumHeadHeightRatio

          public void setMaximumHeadHeightRatio(int maximumHeadHeightRatio)
                                         throws FaceException

      Sets the maximum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 90.
      Parameters:
        `maximumHeadHeightRatio` - Maximum distance between the base of the chin and the crown is less than 80% of the total height of the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumHeadWidthRatio

          public int getMaximumHeadWidthRatio()
                                       throws FaceException

      Gets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 75.
      Returns:
        Value indicating if the image width is conform to the (image width / head width) ratio of 7:5.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumHeadWidthRatio

          public void setMaximumHeadWidthRatio(int maximumHeadWidthRatio)
                                        throws FaceException

      Sets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 75.
      Parameters:
        `maximumHeadWidthRatio` - Value indicating if the image width is conform to the (image width / head width) ratio of 7:5.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumHorizontalPosition

          public int getMaximumHorizontalPosition()
                                           throws FaceException

      Gets the value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 55.
      Returns:
        Value indicating if the head is correctly centered horizontally.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumHorizontalPosition

          public void setMaximumHorizontalPosition(int maximumHorizontalPosition)
                                            throws FaceException

      Sets the value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 55.
      Parameters:
        `maximumHorizontalPosition` - Value indicating if the head is correctly centered horizontally.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumIod

          public int getMaximumIod()
                            throws FaceException

      Gets the maximum interocular distance (IOD), in pixels. This parameter is used to prevent the subject from being too close to the camera. Hint: Default value is 512.
      Returns:
        Maximum interocular distance (IOD), in pixels.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumIod

          public void setMaximumIod(int maximumIod)
                             throws FaceException

      Sets the maximum interocular distance (IOD), in pixels. This parameter is used to prevent the subject from being too close to the camera. Hint: Default value is 512.
      Parameters:
        `maximumIod` - Maximum interocular distance (IOD), in pixels.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumPitchAngle

          public float getMaximumPitchAngle()
                                     throws FaceException

      Gets the maximum head pitch angle, in degrees, for frontal positioning. Hint: Default value is 20.
      Returns:
        Maximum head pitch angle, in degrees, for frontal positioning.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumPitchAngle

          public void setMaximumPitchAngle(float maximumPitchAngle)
                                    throws FaceException

      Sets the maximum head pitch angle, in degrees, for frontal positioning. Hint: Default value is 20.
      Parameters:
        `maximumPitchAngle` - Maximum head pitch angle, in degrees, for frontal positioning.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumRollAngle

          public float getMaximumRollAngle()
                                    throws FaceException

      Gets the maximum head roll angle, in degrees, for frontal positioning. Hint: Default value is 15.
      Returns:
        Maximum head roll angle, in degrees, for frontal positioning.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumRollAngle

          public void setMaximumRollAngle(float maximumRollAngle)
                                   throws FaceException

      Sets the maximum head roll angle, in degrees, for frontal positioning. Hint: Default value is 15.
      Parameters:
        `maximumRollAngle` - Maximum head roll angle, in degrees, for frontal positioning.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumVerticalPosition

          public int getMaximumVerticalPosition()
                                         throws FaceException

      Gets the maximum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 50.
      Returns:
        Maximum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumVerticalPosition

          public void setMaximumVerticalPosition(int maximumVerticalPosition)
                                          throws FaceException

      Sets the maximum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 50.
      Parameters:
        `maximumVerticalPosition` - Maximum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMaximumYawAngle

          public float getMaximumYawAngle()
                                   throws FaceException

      Gets the maximum head yaw angle, in degrees, for frontal positioning. Hint: Default value is 8.
      Returns:
        Maximum head yaw angle, in degrees, for frontal positioning.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMaximumYawAngle

          public void setMaximumYawAngle(float maximumYawAngle)
                                  throws FaceException

      Sets the maximum head yaw angle, in degrees, for frontal positioning. Hint: Default value is 8.
      Parameters:
        `maximumYawAngle` - Maximum head yaw angle, in degrees, for frontal positioning.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMinimumHeadHeightRatio

          public int getMinimumHeadHeightRatio()
                                        throws FaceException

      Gets the minimum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 60.
      Returns:
        Minimum distance between the base of the chin and the crown is less than 80% of the total height of the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMinimumHeadHeightRatio

          public void setMinimumHeadHeightRatio(int minimumHeadHeightRatio)
                                         throws FaceException

      Sets the minimum distance between the base of the chin and the crown is less than 80% of the total height of the image. For ICAO compliance, this distance must be in the range 60 to 90. Hint: Default value is 60.
      Parameters:
        `minimumHeadHeightRatio` - Minimum distance between the base of the chin and the crown is less than 80% of the total height of the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMinimumHeadWidthRatio

          public int getMinimumHeadWidthRatio()
                                       throws FaceException

      Gets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 50.
      Returns:
        Value indicating if the image width is conform to the (image width / head width) ratio of 7:5.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMinimumHeadWidthRatio

          public void setMinimumHeadWidthRatio(int minimumHeadWidthRatio)
                                        throws FaceException

      Sets the value indicating if the image width is conform to the (image width / head width) ratio of 7:5. The head width is defined as the distance between the left and right ears. For ICAO compliance, the value must be in the range 50 to 75. Hint: Default value is 50.
      Parameters:
        `minimumHeadWidthRatio` - Value indicating if the image width is conform to the (image width / head width) ratio of 7:5.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMinimumHorizontalPosition

          public int getMinimumHorizontalPosition()
                                           throws FaceException

      Gets the value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 45.
      Returns:
        Value indicating if the head is correctly centered horizontally.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMinimumHorizontalPosition

          public void setMinimumHorizontalPosition(int minimumHorizontalPosition)
                                            throws FaceException

      Sets the value indicating if the head is correctly centered horizontally. For ICAO compliance, the value must be in the range 45 to 55. Hint: Default value is 45.
      Parameters:
        `minimumHorizontalPosition` - Value indicating if the head is correctly centered horizontally.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMinimumIod

          public int getMinimumIod()
                            throws FaceException

      Gets the minimum intra-occular distance, in pixels. This parameter is used to the limit the distance from the subject to the camera. Hint: Default value is 0.
      Returns:
        Minimum intra-occular distance, in pixels.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMinimumIod

          public void setMinimumIod(int minimumIod)
                             throws FaceException

      Sets the minimum intra-occular distance, in pixels. This parameter is used to the limit the distance from the subject to the camera. Hint: Default value is 0.
      Parameters:
        `minimumIod` - Minimum intra-occular distance, in pixels.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMinimumVerticalPosition

          public int getMinimumVerticalPosition()
                                         throws FaceException

      Gets the minimum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 30.
      Returns:
        Minimum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMinimumVerticalPosition

          public void setMinimumVerticalPosition(int minimumVerticalPosition)
                                          throws FaceException

      Sets the minimum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image. For ICAO compliance, the value must be in the range 30 to 50. Hint: Default value is 30.
      Parameters:
        `minimumVerticalPosition` - Minimum distance from the bottom edge of the image to the imaginary line passing through the center of the eyes is between 50% - 70% of the total vertical length of the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMouthOcclusionThreshold

          public int getMouthOcclusionThreshold()
                                         throws FaceException

      Gets the mouth occlusion threshold. If the mouth occlusion score is above this value, the mouth is probably occluded. Hint: Default value 70.
      Returns:
        Mouth occlusion threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMouthOcclusionThreshold

          public void setMouthOcclusionThreshold(int mouthOcclusionThreshold)
                                          throws FaceException

      Sets the mouth occlusion threshold. If the mouth occlusion score is above this value, the mouth is probably occluded. Hint: Default value 70.
      Parameters:
        `mouthOcclusionThreshold` - Mouth occlusion threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getMouthOpenThreshold

          public int getMouthOpenThreshold()
                                    throws FaceException

      Gets the mouth opening threshold. If the mouth opening score is above this value, the mouth of detected face is definitely open. Hint: Default value is 35.
      Returns:
        Mouth opening threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setMouthOpenThreshold

          public void setMouthOpenThreshold(int mouthOpenThreshold)
                                     throws FaceException

      Sets the mouth opening threshold. If the mouth opening score is above this value, the mouth of detected face is definitely open. Hint: Default value is 35.
      Parameters:
        `mouthOpenThreshold` - Mouth opening threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getNaturalSkinColorThreshold

          public int getNaturalSkinColorThreshold()
                                           throws FaceException

      Gets the natural skin color threshold. Above this threshold, th skin of the person looks natural. Hint: Default value is 5.
      Returns:
        Natural skin color threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setNaturalSkinColorThreshold

          public void setNaturalSkinColorThreshold(int naturalSkinColorThreshold)
                                            throws FaceException

      Sets the natural skin color threshold. Above this threshold, th skin of the person looks natural. Hint: Default value is 5.
      Parameters:
        `naturalSkinColorThreshold` - Natural skin color threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getNoFlashReflectionThreshold

          public int getNoFlashReflectionThreshold()
                                            throws FaceException

      Gets the flash reflexion detection threshold. Above this threshold, the flash reflexion is probably present on the face. Hint: Default value is 70.
      Returns:
        Flash reflexion detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setNoFlashReflectionThreshold

          public void setNoFlashReflectionThreshold(int noFlashReflectionThreshold)
                                             throws FaceException

      Sets the flash reflexion detection threshold. Above this threshold, the flash reflexion is probably present on the face. Hint: Default value is 70.
      Parameters:
        `noFlashReflectionThreshold` - Flash reflexion detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getNoiseThreshold

          public int getNoiseThreshold()
                                throws FaceException

      Gets the threshold for confirming the presence of noise in the image. Hint: Default value is 90.
      Returns:
        Threshold for confirming the presence of noise in the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setNoiseThreshold

          public void setNoiseThreshold(int noiseThreshold)
                                 throws FaceException

      Sets the threshold for confirming the presence of noise in the image. Hint: Default value is 90.
      Parameters:
        `noiseThreshold` - Threshold for confirming the presence of noise in the image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getNoseOcclusionThreshold

          public int getNoseOcclusionThreshold()
                                        throws FaceException

      Gets the nose occlusion threshold. If the score is above this value, the nose is probably occluded. Hint: Default value 50.
      Returns:
        Nose occlusion threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setNoseOcclusionThreshold

          public void setNoseOcclusionThreshold(int noseOcclusionThreshold)
                                         throws FaceException

      Sets the nose occlusion threshold. If the score is above this value, the nose is probably occluded. Hint: Default value 50.
      Parameters:
        `noseOcclusionThreshold` - Nose occlusion threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getOverExposureThreshold

          public int getOverExposureThreshold()
                                       throws FaceException

      Gets the over exposure threshold. Above this threshold, the ratio of face pixels are over-exposed. Hint: Default value is 50.
      Returns:
        Over exposure threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setOverExposureThreshold

          public void setOverExposureThreshold(int overExposureThreshold)
                                        throws FaceException

      Sets the over exposure threshold. Above this threshold, the ratio of face pixels are over-exposed. Hint: Default value is 50.
      Parameters:
        `overExposureThreshold` - Over exposure threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getPadThreshold

          public int getPadThreshold()
                              throws FaceException

      Gets the presentation attack detection threshold, from 0 to 100. Higher values enable more attacks to be detected, but may reduce ease of use. Hint: Default value 95.
      Returns:
        Presentation attack detection threshold, from 0 to 100.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setPadThreshold

          public void setPadThreshold(int padThreshold)
                               throws FaceException

      Sets the presentation attack detection threshold, from 0 to 100. Higher values enable more attacks to be detected, but may reduce ease of use. Hint: Default value 95.
      Parameters:
        `padThreshold` - Presentation attack detection threshold, from 0 to 100.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getPixelationThreshold

          public int getPixelationThreshold()
                                     throws FaceException

      Gets the pixelation detection threshold. Above this threshold, the image is probably pixelated. Hint: Default value is 90.
      Returns:
        Pixelation detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setPixelationThreshold

          public void setPixelationThreshold(int pixelationThreshold)
                                      throws FaceException

      Sets the pixelation detection threshold. Above this threshold, the image is probably pixelated. Hint: Default value is 90.
      Parameters:
        `pixelationThreshold` - Pixelation detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getRedEyeThreshold

          public int getRedEyeThreshold()
                                 throws FaceException

      Gets the threshold for confirming the presence of red eyes. Hint: Default value is 10.
      Returns:
        Threshold for confirming the presence of red eyes.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setRedEyeThreshold

          public void setRedEyeThreshold(int redEyeThreshold)
                                  throws FaceException

      Sets the threshold for confirming the presence of red eyes. Hint: Default value is 10.
      Parameters:
        `redEyeThreshold` - Threshold for confirming the presence of red eyes.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getResolutionThreshold

          public int getResolutionThreshold()
                                     throws FaceException

      Gets the threshold indicating whether the image resolution is sufficient. Hint: Default value is 90.
      Returns:
        Threshold indicating whether the image resolution is sufficient.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setResolutionThreshold

          public void setResolutionThreshold(int resolutionThreshold)
                                      throws FaceException

      Sets the threshold indicating whether the image resolution is sufficient. Hint: Default value is 90.
      Parameters:
        `resolutionThreshold` - Threshold indicating whether the image resolution is sufficient.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getSharpnessThreshold

          public int getSharpnessThreshold()
                                    throws FaceException

      Gets the sharpness threshold. If the sharpness score is above this value, the image sharpness is sufficient. Hint: Default value is 50.
      Returns:
        Sharpness threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setSharpnessThreshold

          public void setSharpnessThreshold(int sharpnessThreshold)
                                     throws FaceException

      Sets the sharpness threshold. If the sharpness score is above this value, the image sharpness is sufficient. Hint: Default value is 50.
      Parameters:
        `sharpnessThreshold` - Sharpness threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getSmileThreshold

          public int getSmileThreshold()
                                throws FaceException

      Gets the smile threshold. If the Smile score is above this value, the detected face is definitely smiling. Hint: Default value is 75.
      Returns:
        Smile threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setSmileThreshold

          public void setSmileThreshold(int smileThreshold)
                                 throws FaceException

      Sets the smile threshold. If the Smile score is above this value, the detected face is definitely smiling. Hint: Default value is 75.
      Parameters:
        `smileThreshold` - Smile threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getThreadCount

          public int getThreadCount()
                             throws FaceException

      Gets the number of threads to be used for portrait processing. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.
      Returns:
        Number of threads to be used for portrait processing.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setThreadCount

          public void setThreadCount(int threadCount)
                              throws FaceException

      Sets the number of threads to be used for portrait processing. Hint: Default value is 1. Allocating more than one thread can increase the speed of the process.
      Parameters:
        `threadCount` - Number of threads to be used for portrait processing.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getTintedGlassThreshold

          public int getTintedGlassThreshold()
                                      throws FaceException

      Gets the tinted glass detection threshold. If the score is above this value, the person is definitely wearing tinted glasses. Hint: Default value 25.
      Returns:
        Tinted glass detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setTintedGlassThreshold

          public void setTintedGlassThreshold(int tintedGlassThreshold)
                                       throws FaceException

      Sets the tinted glass detection threshold. If the score is above this value, the person is definitely wearing tinted glasses. Hint: Default value 25.
      Parameters:
        `tintedGlassThreshold` - Tinted glass detection threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getTrackerMatchingThreshold

          public int getTrackerMatchingThreshold()
                                          throws FaceException

      Gets the minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'. Hint: Default value is 3000 which corresponds to a False Match Rate of 1/1000.
      Returns:
        Minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setTrackerMatchingThreshold

          public void setTrackerMatchingThreshold(int trackerMatchingThreshold)
                                           throws FaceException

      Sets the minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'. Hint: Default value is 3000 which corresponds to a False Match Rate of 1/1000.
      Parameters:
        `trackerMatchingThreshold` - Minimum match score to reach to preserve the ID of a tracked face between frame 't-1' and frame 't'.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getTrackerMaximumFaceAge

          public int getTrackerMaximumFaceAge()
                                       throws FaceException

      Gets the maximum number of consecutive non-detections to be reached before deleting a tracked face. Hint: Default value is 2. One must adapt this value to its needs in terms of tracker identity memory (in seconds) and measured frame rate on target platform.
      Returns:
        Maximum number of consecutive non-detections to be reached before deleting a tracked face.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setTrackerMaximumFaceAge

          public void setTrackerMaximumFaceAge(int trackerMaximumFaceAge)
                                        throws FaceException

      Sets the maximum number of consecutive non-detections to be reached before deleting a tracked face. Hint: Default value is 2. One must adapt this value to its needs in terms of tracker identity memory (in seconds) and measured frame rate on target platform.
      Parameters:
        `trackerMaximumFaceAge` - Maximum number of consecutive non-detections to be reached before deleting a tracked face.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getTrackerMinimumFaceAge

          public int getTrackerMinimumFaceAge()
                                       throws FaceException

      Gets the minimum number of consecutive detections to reach before creating a tracked face. Hint: Default value is 1 for ``FaceDetector4B`` since the false detection rate is low enough. If using a less accurate detector (such as FaceDetector3C) one might consider increasing a bit this value to avoid false tracks.
      Returns:
        Minimum number of consecutive detections to reach before creating a tracked face.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setTrackerMinimumFaceAge

          public void setTrackerMinimumFaceAge(int trackerMinimumFaceAge)
                                        throws FaceException

      Sets the minimum number of consecutive detections to reach before creating a tracked face. Hint: Default value is 1 for ``FaceDetector4B`` since the false detection rate is low enough. If using a less accurate detector (such as FaceDetector3C) one might consider increasing a bit this value to avoid false tracks.
      Parameters:
        `trackerMinimumFaceAge` - Minimum number of consecutive detections to reach before creating a tracked face.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getTrackerNmsIouThreshold

          public int getTrackerNmsIouThreshold()
                                        throws FaceException

      Gets the non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range [0;100]. Hint: Default value is 0. Setting a high threshold allows to detect more overlapping faces which can be useful in a multi-face scenario. On the contrary, in a portrait scenario, a low NMS IOU threshold should be preferred.
      Returns:
        Non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range [0;100].
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setTrackerNmsIouThreshold

          public void setTrackerNmsIouThreshold(int trackerNmsIouThreshold)
                                         throws FaceException

      Sets the non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range [0;100]. Hint: Default value is 0. Setting a high threshold allows to detect more overlapping faces which can be useful in a multi-face scenario. On the contrary, in a portrait scenario, a low NMS IOU threshold should be preferred.
      Parameters:
        `trackerNmsIouThreshold` - Non-maximum suppression (NMS) intersection-over-union (IOU) threshold, in the range [0;100].
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### getUnderExposureThreshold

          public int getUnderExposureThreshold()
                                        throws FaceException

      Gets the under exposure threshold. Above this threshold, the face is probably under-exposed. Hint: Default value is 50.
      Returns:
        Under exposure threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### setUnderExposureThreshold

          public void setUnderExposureThreshold(int underExposureThreshold)
                                         throws FaceException

      Sets the under exposure threshold. Above this threshold, the face is probably under-exposed. Hint: Default value is 50.
      Parameters:
        `underExposureThreshold` - Under exposure threshold.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### createPortrait

          public Portrait createPortrait(Image image)
                                  throws FaceException

      Analyses an image and creates a portrait with the first detected face or the currently tracked face if the update parameter is activated. This method performs the following tasks: - Face detection - Landmark detection (68 points) - Head pose estimation - Verification of subject position - Geometric attributes computation - Unified quality score computation Important: This method requires the ``FaceDetector``, ``FaceLandmarksEstimator`` and ``FacePoseEstimator`` models to be loaded.
      Parameters:
        `image` - Source image.
      Returns:
        The newly created portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### cropIcaoPortrait

          public Image cropIcaoPortrait(Portrait portrait)
                                 throws FaceException

      Creates an ICAO-compliant portrait image by cropping the source image around the detected face. This method uses the following parameters: - Portrait aspect ratio - Portrait eye position ratio - Portrait IOD ratio
      Parameters:
        `portrait` - Source portrait.
      Returns:
        The output cropped image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### cropPortrait

          public Image cropPortrait(Portrait portrait)
                             throws FaceException

      Creates a portrait image by cropping the source image around the detected face.
      Parameters:
        `portrait` - The portrait to extract the face from.
      Returns:
        The output cropped image of the face.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### detectOcclusions

          public void detectOcclusions(Portrait portrait)
                                throws FaceException

      Detects occlusions on the subject's face. Important: This function requires the ``FaceOcclusionDetector2A`` model to be loaded.
      Parameters:
        `portrait` - The portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### detectPresentationAttack

          public void detectPresentationAttack(Portrait portrait)
                                        throws FaceException

      Detects a possible presentation attack. Important: This method requires the ``FaceColorBasedPad`` models to be loaded.
      Parameters:
        `portrait` - The portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### estimateAge

          public void estimateAge(Portrait portrait)
                           throws FaceException

      Estimates the age of the person. Important: This method requires the ``FaceAgeEstimator1A`` model to be loaded.
      Parameters:
        `portrait` - The portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### estimateBackgroundUniformity

          public void estimateBackgroundUniformity(Portrait portrait)
                                            throws FaceException

      Checks the background uniformity of the specified portrait. Important: This method requires the ``FaceBackgroundUniformityEstimator1A`` model to be loaded.
      Parameters:
        `portrait` - The portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### estimateExpression

          public void estimateExpression(Portrait portrait)
                                  throws FaceException

      Estimates the subject's expression on the specified portrait. Important: This method requires the ``FaceExpressionClassifier1A`` model to be loaded.
      Parameters:
        `portrait` - The portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### estimateFaceAttributes

          public void estimateFaceAttributes(Portrait portrait)
                                      throws FaceException

      Estimates the face attributes of the specified portrait. It includes glasses, hat, makeup, mouth opening, gender, smile, eye gaze, eye opening, face mask Note: The appropriate AI models must be loaded.
      Parameters:
        `portrait` - The portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### estimateGeometryQuality

          public void estimateGeometryQuality(Portrait portrait)
                                       throws FaceException

      Estimates the geometric quality of the specified portrait according to the ICAO portrait parameters.
      Parameters:
        `portrait` - The portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### estimatePhotographicQuality

          public void estimatePhotographicQuality(Portrait portrait)
                                           throws FaceException

      Etimates the photographic quality of the specified portrait. It includes image colorization, equal brightness, dynamic range, resolution, natural skin color, flash reflection, noise, over-exposure, under-exposure, pixelation, sharpness.
      Parameters:
        `portrait` - The portrait.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### removeBackground

          public void removeBackground(Image image,
                                       int red,
                                       int green,
                                       int blue)
                                throws FaceException

      Removes the background on the specified portrait image. Important: This method requires the ``FaceBackgroundSegmenter1A`` model to be loaded.
      Parameters:
        `image` - The portrait image.
        `red` - Green channel of the background color. Must be a value from 0 to 255.
        `green` - Red channel of the background color. Must be a value from 0 to 255.
        `blue` - Blue channel of the background color. Must be a value from 0 to 255.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### reset

          public void reset()
                     throws FaceException

      Resets the face tracker.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

    - #### updatePortrait

          public void updatePortrait(Portrait portrait,
                                     Image image)
                              throws FaceException

      Analyses an image and updates the specified portrait with the first detected face or the currently tracked face. This method performs the following tasks: - Face detection and tracking with prediction models - Landmark detection (68 points) - Head pose estimation - Verification of subject position - Template encoding and updating - Geometric attributes computation - Unified quality score computation Important: This method requires the ``FaceDetector``, ``FaceEncoder``, ``FaceLandmarksEstimator`` and ``FacePoseEstimator`` models to be loaded.
      Parameters:
        `portrait` - The portrait to be updated.
        `image` - The source image.
      Throws:
        `FaceException` - An error has occurred during Face Library execution.

Copyright © id3 Technologies. All rights reserved. eu.id3.face