public final class FaceAnnotation extends GeneratedMessageV3 implements FaceAnnotationOrBuilder
A face annotation object contains the results of face detection.
Protobuf type google.cloud.vision.v1p2beta1.FaceAnnotation
Static Fields
ANGER_LIKELIHOOD_FIELD_NUMBER
public static final int ANGER_LIKELIHOOD_FIELD_NUMBER
Field Value
BLURRED_LIKELIHOOD_FIELD_NUMBER
public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER
Field Value
BOUNDING_POLY_FIELD_NUMBER
public static final int BOUNDING_POLY_FIELD_NUMBER
Field Value
DETECTION_CONFIDENCE_FIELD_NUMBER
public static final int DETECTION_CONFIDENCE_FIELD_NUMBER
Field Value
FD_BOUNDING_POLY_FIELD_NUMBER
public static final int FD_BOUNDING_POLY_FIELD_NUMBER
Field Value
HEADWEAR_LIKELIHOOD_FIELD_NUMBER
public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER
Field Value
JOY_LIKELIHOOD_FIELD_NUMBER
public static final int JOY_LIKELIHOOD_FIELD_NUMBER
Field Value
LANDMARKING_CONFIDENCE_FIELD_NUMBER
public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER
Field Value
LANDMARKS_FIELD_NUMBER
public static final int LANDMARKS_FIELD_NUMBER
Field Value
PAN_ANGLE_FIELD_NUMBER
public static final int PAN_ANGLE_FIELD_NUMBER
Field Value
ROLL_ANGLE_FIELD_NUMBER
public static final int ROLL_ANGLE_FIELD_NUMBER
Field Value
SORROW_LIKELIHOOD_FIELD_NUMBER
public static final int SORROW_LIKELIHOOD_FIELD_NUMBER
Field Value
SURPRISE_LIKELIHOOD_FIELD_NUMBER
public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER
Field Value
TILT_ANGLE_FIELD_NUMBER
public static final int TILT_ANGLE_FIELD_NUMBER
Field Value
UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER
public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static FaceAnnotation getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static FaceAnnotation.Builder newBuilder()
Returns
newBuilder(FaceAnnotation prototype)
public static FaceAnnotation.Builder newBuilder(FaceAnnotation prototype)
Parameter
Returns
public static FaceAnnotation parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static FaceAnnotation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static FaceAnnotation parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static FaceAnnotation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static FaceAnnotation parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static FaceAnnotation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static FaceAnnotation parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static FaceAnnotation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static FaceAnnotation parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static FaceAnnotation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static FaceAnnotation parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static FaceAnnotation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<FaceAnnotation> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getAngerLikelihood()
public Likelihood getAngerLikelihood()
Anger likelihood.
.google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11;
Returns
getAngerLikelihoodValue()
public int getAngerLikelihoodValue()
Anger likelihood.
.google.cloud.vision.v1p2beta1.Likelihood anger_likelihood = 11;
Returns
Type | Description |
int | The enum numeric value on the wire for angerLikelihood.
|
getBlurredLikelihood()
public Likelihood getBlurredLikelihood()
Blurred likelihood.
.google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14;
Returns
getBlurredLikelihoodValue()
public int getBlurredLikelihoodValue()
Blurred likelihood.
.google.cloud.vision.v1p2beta1.Likelihood blurred_likelihood = 14;
Returns
Type | Description |
int | The enum numeric value on the wire for blurredLikelihood.
|
getBoundingPoly()
public BoundingPoly getBoundingPoly()
The bounding polygon around the face. The coordinates of the bounding box
are in the original image's scale, as returned in ImageParams
.
The bounding box is computed to "frame" the face in accordance with human
expectations. It is based on the landmarker results.
Note that one or more x and/or y coordinates may not be generated in the
BoundingPoly
(the polygon will be unbounded) if only a partial face
appears in the image to be annotated.
.google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1;
Returns
getBoundingPolyOrBuilder()
public BoundingPolyOrBuilder getBoundingPolyOrBuilder()
The bounding polygon around the face. The coordinates of the bounding box
are in the original image's scale, as returned in ImageParams
.
The bounding box is computed to "frame" the face in accordance with human
expectations. It is based on the landmarker results.
Note that one or more x and/or y coordinates may not be generated in the
BoundingPoly
(the polygon will be unbounded) if only a partial face
appears in the image to be annotated.
.google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1;
Returns
getDefaultInstanceForType()
public FaceAnnotation getDefaultInstanceForType()
Returns
getDetectionConfidence()
public float getDetectionConfidence()
Detection confidence. Range [0, 1].
float detection_confidence = 7;
Returns
Type | Description |
float | The detectionConfidence.
|
getFdBoundingPoly()
public BoundingPoly getFdBoundingPoly()
The fd_bounding_poly
bounding polygon is tighter than the
boundingPoly
, and encloses only the skin part of the face. Typically, it
is used to eliminate the face from any image analysis that detects the
"amount of skin" visible in an image. It is not based on the
landmarker results, only on the initial face detection, hence
the <code>fd</code> (face detection) prefix.
.google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2;
Returns
getFdBoundingPolyOrBuilder()
public BoundingPolyOrBuilder getFdBoundingPolyOrBuilder()
The fd_bounding_poly
bounding polygon is tighter than the
boundingPoly
, and encloses only the skin part of the face. Typically, it
is used to eliminate the face from any image analysis that detects the
"amount of skin" visible in an image. It is not based on the
landmarker results, only on the initial face detection, hence
the <code>fd</code> (face detection) prefix.
.google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2;
Returns
getHeadwearLikelihood()
public Likelihood getHeadwearLikelihood()
Headwear likelihood.
.google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15;
Returns
getHeadwearLikelihoodValue()
public int getHeadwearLikelihoodValue()
Headwear likelihood.
.google.cloud.vision.v1p2beta1.Likelihood headwear_likelihood = 15;
Returns
Type | Description |
int | The enum numeric value on the wire for headwearLikelihood.
|
getJoyLikelihood()
public Likelihood getJoyLikelihood()
Joy likelihood.
.google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9;
Returns
getJoyLikelihoodValue()
public int getJoyLikelihoodValue()
Joy likelihood.
.google.cloud.vision.v1p2beta1.Likelihood joy_likelihood = 9;
Returns
Type | Description |
int | The enum numeric value on the wire for joyLikelihood.
|
getLandmarkingConfidence()
public float getLandmarkingConfidence()
Face landmarking confidence. Range [0, 1].
float landmarking_confidence = 8;
Returns
Type | Description |
float | The landmarkingConfidence.
|
getLandmarks(int index)
public FaceAnnotation.Landmark getLandmarks(int index)
Detected face landmarks.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3;
Parameter
Returns
getLandmarksCount()
public int getLandmarksCount()
Detected face landmarks.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3;
Returns
getLandmarksList()
public List<FaceAnnotation.Landmark> getLandmarksList()
Detected face landmarks.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3;
Returns
getLandmarksOrBuilder(int index)
public FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder(int index)
Detected face landmarks.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3;
Parameter
Returns
getLandmarksOrBuilderList()
public List<? extends FaceAnnotation.LandmarkOrBuilder> getLandmarksOrBuilderList()
Detected face landmarks.
repeated .google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark landmarks = 3;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder> | |
getPanAngle()
public float getPanAngle()
Yaw angle, which indicates the leftward/rightward angle that the face is
pointing relative to the vertical plane perpendicular to the image. Range
[-180,180].
float pan_angle = 5;
Returns
Type | Description |
float | The panAngle.
|
getParserForType()
public Parser<FaceAnnotation> getParserForType()
Returns
Overrides
getRollAngle()
public float getRollAngle()
Roll angle, which indicates the amount of clockwise/anti-clockwise rotation
of the face relative to the image vertical about the axis perpendicular to
the face. Range [-180,180].
float roll_angle = 4;
Returns
Type | Description |
float | The rollAngle.
|
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getSorrowLikelihood()
public Likelihood getSorrowLikelihood()
Sorrow likelihood.
.google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10;
Returns
getSorrowLikelihoodValue()
public int getSorrowLikelihoodValue()
Sorrow likelihood.
.google.cloud.vision.v1p2beta1.Likelihood sorrow_likelihood = 10;
Returns
Type | Description |
int | The enum numeric value on the wire for sorrowLikelihood.
|
getSurpriseLikelihood()
public Likelihood getSurpriseLikelihood()
Surprise likelihood.
.google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12;
Returns
getSurpriseLikelihoodValue()
public int getSurpriseLikelihoodValue()
Surprise likelihood.
.google.cloud.vision.v1p2beta1.Likelihood surprise_likelihood = 12;
Returns
Type | Description |
int | The enum numeric value on the wire for surpriseLikelihood.
|
getTiltAngle()
public float getTiltAngle()
Pitch angle, which indicates the upwards/downwards angle that the face is
pointing relative to the image's horizontal plane. Range [-180,180].
float tilt_angle = 6;
Returns
Type | Description |
float | The tiltAngle.
|
getUnderExposedLikelihood()
public Likelihood getUnderExposedLikelihood()
Under-exposed likelihood.
.google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13;
Returns
Type | Description |
Likelihood | The underExposedLikelihood.
|
getUnderExposedLikelihoodValue()
public int getUnderExposedLikelihoodValue()
Under-exposed likelihood.
.google.cloud.vision.v1p2beta1.Likelihood under_exposed_likelihood = 13;
Returns
Type | Description |
int | The enum numeric value on the wire for underExposedLikelihood.
|
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hasBoundingPoly()
public boolean hasBoundingPoly()
The bounding polygon around the face. The coordinates of the bounding box
are in the original image's scale, as returned in ImageParams
.
The bounding box is computed to "frame" the face in accordance with human
expectations. It is based on the landmarker results.
Note that one or more x and/or y coordinates may not be generated in the
BoundingPoly
(the polygon will be unbounded) if only a partial face
appears in the image to be annotated.
.google.cloud.vision.v1p2beta1.BoundingPoly bounding_poly = 1;
Returns
Type | Description |
boolean | Whether the boundingPoly field is set.
|
hasFdBoundingPoly()
public boolean hasFdBoundingPoly()
The fd_bounding_poly
bounding polygon is tighter than the
boundingPoly
, and encloses only the skin part of the face. Typically, it
is used to eliminate the face from any image analysis that detects the
"amount of skin" visible in an image. It is not based on the
landmarker results, only on the initial face detection, hence
the <code>fd</code> (face detection) prefix.
.google.cloud.vision.v1p2beta1.BoundingPoly fd_bounding_poly = 2;
Returns
Type | Description |
boolean | Whether the fdBoundingPoly field is set.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public FaceAnnotation.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected FaceAnnotation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public FaceAnnotation.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions