updatePortrait method

void updatePortrait(
  1. Portrait portrait,
  2. Image image
)

Analyses an image and updates the specified portrait with the first detected face or the currently tracked face. This method performs the following tasks:

  • Face detection and tracking with prediction models
  • Landmark detection (68 points)
  • Head pose estimation
  • Verification of subject position
  • Template encoding and updating
  • Geometric attributes computation
  • Unified quality score computation Important: This method requires the FaceDetector, FaceEncoder, FaceLandmarksEstimator and FacePoseEstimator models to be loaded.

param portrait The portrait to be updated. param image The source image. throws FaceException An error has occurred during Face Library execution.

Implementation

void updatePortrait(Portrait portrait, Image image) {
  var err = faceSDK.id3FacePortraitProcessor_UpdatePortrait(_pHandle.value, portrait.handle, image.handle);
  if (err != FaceError.success.value) {
    throw FaceException(err);
  }
}