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 |
getMidPoint(point: PointF!)Sets the position of the mid-point between the eyes. |
| open Float |
Returns the face's pose. |
Constants
CONFIDENCE_THRESHOLD
static val CONFIDENCE_THRESHOLD: Float
The minimum confidence factor of good face recognition
Value: 0.4fPublic methods
confidence
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
open fun eyesDistance(): Float
Returns the distance between the eyes.
getMidPoint
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
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 |