detectOcclusions method
- Image image,
- DetectedFace detectedFace
Detects occlusions on the subject's face.
Important: This function requires the FaceOcclusionDetector model to be loaded.
param image Source image to process. param detectedFace Detected face to process. return The occlusion scores of the detected face. throws FaceException An error has occurred during Face Library execution.
Implementation
FaceOcclusionScores detectOcclusions(Image image, DetectedFace detectedFace) {
Pointer<id3FaceOcclusionScores> pScores = calloc();
var err = faceSDK.id3FaceAnalyser_DetectOcclusions(_pHandle.value, image.handle, detectedFace.handle, pScores);
if (err != FaceError.success.value) {
calloc.free(pScores);
throw FaceException(err);
}
return FaceOcclusionScores(pScores);
}