Eye glasses Detection

ErrorCode Trueface::SDK::detectGlasses(const FaceBoxAndLandmarks &faceBoxAndLandmarks, GlassesLabel &result, float &glassesScore)

Detect whether the face in the image is wearing any type of eye glasses or not

Parameters
  • faceBoxAndLandmarks[in] FaceBoxAndLandmarks returned by detectFaces() or detectLargestFace().

  • result[out] The predicted GlassesLabel for face image.

  • glassesScore[out] The glasses score for this image. This can be used for setting custom thresholds that work better for the use case. By default, we use a glasses score greater than 0.0 to determine that glasses were detected.

Returns

error code, see ErrorCode.

enum Trueface::GlassesLabel

Results from eye glasses detection

Values:

enumerator GLASSES

There are glasses on the face

enumerator NO_GLASSES

There are no glasses on the face