.. index:: 
  !FaceAnalyser.computePose Method
  
.. _id3_face_face_analyser_compute_pose_class_method:

===============================================================================
FaceAnalyser.computePose Method
===============================================================================

Module: :ref:`FaceAnalyser<id3_face_face_analyser_class>`

Definition
----------

Computes the pose of a detected face.

.. important:: Loading the ``FacePoseEstimator`` model is required to use this function.


.. tab-set::

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

      .. code:: Python

        compute_pose(self, detected_face: DetectedFace) -> FacePose

      **Parameters**

        .. line-block::

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


      **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 computePose(DetectedFace detectedFace)

      **Parameters**

        .. line-block::

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


      **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 ComputePose(DetectedFace detectedFace)

      **Parameters**

        .. line-block::

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


      **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 computePose(DetectedFace detectedFace) throws FaceException

      **Parameters**

        .. line-block::

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


      **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 computePose(detectedFace: DetectedFace) throws -> FacePose

      **Parameters**

        .. line-block::

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


      **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_ComputePose (
            ID3_FACE_ANALYSER hFaceAnalyser, 
            ID3_DETECTED_FACE hDetectedFace, 
            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.

          ``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.


