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

# FaceDetector.trackFaces Method

Module: FaceDetector

## Definition

Tracks faces in an image and update their info in a DetectedFaceList object.

In a realtime process, one must use this function instead of DetectFaces() to keep the face IDs stable in time.

Note

The algorithm searches for faces in the range [16px;512px]. If the image is too large to fit this range, one must resize it before the detection process.

Important

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

Warning

This function is deprecated: use the FaceTracker module instead.

Python

    track_faces(self, image: Image, detected_face_list: DetectedFaceList) -> None

Parameters

> `image` Image
> in Source image to process.
> `detected_face_list` DetectedFaceList
> in List of detected faces.

Exceptions

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

Dart

    void trackFaces(Image image, DetectedFaceList detectedFaceList)

Parameters

> `image` Image
> in Source image to process.
> `detectedFaceList` DetectedFaceList
> in List of detected faces.

Exceptions

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

C#

    public void TrackFaces(Image image, DetectedFaceList detectedFaceList)

Parameters

> `image` Image
> in Source image to process.
> `detectedFaceList` DetectedFaceList
> in List of detected faces.

Exceptions

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

Java

    public void trackFaces(Image image, DetectedFaceList detectedFaceList) throws FaceException

Parameters

> `image` Image
> in Source image to process.
> `detectedFaceList` DetectedFaceList
> in List of detected faces.

Exceptions

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

Swift

    public func trackFaces(image: Image, detectedFaceList: DetectedFaceList) throws

Parameters

> `image` Image
> in Source image to process.
> `detectedFaceList` DetectedFaceList
> in List of detected faces.

Exceptions

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

C

    int id3FaceDetector_TrackFaces (
        ID3_FACE_DETECTOR hFaceDetector,
        ID3_FACE_IMAGE hImage,
        ID3_DETECTED_FACE_LIST hDetectedFaceList)

Parameters

> `hFaceDetector` ID3_FACE_DETECTOR
> in Handle to the FaceDetector object.
> `hImage` ID3_FACE_IMAGE
> in Source image to process.
> `hDetectedFaceList` ID3_DETECTED_FACE_LIST
> in List of detected faces.

Returns

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