java.lang.Object | |
↳ | com.google.android.gms.vision.face.Face |
A human face detected in an image or video.
It is important to note that all fields described here are with regards to the image that the detector has processed. Many live apps that process images directly from the camera show the user a mirrored display of the actual image.
All coordinate values are reported as absolute image coordinates. That is, image position (0, 0) represents the upper-left corner of the image.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float | UNCOMPUTED_PROBABILITY | The value that a probability is set to if it was not computed. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the rotation of the face about the vertical axis of the image.
| |||||||||||
Returns the rotation of the face about the axis pointing out of the image.
| |||||||||||
Returns the height of the face region in pixels.
| |||||||||||
Returns the face ID.
| |||||||||||
Returns a value between 0.0 and 1.0 giving a probability that the face's left eye is open.
| |||||||||||
Returns a value between 0.0 and 1.0 giving a probability that the face's right eye is open.
| |||||||||||
Returns a value between 0.0 and 1.0 giving a probability that the face is smiling.
| |||||||||||
Returns a list of
Landmarks (eyes, nose, etc.) found on the face.
| |||||||||||
Returns the top left position of the face within the image.
| |||||||||||
Returns the width of the face region in pixels.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The value that a probability is set to if it was not computed.
Returns the rotation of the face about the vertical axis of the image. Positive euler y is when the face turns toward the right side of the of the image that is being processed.
Returns the rotation of the face about the axis pointing out of the image. Positive euler z is a counter-clockwise rotation within the image plane.
Returns the height of the face region in pixels. This is a rough estimate that is likely to be slightly larger than the exact bounds of the face and therefore may include some background.
Returns a value between 0.0 and 1.0 giving a probability that the face's left eye is open.
This returns UNCOMPUTED_PROBABILITY
if the probability was not computed. The
probability is not computed if eye open classification is not enabled via
setClassificationType(int)
or the LEFT_EYE
landmark
was not found.
Returns a value between 0.0 and 1.0 giving a probability that the face's right eye is open.
This returns UNCOMPUTED_PROBABILITY
if the probability was not computed. The
probability is not computed if eye open classification is not enabled via
setClassificationType(int)
or the RIGHT_EYE
landmark
was not found.
Returns a value between 0.0 and 1.0 giving a probability that the face is smiling.
This returns UNCOMPUTED_PROBABILITY
if the probability was not computed. The
probability is not computed if smile classification is not enabled via
setClassificationType(int)
or the required landmarks are not found.
The LEFT_MOUTH
, RIGHT_MOUTH
, and NOSE_BASE
landmarks are required to compute a smile probability.
Returns a list of Landmarks
(eyes, nose, etc.) found on the face.
A landmark detector must be specified via setLandmarkType(int)
to
detect landmarks. The landmark detector may not find all possible landmarks on any given
face.
Returns the width of the face region in pixels. This is a rough estimate that is likely to be slightly larger than the exact bounds of the face and therefore may include some background.