extractRoi method

Image extractRoi(
  1. Rectangle bounds
)

Extracts a region of interest in the image according to the given bounds.

param bounds Bounds of the crop to extract. return The extracted region of interest. throws FaceException An error has occurred during Face Library execution.

Implementation

Image extractRoi(Rectangle bounds) {
  Image imageRoi = Image();
  var err = faceSDK.id3FaceImage_ExtractRoi(_pHandle.value, bounds.handle, imageRoi.handle);
  if (err != FaceError.success.value) {
    imageRoi.dispose();
    throw FaceException(err);
  }
  return imageRoi;
}