Class Face¶
- java.lang.Object
-
- com.iristick.smartglass.support.camera2.params.Face
com.iristick.smartglass.core.camera
package instead.@Deprecated public abstract class Face extends Object
- Since:
- Android API level 21
Field Summary¶
Modifier and Type | Field and Description |
---|---|
static int |
ID_UNSUPPORTED
Deprecated.
The ID is
-1 when the optional set of fields is unsupported. |
static int |
SCORE_MAX
Deprecated.
The maximum possible value for the confidence level.
|
static int |
SCORE_MIN
Deprecated.
The minimum possible value for the confidence level.
|
Constructor Summary¶
Constructor and Description |
---|
Face()
Deprecated.
|
Method Summary¶
Modifier and Type | Method and Description |
---|---|
abstract Rect |
getBounds()
Deprecated.
Bounds of the face.
|
abstract int |
getId()
Deprecated.
An unique id per face while the face is visible to the tracker.
|
abstract Point |
getLeftEyePosition()
Deprecated.
The coordinates of the center of the left eye.
|
abstract Point |
getMouthPosition()
Deprecated.
The coordinates of the center of the mouth.
|
abstract Point |
getRightEyePosition()
Deprecated.
The coordinates of the center of the right eye.
|
abstract int |
getScore()
Deprecated.
The confidence level for the detection of the face.
|
abstract String |
toString()
Deprecated.
Represent the Face as a string for debugging purposes.
|
Methods inherited from class java.lang.Object¶
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail¶
ID_UNSUPPORTED¶
public static final int ID_UNSUPPORTED
-1
when the optional set of fields is unsupported.- See Also:
getId()
SCORE_MIN¶
public static final int SCORE_MIN
- See Also:
getScore()
SCORE_MAX¶
public static final int SCORE_MAX
- See Also:
getScore()
Constructor Detail¶
Face¶
public Face()
Method Detail¶
getBounds¶
public abstract Rect getBounds()
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.
This method will never return null
. There are no other constraints.
- Returns:
- The bounds of the face.
getScore¶
public abstract int getScore()
The range is 1 to 100. 100 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 100 is recommended.
getId¶
public abstract int getId()
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 -1 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 -1.
This value will either be -1 or otherwise greater than 0
.
- Returns:
- The unique id.
- See Also:
ID_UNSUPPORTED
getLeftEyePosition¶
public abstract Point getLeftEyePosition()
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
-1.
- Returns:
- The left eye position, or
null
if unknown.
getRightEyePosition¶
public abstract Point getRightEyePosition()
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 -1.
- Returns:
- The right eye position, or
null
if unknown.
getMouthPosition¶
public abstract Point getMouthPosition()
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 -1.
- Returns:
- The mouth position, or
null
if unknown.
toString¶
public abstract String toString()