Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
Toggle table of contents sidebar

# FaceDetector.warmUp Method

Module: FaceDetector

## Definition

Gets the face detector 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.

Python

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

Parameters

> `image_width` int
> in Width of the expected image size.
> `image_height` int
> in Height of expected image size.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Dart

    void warmUp(int imageWidth, int imageHeight)

Parameters

> `imageWidth` int
> in Width of the expected image size.
> `imageHeight` int
> in Height of expected image size.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C#

    public void WarmUp(int imageWidth, int imageHeight)

Parameters

> `imageWidth` int
> in Width of the expected image size.
> `imageHeight` int
> in Height of expected image size.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Java

    public void warmUp(int imageWidth, int imageHeight) throws FaceException

Parameters

> `imageWidth` int
> in Width of the expected image size.
> `imageHeight` int
> in Height of expected image size.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

Swift

    public func warmUp(imageWidth: Int32, imageHeight: Int32) throws

Parameters

> `imageWidth` Int32
> in Width of the expected image size.
> `imageHeight` Int32
> in Height of expected image size.

Exceptions

> FaceException
> An error has occurred during Face Library execution.

C

    int id3FaceDetector_WarmUp (
        ID3_FACE_DETECTOR hFaceDetector,
        int imageWidth,
        int imageHeight)

Parameters

> `hFaceDetector` ID3_FACE_DETECTOR
> in Handle to the FaceDetector object.
> `imageWidth` int
> in Width of the expected image size.
> `imageHeight` int
> in Height of expected image size.

Returns

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