# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Methods | Inherited Methods

# Face

`public final class Face`
`extends Object` ``

java.lang.Object
↳ | android.hardware.camera2.params.Face

Describes a face detected in an image.

## Summary

### Constants
`int` | `ID_UNSUPPORTED` The ID is `-1` when the optional set of fields is unsupported.
`int` | `SCORE_MAX` The maximum possible value for the confidence level.
`int` | `SCORE_MIN` The minimum possible value for the confidence level.

### Public methods
`Rect` | `getBounds()` Bounds of the face.
`int` | `getId()` An unique id per face while the face is visible to the tracker.
`Point` | `getLeftEyePosition()` The coordinates of the center of the left eye.
`Point` | `getMouthPosition()` The coordinates of the center of the mouth.
`Point` | `getRightEyePosition()` The coordinates of the center of the right eye.
`int` | `getScore()` The confidence level for the detection of the face.
`String` | `toString()` Represent the Face as a string for debugging purposes.

### Inherited methods
From class `java.lang.Object`
`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 timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.

## Constants

### ID_UNSUPPORTED

    public static final int ID_UNSUPPORTED

The ID is `-1` when the optional set of fields is unsupported.

See also:

- `getId()`

Constant Value: -1 (0xffffffff)

### SCORE_MAX

    public static final int SCORE_MAX

The maximum possible value for the confidence level.

See also:

- `getScore()`

Constant Value: 100 (0x00000064)

### SCORE_MIN

    public static final int SCORE_MIN

The minimum possible value for the confidence level.

See also:

- `getScore()`

Constant Value: 1 (0x00000001)

## Public methods

### getBounds

    public Rect getBounds ()

Bounds of the face.

A rectangle relative to the sensor's `CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE`, with (0,0) representing the top-left corner of the active array rectangle.

There is no constraints on the the Rectangle value other than it is not-`null`.

Returns
`Rect` |

### getId

    public int getId ()

An unique id per face while the face is visible to the tracker.

If the face leaves the field-of-view and comes back, it will get a new id.

This is an optional field, may not be supported on all devices. If the id is `.ID_UNSUPPORTED` then the leftEyePosition, rightEyePosition, and mouthPositions are guaranteed to be `null`. Otherwise, each of leftEyePosition, rightEyePosition, and mouthPosition may be independently null or not-null. When devices report the value of key `CaptureResult#STATISTICS_FACE_DETECT_MODE` as `CameraMetadata#STATISTICS_FACE_DETECT_MODE_SIMPLE` in `CaptureResult`, the face id of each face is expected to be `.ID_UNSUPPORTED`.

This value will either be `.ID_UNSUPPORTED` or otherwise greater than `0`.

Returns
`int` |

See also:

- `ID_UNSUPPORTED`

### getLeftEyePosition

    public Point getLeftEyePosition ()

The coordinates of the center of the left eye.

The coordinates are in the same space as the ones for `getBounds()`. This is an optional field, may not be supported on all devices. If not supported, the value will always be set to null. This value will always be null only if `getId()` returns `.ID_UNSUPPORTED`.

Returns
`Point` | The left eye position, or `null` if unknown.

### getMouthPosition

    public Point getMouthPosition ()

The coordinates of the center of the mouth.

The coordinates are in the same space as the ones for `getBounds()`. This is an optional field, may not be supported on all devices. If not supported, the value will always be set to null. This value will always be null only if `getId()` returns `.ID_UNSUPPORTED`.

Returns
`Point` | The mouth position, or `null` if unknown.

### getRightEyePosition

    public Point getRightEyePosition ()

The coordinates of the center of the right eye.

The coordinates are in the same space as the ones for `getBounds()`.This is an optional field, may not be supported on all devices. If not supported, the value will always be set to null. This value will always be null only if `getId()` returns `.ID_UNSUPPORTED`.

Returns
`Point` | The right eye position, or `null` if unknown.

### getScore

    public int getScore ()

The confidence level for the detection of the face.

The range is `.SCORE_MIN` to `.SCORE_MAX`. `.SCORE_MAX` is the highest confidence.

Depending on the device, even very low-confidence faces may be listed, so applications should filter out faces with low confidence, depending on the use case. For a typical point-and-shoot camera application that wishes to display rectangles around detected faces, filtering out faces with confidence less than half of `.SCORE_MAX` is recommended.

Returns
`int` |

See also:

- `SCORE_MAX`
- `SCORE_MIN`

### toString

    public String toString ()

Represent the Face as a string for debugging purposes.

Returns
`String` | a string representation of the object.

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*