.. index:: 
  !DetectedFace.create Method
  
.. _id3_face_detected_face_create_class_method:

===============================================================================
DetectedFace.create Method
===============================================================================

Module: :ref:`DetectedFace<id3_face_detected_face_class>`

Definition
----------

Creates a detected face.


.. tab-set::

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

      .. code:: Python

        @staticmethod
        create(bounds: Rectangle, detection_score: int, id: int, landmarks: PointList) -> DetectedFace

      **Parameters**

        .. line-block::

          ``bounds`` :ref:`Rectangle<id3_face_rectangle_struct>`
          :guilabel:`in` Bounds of the detected face.

          ``detection_score`` int
          :guilabel:`in` Confidence score of the detected face.

          ``id`` int
          :guilabel:`in` ID of the detected face.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Landmarks (eyes, nose and mouth corners) of the detected face.


      **Returns**

        .. line-block::

          :ref:`DetectedFace<id3_face_detected_face_class>`
          The newly created detected face.

      **Exceptions**

        .. line-block::

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


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

      .. code:: Dart

        static DetectedFace create(Rectangle bounds, int detectionScore, int id, PointList landmarks)

      **Parameters**

        .. line-block::

          ``bounds`` :ref:`Rectangle<id3_face_rectangle_struct>`
          :guilabel:`in` Bounds of the detected face.

          ``detectionScore`` int
          :guilabel:`in` Confidence score of the detected face.

          ``id`` int
          :guilabel:`in` ID of the detected face.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Landmarks (eyes, nose and mouth corners) of the detected face.


      **Returns**

        .. line-block::

          :ref:`DetectedFace<id3_face_detected_face_class>`
          The newly created detected face.

      **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 static DetectedFace Create(Rectangle bounds, int detectionScore, int id, PointList landmarks)

      **Parameters**

        .. line-block::

          ``bounds`` :ref:`Rectangle<id3_face_rectangle_struct>`
          :guilabel:`in` Bounds of the detected face.

          ``detectionScore`` int
          :guilabel:`in` Confidence score of the detected face.

          ``id`` int
          :guilabel:`in` ID of the detected face.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Landmarks (eyes, nose and mouth corners) of the detected face.


      **Returns**

        .. line-block::

          :ref:`DetectedFace<id3_face_detected_face_class>`
          The newly created detected face.

      **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 static DetectedFace create(Rectangle bounds, int detectionScore, int id, PointList landmarks) throws FaceException

      **Parameters**

        .. line-block::

          ``bounds`` :ref:`Rectangle<id3_face_rectangle_struct>`
          :guilabel:`in` Bounds of the detected face.

          ``detectionScore`` int
          :guilabel:`in` Confidence score of the detected face.

          ``id`` int
          :guilabel:`in` ID of the detected face.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Landmarks (eyes, nose and mouth corners) of the detected face.


      **Returns**

        .. line-block::

          :ref:`DetectedFace<id3_face_detected_face_class>`
          The newly created detected face.

      **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 static func create(bounds: Rectangle, detectionScore: Int32, id: Int32, landmarks: PointList) throws -> DetectedFace

      **Parameters**

        .. line-block::

          ``bounds`` :ref:`Rectangle<id3_face_rectangle_struct>`
          :guilabel:`in` Bounds of the detected face.

          ``detectionScore`` Int32
          :guilabel:`in` Confidence score of the detected face.

          ``id`` Int32
          :guilabel:`in` ID of the detected face.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Landmarks (eyes, nose and mouth corners) of the detected face.


      **Returns**

        .. line-block::

          :ref:`DetectedFace<id3_face_detected_face_class>`
          The newly created detected face.

      **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 id3DetectedFace_Create (
            ID3_DETECTED_FACE hDetectedFace, 
            const id3FaceRectangle * sBounds, 
            int detectionScore, 
            int id, 
            ID3_FACE_POINT_LIST hLandmarks)

      **Parameters**

        .. line-block::

          ``hDetectedFace`` :ref:`ID3_DETECTED_FACE<id3_face_detected_face_class>`
          :guilabel:`in` Handle to the DetectedFace object.

          ``sBounds`` :ref:`const id3FaceRectangle *<id3_face_rectangle_struct>`
          :guilabel:`in` Bounds of the detected face.

          ``detectionScore`` int
          :guilabel:`in` Confidence score of the detected face.

          ``id`` int
          :guilabel:`in` ID of the detected face.

          ``hLandmarks`` :ref:`ID3_FACE_POINT_LIST<id3_face_point_list_class>`
          :guilabel:`in` Landmarks (eyes, nose and mouth corners) of the detected face.


      **Returns**

        .. line-block::

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


