.. index:: 
  !FaceAnalyser.computePhotographicAttributes Method
  
.. _id3_face_face_analyser_compute_photographic_attributes_class_method:

===============================================================================
FaceAnalyser.computePhotographicAttributes Method
===============================================================================

Module: :ref:`FaceAnalyser<id3_face_face_analyser_class>`

Definition
----------

Computes the photographic attributes of a detected face. This function must be used for a portrait image with only one face in it.


.. tab-set::

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

      .. code:: Python

        compute_photographic_attributes(self, image: Image, detected_face: DetectedFace, landmarks: PointList) -> PhotographicAttributes

      **Parameters**

        .. line-block::

          ``image`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Source image to process.

          ``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:`PhotographicAttributes<id3_face_photographic_attributes_struct>`
          The estimated photographic attributes 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

        PhotographicAttributes computePhotographicAttributes(Image image, DetectedFace detectedFace, PointList landmarks)

      **Parameters**

        .. line-block::

          ``image`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Source image to process.

          ``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:`PhotographicAttributes<id3_face_photographic_attributes_struct>`
          The estimated photographic attributes 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 PhotographicAttributes ComputePhotographicAttributes(Image image, DetectedFace detectedFace, PointList landmarks)

      **Parameters**

        .. line-block::

          ``image`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Source image to process.

          ``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:`PhotographicAttributes<id3_face_photographic_attributes_struct>`
          The estimated photographic attributes 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 PhotographicAttributes computePhotographicAttributes(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException

      **Parameters**

        .. line-block::

          ``image`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Source image to process.

          ``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:`PhotographicAttributes<id3_face_photographic_attributes_struct>`
          The estimated photographic attributes 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 computePhotographicAttributes(image: Image, detectedFace: DetectedFace, landmarks: PointList) throws -> PhotographicAttributes

      **Parameters**

        .. line-block::

          ``image`` :ref:`Image<id3_face_image_class>`
          :guilabel:`in` Source image to process.

          ``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:`PhotographicAttributes<id3_face_photographic_attributes_struct>`
          The estimated photographic attributes 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_ComputePhotographicAttributes (
            ID3_FACE_ANALYSER hFaceAnalyser, 
            ID3_FACE_IMAGE hImage, 
            ID3_DETECTED_FACE hDetectedFace, 
            ID3_FACE_POINT_LIST hLandmarks, 
            id3FacePhotographicAttributes * sPhotographicAttributes)

      **Parameters**

        .. line-block::

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

          ``hImage`` :ref:`ID3_FACE_IMAGE<id3_face_image_class>`
          :guilabel:`in` Source image to process.

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

          ``sPhotographicAttributes`` :ref:`id3FacePhotographicAttributes *<id3_face_photographic_attributes_struct>`
          :guilabel:`out` The estimated photographic attributes 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.


