.. index:: 
  !FaceAnalyser.removeCompressionArtifacts Method
  
.. _id3_face_face_analyser_remove_compression_artifacts_class_method:

===============================================================================
FaceAnalyser.removeCompressionArtifacts Method
===============================================================================

Module: :ref:`FaceAnalyser<id3_face_face_analyser_class>`

Definition
----------

Upscale and enhance the image of a face.

.. important:: This methods requires the ``CompressionArtifactRemover`` model to be loaded.


.. tab-set::

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

      .. code:: Python

        remove_compression_artifacts(self, image: Image) -> Image

      **Parameters**

        .. line-block::

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


      **Returns**

        .. line-block::

          :ref:`Image<id3_face_image_class>`
          The enhanced 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

        Image removeCompressionArtifacts(Image image)

      **Parameters**

        .. line-block::

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


      **Returns**

        .. line-block::

          :ref:`Image<id3_face_image_class>`
          The enhanced 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 Image RemoveCompressionArtifacts(Image image)

      **Parameters**

        .. line-block::

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


      **Returns**

        .. line-block::

          :ref:`Image<id3_face_image_class>`
          The enhanced 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 Image removeCompressionArtifacts(Image image) throws FaceException

      **Parameters**

        .. line-block::

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


      **Returns**

        .. line-block::

          :ref:`Image<id3_face_image_class>`
          The enhanced 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 removeCompressionArtifacts(image: Image) throws -> Image

      **Parameters**

        .. line-block::

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


      **Returns**

        .. line-block::

          :ref:`Image<id3_face_image_class>`
          The enhanced 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_RemoveCompressionArtifacts (
            ID3_FACE_ANALYSER hFaceAnalyser, 
            ID3_FACE_IMAGE hImage, 
            ID3_FACE_IMAGE hEnhancedImage)

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

          ``hEnhancedImage`` :ref:`ID3_FACE_IMAGE<id3_face_image_class>`
          :guilabel:`out` The enhanced face.


      **Returns**

        .. line-block::

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


