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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

CONFIDENCE_THRESHOLD

Added in API level 1
public static final float CONFIDENCE_THRESHOLD

The minimum confidence factor of good face recognition

Constant Value: 0.4

EULER_X

Added in API level 1
public static final int EULER_X

The x-axis Euler angle of a face.

Constant Value: 0 (0x00000000)

EULER_Y

Added in API level 1
public static final int EULER_Y

The y-axis Euler angle of a face.

Constant Value: 1 (0x00000001)

EULER_Z

Added in API level 1
public static final int EULER_Z

The z-axis Euler angle of a face.

Constant Value: 2 (0x00000002)

Public methods

confidence

Added in API level 1
public 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
public float eyesDistance ()

Returns the distance between the eyes.

Returns
float

getMidPoint

Added in API level 1
public 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
public 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