.. index:: 
  !FaceTracker.warmUp Method
  
.. _id3_face_face_tracker_warm_up_class_method:

===============================================================================
FaceTracker.warmUp Method
===============================================================================

Module: :ref:`FaceTracker<id3_face_face_tracker_class>`

Definition
----------

Gets the face tracker module ready to work on a specific image size by initializing all its internal memory layout.

This function can be called after setting all the parameters of the face detector module if the image size is fixed, for example using frames from a video stream.

Calling this function is not mandatory as the internal memory layout is automatically initialized in the first call to detectFaces() or trackFaces() if missing.

.. important:: Loading a ``FaceDetector`` model is required to use this function.


.. tab-set::

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

      .. code:: Python

        warm_up(self, image_width: int, image_height: int) -> None

      **Parameters**

        .. line-block::

          ``image_width`` int
          :guilabel:`in` Width of the expected image size.

          ``image_height`` int
          :guilabel:`in` Height of expected image size.


      **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 warmUp(int imageWidth, int imageHeight)

      **Parameters**

        .. line-block::

          ``imageWidth`` int
          :guilabel:`in` Width of the expected image size.

          ``imageHeight`` int
          :guilabel:`in` Height of expected image size.


      **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 WarmUp(int imageWidth, int imageHeight)

      **Parameters**

        .. line-block::

          ``imageWidth`` int
          :guilabel:`in` Width of the expected image size.

          ``imageHeight`` int
          :guilabel:`in` Height of expected image size.


      **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 warmUp(int imageWidth, int imageHeight) throws FaceException

      **Parameters**

        .. line-block::

          ``imageWidth`` int
          :guilabel:`in` Width of the expected image size.

          ``imageHeight`` int
          :guilabel:`in` Height of expected image size.


      **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 warmUp(imageWidth: Int32, imageHeight: Int32) throws

      **Parameters**

        .. line-block::

          ``imageWidth`` Int32
          :guilabel:`in` Width of the expected image size.

          ``imageHeight`` Int32
          :guilabel:`in` Height of expected image size.


      **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 id3FaceTracker_WarmUp (
            ID3_FACE_TRACKER hFaceTracker, 
            int imageWidth, 
            int imageHeight)

      **Parameters**

        .. line-block::

          ``hFaceTracker`` :ref:`ID3_FACE_TRACKER<id3_face_face_tracker_class>`
          :guilabel:`in` Handle to the FaceTracker object.

          ``imageWidth`` int
          :guilabel:`in` Width of the expected image size.

          ``imageHeight`` int
          :guilabel:`in` Height of expected image size.


      **Returns**

        .. line-block::

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


