detectFaces method

DetectedFaceList detectFaces(
  1. Image image
)

Detects faces in an image and store their info in a DetectedFaceList object. Note: The algorithm searches for faces in the range (16px;512px). If the image is too large to fit this range, one must resize it before the detection process. Important: Loading a FaceDetector model is required to use this function.

param image Source image to process. return The list of detected faces. throws FaceException An error has occurred during Face Library execution.

Implementation

DetectedFaceList detectFaces(Image image) {
  DetectedFaceList detectedFaceList = DetectedFaceList();
  var err = faceSDK.id3FaceDetector_DetectFaces(_pHandle.value, image.handle, detectedFaceList.handle);
  if (err != FaceError.success.value) {
    detectedFaceList.dispose();
    throw FaceException(err);
  }
  return detectedFaceList;
}