.. index:: 
  !FaceTracker.confidenceThreshold Property

.. _id3_face_face_tracker_confidence_threshold_class_member:

===============================================================================
FaceTracker.confidenceThreshold Property
===============================================================================

Module: :ref:`FaceTracker<id3_face_face_tracker_class>`

Type: int

Definition
----------

Confidence threshold, in the range [0;100].

.. hint:: Default value is 50.

.. note:: Setting a high threshold reduces false detection but can increase the number of undetected faces.


.. tab-set::

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

    .. code:: Python

      confidence_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 confidenceThreshold => getConfidenceThreshold();
      set confidenceThreshold(int value) => setConfidenceThreshold(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 confidenceThreshold
      {
          get => GetconfidenceThreshold();
          set => SetconfidenceThreshold(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 getConfidenceThreshold() throws FaceException
      public void setConfidenceThreshold(int confidenceThreshold) 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 confidenceThreshold: Int
          get {
              return Int(try! getConfidenceThreshold())
          }
      }


    **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 id3FaceTracker_GetConfidenceThreshold (ID3_FACE_TRACKER hFaceTracker, int * confidenceThreshold)
      int id3FaceTracker_SetConfidenceThreshold (ID3_FACE_TRACKER hFaceTracker, int confidenceThreshold)

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

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

