computeEyeGaze method
- Image image,
- DetectedFace detectedFace,
- PointList landmarks
Computes the eye gaze of a detected face.
Important: Loading the EyeGazeEstimator model is required to use this function.
param image Source image to process. param detectedFace Detected face to process. param landmarks Estimated landmarks of the detected face. Must be computed with the face analyser. return The estimated gaze of left and right eyes of the detected face. throws FaceException An error has occurred during Face Library execution.
Implementation
EyeGaze computeEyeGaze(Image image, DetectedFace detectedFace, PointList landmarks) {
Pointer<id3FaceEyeGaze> pEyeGaze = calloc();
var err = faceSDK.id3FaceAnalyser_ComputeEyeGaze(_pHandle.value, image.handle, detectedFace.handle, landmarks.handle, pEyeGaze);
if (err != FaceError.success.value) {
calloc.free(pEyeGaze);
throw FaceException(err);
}
return EyeGaze(pEyeGaze);
}