java.lang.Object | |
↳ | android.hardware.camera2.params.Face |
Describes a face detected in an image.
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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Bounds of the face.
| |||||||||||
An unique id per face while the face is visible to the tracker.
| |||||||||||
The coordinates of the center of the left eye.
| |||||||||||
The coordinates of the center of the mouth.
| |||||||||||
The coordinates of the center of the right eye.
| |||||||||||
The confidence level for the detection of the face.
| |||||||||||
Represent the Face as a string for debugging purposes.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The ID is -1
when the optional set of fields is unsupported.
The maximum possible value for the confidence level.
The minimum possible value for the confidence level.
Bounds of the face.
A rectangle relative to the sensor's
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
.
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 STATISTICS_FACE_DETECT_MODE
as
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
.
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
.
null
if unknown.
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
.
null
if unknown.
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
.
null
if unknown.
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.
Represent the Face as a string for debugging purposes.