Added in API level 1

Face


open class Face
kotlin.Any
   ↳ android.media.FaceDetector.Face

A Face contains all the information identifying the location of a face in a bitmap.

Summary

Constants
static Float

The minimum confidence factor of good face recognition

static Int

The x-axis Euler angle of a face.

static Int

The y-axis Euler angle of a face.

static Int

The z-axis Euler angle of a face.

Public methods
open Float

Returns a confidence factor between 0 and 1.

open Float

Returns the distance between the eyes.

open Unit

Sets the position of the mid-point between the eyes.

open Float
pose(euler: Int)

Returns the face's pose.

Constants

CONFIDENCE_THRESHOLD

Added in API level 1
static val CONFIDENCE_THRESHOLD: Float

The minimum confidence factor of good face recognition

Value: 0.4f

EULER_X

Added in API level 1
static val EULER_X: Int

The x-axis Euler angle of a face.

Value: 0

EULER_Y

Added in API level 1
static val EULER_Y: Int

The y-axis Euler angle of a face.

Value: 1

EULER_Z

Added in API level 1
static val EULER_Z: Int

The z-axis Euler angle of a face.

Value: 2

Public methods

confidence

Added in API level 1
open fun confidence(): Float

Returns a confidence factor between 0 and 1. This indicates how certain what has been found is actually a face. A confidence factor above 0.3 is usually good enough.

eyesDistance

Added in API level 1
open fun eyesDistance(): Float

Returns the distance between the eyes.

getMidPoint

Added in API level 1
open fun getMidPoint(point: PointF!): Unit

Sets the position of the mid-point between the eyes.

Parameters
point PointF!: the PointF coordinates (float values) of the face's mid-point

pose

Added in API level 1
open fun pose(euler: Int): Float

Returns the face's pose. That is, the rotations around either the X, Y or Z axis (the positions in 3-dimensional Euclidean space).

Parameters
euler Int: the Euler axis to retrieve an angle from (EULER_X, EULER_Y or EULER_Z)
Return
Float the Euler angle of the of the face, for the given axis