java.lang.Object | |
↳ | android.hardware.Camera.Face |
Information about a face identified through camera face detection.
When face detection is used with a camera, the Camera.FaceDetectionListener
returns a
list of face objects for use in focusing and metering.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
id | An unique id per face while the face is visible to the tracker. | ||||||||||
leftEye | The coordinates of the center of the left eye. | ||||||||||
mouth | The coordinates of the center of the mouth. | ||||||||||
rect | Bounds of the face. | ||||||||||
rightEye | The coordinates of the center of the right eye. | ||||||||||
score | The confidence level for the detection of the face. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create an empty face.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
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 not supported, id will always be set to -1. The optional fields are supported as a set. Either they are all valid, or none of them are.
The coordinates of the center of the left eye. The coordinates are in
the same space as the ones for rect
. This is an optional
field, may not be supported on all devices. If not supported, the
value will always be set to null. The optional fields are supported
as a set. Either they are all valid, or none of them are.
The coordinates of the center of the mouth. The coordinates are in
the same space as the ones for rect
. This is an optional
field, may not be supported on all devices. If not supported, the
value will always be set to null. The optional fields are supported
as a set. Either they are all valid, or none of them are.
Bounds of the face. (-1000, -1000) represents the top-left of the camera field of view, and (1000, 1000) represents the bottom-right of the field of view. For example, suppose the size of the viewfinder UI is 800x480. The rect passed from the driver is (-1000, -1000, 0, 0). The corresponding viewfinder rect should be (0, 0, 400, 240). The width and height of the rect will not be 0 or negative. The coordinates can be smaller than -1000 or bigger than 1000. But at least one vertex will be within (-1000, -1000) and (1000, 1000).
The direction is relative to the sensor orientation, that is, what
the sensor sees. The direction is not affected by the rotation or
mirroring of setDisplayOrientation(int)
.
The coordinates of the center of the right eye. The coordinates are
in the same space as the ones for rect
.This is an optional
field, may not be supported on all devices. If not supported, the
value will always be set to null. The optional fields are supported
as a set. Either they are all valid, or none of them are.
The confidence level for the detection of the face. The range is 1 to 100. 100 is the highest confidence.