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

# FaceAnalyser.computeEyeGaze Method

Module: FaceAnalyser

## Definition

Computes the eye gaze of a detected face.

Important

Loading the `EyeGazeEstimator` model is required to use this function.

Python

    compute_eye_gaze(self, image: Image, detected_face: DetectedFace, landmarks: PointList) -> EyeGaze

Parameters

> `image` Image
> in Source image to process.
> `detected_face` DetectedFace
> in Detected face to process.
> `landmarks` PointList
> in Estimated landmarks of the detected face. Must be computed with the face analyser.

Returns

> EyeGaze
> The estimated gaze of left and right eyes of the detected face.

Exceptions

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

Dart

    EyeGaze computeEyeGaze(Image image, DetectedFace detectedFace, PointList landmarks)

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.
> `landmarks` PointList
> in Estimated landmarks of the detected face. Must be computed with the face analyser.

Returns

> EyeGaze
> The estimated gaze of left and right eyes of the detected face.

Exceptions

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

C#

    public EyeGaze ComputeEyeGaze(Image image, DetectedFace detectedFace, PointList landmarks)

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.
> `landmarks` PointList
> in Estimated landmarks of the detected face. Must be computed with the face analyser.

Returns

> EyeGaze
> The estimated gaze of left and right eyes of the detected face.

Exceptions

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

Java

    public EyeGaze computeEyeGaze(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.
> `landmarks` PointList
> in Estimated landmarks of the detected face. Must be computed with the face analyser.

Returns

> EyeGaze
> The estimated gaze of left and right eyes of the detected face.

Exceptions

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

Swift

    public func computeEyeGaze(image: Image, detectedFace: DetectedFace, landmarks: PointList) throws -> EyeGaze

Parameters

> `image` Image
> in Source image to process.
> `detectedFace` DetectedFace
> in Detected face to process.
> `landmarks` PointList
> in Estimated landmarks of the detected face. Must be computed with the face analyser.

Returns

> EyeGaze
> The estimated gaze of left and right eyes of the detected face.

Exceptions

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

C

    int id3FaceAnalyser_ComputeEyeGaze (
        ID3_FACE_ANALYSER hFaceAnalyser,
        ID3_FACE_IMAGE hImage,
        ID3_DETECTED_FACE hDetectedFace,
        ID3_FACE_POINT_LIST hLandmarks,
        id3FaceEyeGaze * sEyeGaze)

Parameters

> `hFaceAnalyser` ID3_FACE_ANALYSER
> in Handle to the FaceAnalyser object.
> `hImage` ID3_FACE_IMAGE
> in Source image to process.
> `hDetectedFace` ID3_DETECTED_FACE
> in Detected face to process.
> `hLandmarks` ID3_FACE_POINT_LIST
> in Estimated landmarks of the detected face. Must be computed with the face analyser.
> `sEyeGaze` id3FaceEyeGaze *
> out The estimated gaze of left and right eyes of the detected face.

Returns

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