.. index:: 
  !PortraitProcessor.faceDetectionThreshold Property

.. _id3_face_portrait_processor_face_detection_threshold_class_member:

===============================================================================
PortraitProcessor.faceDetectionThreshold Property
===============================================================================

Module: :ref:`PortraitProcessor<id3_face_portrait_processor_class>`

Type: int

Definition
----------

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.


.. tab-set::

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

    .. code:: Python

      face_detection_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 faceDetectionThreshold => getFaceDetectionThreshold();
      set faceDetectionThreshold(int value) => setFaceDetectionThreshold(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 faceDetectionThreshold
      {
          get => GetfaceDetectionThreshold();
          set => SetfaceDetectionThreshold(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 getFaceDetectionThreshold() throws FaceException
      public void setFaceDetectionThreshold(int faceDetectionThreshold) 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 faceDetectionThreshold: Int
          get {
              return Int(try! getFaceDetectionThreshold())
          }
      }


    **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_GetFaceDetectionThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int * faceDetectionThreshold)
      int id3FacePortraitProcessor_SetFaceDetectionThreshold (ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, int faceDetectionThreshold)

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

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

