FaceAnalyser.computeEyeOpenness Method¶
Module: FaceAnalyser
Definition¶
Computes the eye openness of a detected face.
The minimum recommanded value for is 90.
Important
Loading the EyeOpennessDetector1A model is required to use this function.
compute_eye_openness(self, image: Image, detected_face: DetectedFace, landmarks: PointList) -> List[int]
Parameters
image
Imagein Source image to process.detected_face
DetectedFacein Detected face to process.landmarks
PointListin Estimated landmarks of the detected face. Must be computed with the face analyser.
Returns
List[int]
The estimated openness scores of left and right eyes of the detected face in this order.
Exceptions
An error has occurred during Face Library execution.
List<int> computeEyeOpenness(Image image, DetectedFace detectedFace, PointList landmarks)
Parameters
image
Imagein Source image to process.detectedFace
DetectedFacein Detected face to process.landmarks
PointListin Estimated landmarks of the detected face. Must be computed with the face analyser.
Returns
List<int>
The estimated openness scores of left and right eyes of the detected face in this order.
Exceptions
An error has occurred during Face Library execution.
public int[] ComputeEyeOpenness(Image image, DetectedFace detectedFace, PointList landmarks)
Parameters
image
Imagein Source image to process.detectedFace
DetectedFacein Detected face to process.landmarks
PointListin Estimated landmarks of the detected face. Must be computed with the face analyser.
Returns
int[]
The estimated openness scores of left and right eyes of the detected face in this order.
Exceptions
An error has occurred during Face Library execution.
public int[] computeEyeOpenness(Image image, DetectedFace detectedFace, PointList landmarks) throws FaceException
Parameters
image
Imagein Source image to process.detectedFace
DetectedFacein Detected face to process.landmarks
PointListin Estimated landmarks of the detected face. Must be computed with the face analyser.
Returns
int[]
The estimated openness scores of left and right eyes of the detected face in this order.
Exceptions
An error has occurred during Face Library execution.
public func computeEyeOpenness(image: Image, detectedFace: DetectedFace, landmarks: PointList) throws -> [Int32]
Parameters
image
Imagein Source image to process.detectedFace
DetectedFacein Detected face to process.landmarks
PointListin Estimated landmarks of the detected face. Must be computed with the face analyser.
Returns
[Int]
The estimated openness scores of left and right eyes of the detected face in this order.
Exceptions
An error has occurred during Face Library execution.
int id3FaceAnalyser_ComputeEyeOpenness (
ID3_FACE_ANALYSER hFaceAnalyser,
ID3_FACE_IMAGE hImage,
ID3_DETECTED_FACE hDetectedFace,
ID3_FACE_POINT_LIST hLandmarks,
int * eyeOpennessScores,
int * eyeOpennessScoresSize)
Parameters
hFaceAnalyser
ID3_FACE_ANALYSERin Handle to the FaceAnalyser object.hImage
ID3_FACE_IMAGEin Source image to process.hDetectedFace
ID3_DETECTED_FACEin Detected face to process.hLandmarks
ID3_FACE_POINT_LISTin Estimated landmarks of the detected face. Must be computed with the face analyser.eyeOpennessScores
int *out The estimated openness scores of left and right eyes of the detected face in this order.eyeOpennessScoresSize
int *in Size of the ‘eyeOpennessScores’ buffer. Receives the number of elements in the ‘eyeOpennessScores’ array.
Returns