Skip to content

Most visited

Recently visited

navigation

FaceDetector.Face

public class FaceDetector.Face
extends Object

java.lang.Object
   ↳ android.media.FaceDetector.Face


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

Summary

Constants

float CONFIDENCE_THRESHOLD

The minimum confidence factor of good face recognition

int EULER_X

The x-axis Euler angle of a face.

int EULER_Y

The y-axis Euler angle of a face.

int EULER_Z

The z-axis Euler angle of a face.

Public methods

float confidence()

Returns a confidence factor between 0 and 1.

float eyesDistance()

Returns the distance between the eyes.

void getMidPoint(PointF point)

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

float pose(int euler)

Returns the face's pose.

Inherited methods

From class java.lang.Object

Constants

CONFIDENCE_THRESHOLD

Added in API level 1
float CONFIDENCE_THRESHOLD

The minimum confidence factor of good face recognition

Constant Value: 0.4

EULER_X

Added in API level 1
int EULER_X

The x-axis Euler angle of a face.

Constant Value: 0 (0x00000000)

EULER_Y

Added in API level 1
int EULER_Y

The y-axis Euler angle of a face.

Constant Value: 1 (0x00000001)

EULER_Z

Added in API level 1
int EULER_Z

The z-axis Euler angle of a face.

Constant Value: 2 (0x00000002)

Public methods

confidence

Added in API level 1
float confidence ()

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.

Returns
float

eyesDistance

Added in API level 1
float eyesDistance ()

Returns the distance between the eyes.

Returns
float

getMidPoint

Added in API level 1
void getMidPoint (PointF point)

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
float pose (int euler)

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)
Returns
float the Euler angle of the of the face, for the given axis
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.