.. index:: 
  !PortraitProcessor.padThreshold Property

.. _id3_face_portrait_processor_pad_threshold_class_member:

===============================================================================
PortraitProcessor.padThreshold Property
===============================================================================

Module: :ref:`PortraitProcessor<id3_face_portrait_processor_class>`

Type: int

Definition
----------

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.


.. tab-set::

  .. tab-item:: Python
    :sync: Python

    .. code:: Python

      pad_threshold: int


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: Dart
    :sync: Dart

    .. code:: Dart

      int get padThreshold => getPadThreshold();
      set padThreshold(int value) => setPadThreshold(value);


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: C#
    :sync: C#

    .. code:: C#

      public int padThreshold
      {
          get => GetpadThreshold();
          set => SetpadThreshold(ref value);
      }


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: Java
    :sync: Java

    .. code:: Java

      public int getPadThreshold() throws FaceException
      public void setPadThreshold(int padThreshold) throws FaceException


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: Swift
    :sync: Swift

    .. code:: Swift

      public var padThreshold: Int
          get {
              return Int(try! getPadThreshold())
          }
      }


    **Exceptions**

      .. line-block::

        :ref:`FaceException<id3_face_face_exception>`
        An error has occurred during Face Library execution.

  .. tab-item:: C
    :sync: C

    .. code:: C

      int id3FacePortraitProcessor_GetPadThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int * padThreshold)
      int id3FacePortraitProcessor_SetPadThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int padThreshold)

    **Returns**
   
      .. line-block::

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

