.. index:: 
  !FaceAnalyser.computePoseWithLandmarks Method
  
.. _id3_face_face_analyser_compute_pose_with_landmarks_class_method:

===============================================================================
FaceAnalyser.computePoseWithLandmarks Method
===============================================================================

Module: :ref:`FaceAnalyser<id3_face_face_analyser_class>`

Definition
----------

Computes the pose of a detected face using the specified 68-point landmarks.

Loading the model ``FacePoseEstimator1A`` is required to use this function.


.. tab-set::

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

      .. code:: Python

        compute_pose_with_landmarks(self, detected_face: DetectedFace, landmarks: PointList) -> FacePose

      **Parameters**

        .. line-block::

          ``detected_face`` :ref:`DetectedFace<id3_face_detected_face_class>`
          :guilabel:`in` Detected face to process.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Estimated landmarks of the detected face. Must be computed with the face analyser.


      **Returns**

        .. line-block::

          :ref:`FacePose<id3_face_face_pose_struct>`
          The estimated pose of the 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

        FacePose computePoseWithLandmarks(DetectedFace detectedFace, PointList landmarks)

      **Parameters**

        .. line-block::

          ``detectedFace`` :ref:`DetectedFace<id3_face_detected_face_class>`
          :guilabel:`in` Detected face to process.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Estimated landmarks of the detected face. Must be computed with the face analyser.


      **Returns**

        .. line-block::

          :ref:`FacePose<id3_face_face_pose_struct>`
          The estimated pose of the 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 FacePose ComputePoseWithLandmarks(DetectedFace detectedFace, PointList landmarks)

      **Parameters**

        .. line-block::

          ``detectedFace`` :ref:`DetectedFace<id3_face_detected_face_class>`
          :guilabel:`in` Detected face to process.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Estimated landmarks of the detected face. Must be computed with the face analyser.


      **Returns**

        .. line-block::

          :ref:`FacePose<id3_face_face_pose_struct>`
          The estimated pose of the 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 FacePose computePoseWithLandmarks(DetectedFace detectedFace, PointList landmarks) throws FaceException

      **Parameters**

        .. line-block::

          ``detectedFace`` :ref:`DetectedFace<id3_face_detected_face_class>`
          :guilabel:`in` Detected face to process.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Estimated landmarks of the detected face. Must be computed with the face analyser.


      **Returns**

        .. line-block::

          :ref:`FacePose<id3_face_face_pose_struct>`
          The estimated pose of the 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 func computePoseWithLandmarks(detectedFace: DetectedFace, landmarks: PointList) throws -> FacePose

      **Parameters**

        .. line-block::

          ``detectedFace`` :ref:`DetectedFace<id3_face_detected_face_class>`
          :guilabel:`in` Detected face to process.

          ``landmarks`` :ref:`PointList<id3_face_point_list_class>`
          :guilabel:`in` Estimated landmarks of the detected face. Must be computed with the face analyser.


      **Returns**

        .. line-block::

          :ref:`FacePose<id3_face_face_pose_struct>`
          The estimated pose of the 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 id3FaceAnalyser_ComputePoseWithLandmarks (
            ID3_FACE_ANALYSER hFaceAnalyser, 
            ID3_DETECTED_FACE hDetectedFace, 
            ID3_FACE_POINT_LIST hLandmarks, 
            id3FacePose * sPose)

      **Parameters**

        .. line-block::

          ``hFaceAnalyser`` :ref:`ID3_FACE_ANALYSER<id3_face_face_analyser_class>`
          :guilabel:`in` Handle to the FaceAnalyser object.

          ``hDetectedFace`` :ref:`ID3_DETECTED_FACE<id3_face_detected_face_class>`
          :guilabel:`in` Detected face to process.

          ``hLandmarks`` :ref:`ID3_FACE_POINT_LIST<id3_face_point_list_class>`
          :guilabel:`in` Estimated landmarks of the detected face. Must be computed with the face analyser.

          ``sPose`` :ref:`id3FacePose *<id3_face_face_pose_struct>`
          :guilabel:`out` The estimated pose 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.


