computeDepthBasedScore method
- Image image,
- DetectedFace detectedFace
Computes the PAD score of a detected face using a depth map image.
A high score means a high probability for the face to be bona-fide, hence not an attack.
The minimum recommended value is 10.
Important: Loading the FaceDepthBasedPad model is required to use this function.
param image Source image to process. Must be Grayscale 16 Bits. param detectedFace Detected face to process. return The computed PAD score, in the range (0;100). throws FaceException An error has occurred during Face Library execution.
Implementation
int computeDepthBasedScore(Image image, DetectedFace detectedFace) {
Pointer<Int> pScore = calloc();
try {
var err = faceSDK.id3FacePad_ComputeDepthBasedScore(_pHandle.value, image.handle, detectedFace.handle, pScore);
if (err != FaceError.success.value) {
throw FaceException(err);
}
final vScore = pScore.value;
return vScore;
} finally {
calloc.free(pScore);
}
}