Face Image Quality

ErrorCode Trueface::SDK::estimateFaceImageQuality(const TFFacechip &tfFacechip, float &quality)

Estimate the quality of the face image for recognition, with a score of 1 indicating perfect quality. This method currently calls detectFaceImageBlur() behind the scene and converts the score to either 1 or 0. In the future, more metrics will be added internally in this function

Parameters
  • tfFacechip[in] The TFFacechip returned by extractAlignedFace().

  • quality[out] a value between 0 to 1. We suggest using a threshold of 0.5 as a filter for enrollment images.

Returns

error code, see ErrorCode.

ErrorCode Trueface::SDK::checkFaceImageExposure(const TFImage &tfImage, const FaceBoxAndLandmarks &faceBoxAndLandmarks, FaceImageQuality &result)

Determine if the image is over or under exposed, indicating suboptimal lighting conditions for face recognition. Refer to our FAQ page to understand the impact of image exposure on similarity score.

Parameters
  • tfImage[in] the input image returned by preprocessImage().

  • faceBoxAndLandmarks[in] the FaceBoxAndLandmarks of the face to analyze.

  • result[out] the FaceImageQuality output.

Returns

error code, see ErrorCode.

ErrorCode Trueface::SDK::detectFaceImageBlur(const TFFacechip &tfFacechip, FaceImageQuality &result)

Determine if the face image is blurry or is of good quality for face recognition. Refer to our FAQ page to understand the impact of face blur on similarity score.

Parameters
  • tfFacechip[in] The TFFacechip returned by extractAlignedFace().

  • result[out] the FaceImageQuality output.

Returns

error code, see ErrorCode.

enum Trueface::FaceImageQuality

Describes the quality of a face image to be used for face recognition.

Values:

enumerator GOOD

The quality of the image is good for face recognition.

enumerator UNDER_EXPOSED

The image is under exposed.

enumerator OVER_EXPOSED

The image is over exposed.

enumerator BLURRY

The image is blurry.