computeAttributes method

FaceAttributes computeAttributes(
  1. Image image,
  2. DetectedFace detectedFace
)

Computes the attributes of a detected face. Important: Loading the model FaceAttributesClassifier is required to use this function.

param image Source image to process. param detectedFace Detected face to process. return The estimated attributes of the detected face. throws FaceException An error has occurred during Face Library execution.

Implementation

FaceAttributes computeAttributes(Image image, DetectedFace detectedFace) {
  Pointer<id3FaceAttributes> pAttributes = calloc();
  var err = faceSDK.id3FaceAnalyser_ComputeAttributes(_pHandle.value, image.handle, detectedFace.handle, pAttributes);
  if (err != FaceError.success.value) {
  	calloc.free(pAttributes);
  	throw FaceException(err);
  }
  return FaceAttributes(pAttributes);
}