FaceAnalyser.computeEyeRedness Method

Module: FaceAnalyser

Definition

Computes the eye redness of a detected face.

The maximum recommanded value for an ICAO-compliant portrait is 10.

Important

Loading the EyeRednessDetector1A model is required to use this function.

compute_eye_redness(self, image: Image, detected_face: DetectedFace, landmarks: PointList) -> List[int]

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

List[int]
The estimated redness scores of left and right eyes of the detected face in this order.

Exceptions

An error has occurred during Face Library execution.
List<int> computeEyeRedness(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

List<int>
The estimated redness scores of left and right eyes of the detected face in this order.

Exceptions

An error has occurred during Face Library execution.
public int[] ComputeEyeRedness(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

int[]
The estimated redness scores of left and right eyes of the detected face in this order.

Exceptions

An error has occurred during Face Library execution.
public int[] computeEyeRedness(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

int[]
The estimated redness scores of left and right eyes of the detected face in this order.

Exceptions

An error has occurred during Face Library execution.
public func computeEyeRedness(image: Image, detectedFace: DetectedFace, landmarks: PointList) throws -> [Int32]

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

[Int]
The estimated redness scores of left and right eyes of the detected face in this order.

Exceptions

An error has occurred during Face Library execution.
int id3FaceAnalyser_ComputeEyeRedness (
    ID3_FACE_ANALYSER hFaceAnalyser,
    ID3_FACE_IMAGE hImage,
    ID3_DETECTED_FACE hDetectedFace,
    ID3_FACE_POINT_LIST hLandmarks,
    int * eyeRednessScores,
    int * eyeRednessScoresSize)

Parameters

hFaceAnalyser ID3_FACE_ANALYSER
in Handle to the FaceAnalyser object.

in Source image to process.

hDetectedFace ID3_DETECTED_FACE
in Detected face to process.

in Estimated landmarks of the detected face. Must be computed with the face analyser.

eyeRednessScores int *
out The estimated redness scores of left and right eyes of the detected face in this order.

eyeRednessScoresSize int *
in Size of the ‘eyeRednessScores’ buffer. Receives the number of elements in the ‘eyeRednessScores’ array.

Returns

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