.. index:: 
  !PortraitProcessor.estimateExpression Method
  
.. _id3_face_portrait_processor_estimate_expression_class_method:

===============================================================================
PortraitProcessor.estimateExpression Method
===============================================================================

Module: :ref:`PortraitProcessor<id3_face_portrait_processor_class>`

Definition
----------

Estimates the subject's expression on the specified portrait.

.. important:: This method requires the ``FaceExpressionClassifier1A`` model to be loaded.


.. tab-set::

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

      .. code:: Python

        estimate_expression(self, portrait: Portrait) -> None

      **Parameters**

        .. line-block::

          ``portrait`` :ref:`Portrait<id3_face_portrait_class>`
          :guilabel:`in` The portrait.


      **Exceptions**

        .. line-block::

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


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

      .. code:: Dart

        void estimateExpression(Portrait portrait)

      **Parameters**

        .. line-block::

          ``portrait`` :ref:`Portrait<id3_face_portrait_class>`
          :guilabel:`in` The portrait.


      **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 void EstimateExpression(Portrait portrait)

      **Parameters**

        .. line-block::

          ``portrait`` :ref:`Portrait<id3_face_portrait_class>`
          :guilabel:`in` The portrait.


      **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 void estimateExpression(Portrait portrait) throws FaceException

      **Parameters**

        .. line-block::

          ``portrait`` :ref:`Portrait<id3_face_portrait_class>`
          :guilabel:`in` The portrait.


      **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 estimateExpression(portrait: Portrait) throws

      **Parameters**

        .. line-block::

          ``portrait`` :ref:`Portrait<id3_face_portrait_class>`
          :guilabel:`in` The portrait.


      **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 id3FacePortraitProcessor_EstimateExpression (
            ID3_FACE_PORTRAIT_PROCESSOR hPortraitProcessor, 
            ID3_FACE_PORTRAIT hPortrait)

      **Parameters**

        .. line-block::

          ``hPortraitProcessor`` :ref:`ID3_FACE_PORTRAIT_PROCESSOR<id3_face_portrait_processor_class>`
          :guilabel:`in` Handle to the PortraitProcessor object.

          ``hPortrait`` :ref:`ID3_FACE_PORTRAIT<id3_face_portrait_class>`
          :guilabel:`in` The portrait.


      **Returns**

        .. line-block::

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


