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

# FaceDetector.detectFaces Method

Module: FaceDetector

## Definition

Detects faces in an image and store their info in a DetectedFaceList object.

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.

Python

    detect_faces(self, image: Image) -> DetectedFaceList

Parameters

> `image` Image
> in Source image to process.

Returns

> DetectedFaceList
> The list of detected faces.

Exceptions

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

Dart

    DetectedFaceList detectFaces(Image image)

Parameters

> `image` Image
> in Source image to process.

Returns

> DetectedFaceList
> The list of detected faces.

Exceptions

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

C#

    public DetectedFaceList DetectFaces(Image image)

Parameters

> `image` Image
> in Source image to process.

Returns

> DetectedFaceList
> The list of detected faces.

Exceptions

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

Java

    public DetectedFaceList detectFaces(Image image) throws FaceException

Parameters

> `image` Image
> in Source image to process.

Returns

> DetectedFaceList
> The list of detected faces.

Exceptions

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

Swift

    public func detectFaces(image: Image) throws -> DetectedFaceList

Parameters

> `image` Image
> in Source image to process.

Returns

> DetectedFaceList
> The list of detected faces.

Exceptions

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

C

    int id3FaceDetector_DetectFaces (
        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
> out The list of detected faces.

Returns

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