.. index:: 
  !FaceMatcher Class

.. _id3_face_face_matcher_class:

===============================================================================
FaceMatcher Class
===============================================================================

Namespace: :ref:`id3.Face<reference_face>`

.. toctree::
  :hidden:

  compareTemplateLists<compare_template_lists>
  compareTemplates<compare_templates>
  searchTemplate<search_template>


Definition
----------
.. line-block::
    Compares two face templates and searches for a face template in a list.

.. tab-set::

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

      .. code:: Python

        class FaceMatcher

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

      .. code:: Dart

        class FaceMatcher implements Finalizable

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

      .. code:: C#

        public partial class FaceMatcher

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

      .. code:: Java

        public class FaceMatcher implements AutoCloseable, Serializable

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

      .. code:: Swift

        public class FaceMatcher

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

      .. code:: C

        typedef struct id3FaceMatcher *ID3_FACE_MATCHER;



Usage
-----

.. tab-set::

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

      .. code:: Python

        faceMatcherInstance = id3face.FaceMatcher()

      **Explicit destruction**

      .. code:: Python

        # ...
        del faceMatcherInstance

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

      .. code:: Dart

        final faceMatcherInstance = sdk.FaceMatcher();
        // ...

      **Explicit destruction**

      .. code:: Dart

        // ...
        faceMatcherInstance.dispose()

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

      .. code:: C#

        using (var faceMatcherInstance = new FaceMatcher())
        {
           // ...
        }

      **Explicit destruction**

      .. code:: C#

        var faceMatcherInstance = new FaceMatcher()
        // ...
        faceMatcherInstance.Dispose()

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

      .. code:: Java

        try (FaceMatcher faceMatcherInstance = new FaceMatcher()) {
        // ...
        }

      **Explicit destruction**

      .. code:: Java

        FaceMatcher faceMatcherInstance = new FaceMatcher();
        // ...
        faceMatcherInstance.close();

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

      .. code:: Swift

        private var faceMatcherInstance: FaceMatcher? = nil
        faceMatcherInstance = try FaceMatcher()

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

      .. code:: C

        ID3_FACE_MATCHER hFaceMatcher{};
        int err = id3FaceMatcher_Initialize(&hFaceMatcher);
        if (err == ID3_SUCCESS) {
            // ...
            id3FaceMatcher_Dispose(&hFaceMatcher);
        }


Methods
-------

.. list-table:: 
  :width: 100%
  :widths: 30 70
  :header-rows: 1

  * - Name
    - Description
  * - :ref:`compareTemplateLists<id3_face_face_matcher_compare_template_lists_class_method>`
    - Compares two template lists and outputs a comparison score.
  * - :ref:`compareTemplates<id3_face_face_matcher_compare_templates_class_method>`
    - Compares two templates and outputs a comparison score.
  * - :ref:`searchTemplate<id3_face_face_matcher_search_template_class_method>`
    - Performs a one-to-many search of a biometric probe against a previously initialized dictionary of biometric references and outputs a candidate list.
