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

# FaceTracker.detectFaces Method

Module: FaceTracker

## Definition

Detects faces in an image and update their info in a TrackedFaceList object.

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 tracking process.

In a realtime process, one must use this function to keep the face IDs stable in time.

Important

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

Python

    detect_faces(self, image: Image, tracked_face_list: TrackedFaceList) -> None

Parameters

> `image` Image
> in Source image to process.
> `tracked_face_list` TrackedFaceList
> in List of tracked faces.

Exceptions

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

Dart

    void detectFaces(Image image, TrackedFaceList trackedFaceList)

Parameters

> `image` Image
> in Source image to process.
> `trackedFaceList` TrackedFaceList
> in List of tracked faces.

Exceptions

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

C#

    public void DetectFaces(Image image, TrackedFaceList trackedFaceList)

Parameters

> `image` Image
> in Source image to process.
> `trackedFaceList` TrackedFaceList
> in List of tracked faces.

Exceptions

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

Java

    public void detectFaces(Image image, TrackedFaceList trackedFaceList) throws FaceException

Parameters

> `image` Image
> in Source image to process.
> `trackedFaceList` TrackedFaceList
> in List of tracked faces.

Exceptions

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

Swift

    public func detectFaces(image: Image, trackedFaceList: TrackedFaceList) throws

Parameters

> `image` Image
> in Source image to process.
> `trackedFaceList` TrackedFaceList
> in List of tracked faces.

Exceptions

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

C

    int id3FaceTracker_DetectFaces (
        ID3_FACE_TRACKER hFaceTracker,
        ID3_FACE_IMAGE hImage,
        ID3_TRACKED_FACE_LIST hTrackedFaceList)

Parameters

> `hFaceTracker` ID3_FACE_TRACKER
> in Handle to the FaceTracker object.
> `hImage` ID3_FACE_IMAGE
> in Source image to process.
> `hTrackedFaceList` ID3_TRACKED_FACE_LIST
> in List of tracked faces.

Returns

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