public final class FaceAnnotation extends GeneratedMessageV3 implements FaceAnnotationOrBuilder
A face annotation object contains the results of face detection.
Protobuf type google.cloud.vision.v1.FaceAnnotation
Static Fields
ANGER_LIKELIHOOD_FIELD_NUMBER
public static final int ANGER_LIKELIHOOD_FIELD_NUMBER
Field ValueBLURRED_LIKELIHOOD_FIELD_NUMBER
public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER
Field ValueBOUNDING_POLY_FIELD_NUMBER
public static final int BOUNDING_POLY_FIELD_NUMBER
Field ValueDETECTION_CONFIDENCE_FIELD_NUMBER
public static final int DETECTION_CONFIDENCE_FIELD_NUMBER
Field ValueFD_BOUNDING_POLY_FIELD_NUMBER
public static final int FD_BOUNDING_POLY_FIELD_NUMBER
Field ValueHEADWEAR_LIKELIHOOD_FIELD_NUMBER
public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER
Field ValueJOY_LIKELIHOOD_FIELD_NUMBER
public static final int JOY_LIKELIHOOD_FIELD_NUMBER
Field ValueLANDMARKING_CONFIDENCE_FIELD_NUMBER
public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER
Field ValueLANDMARKS_FIELD_NUMBER
public static final int LANDMARKS_FIELD_NUMBER
Field ValuePAN_ANGLE_FIELD_NUMBER
public static final int PAN_ANGLE_FIELD_NUMBER
Field ValueROLL_ANGLE_FIELD_NUMBER
public static final int ROLL_ANGLE_FIELD_NUMBER
Field ValueSORROW_LIKELIHOOD_FIELD_NUMBER
public static final int SORROW_LIKELIHOOD_FIELD_NUMBER
Field ValueSURPRISE_LIKELIHOOD_FIELD_NUMBER
public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER
Field ValueTILT_ANGLE_FIELD_NUMBER
public static final int TILT_ANGLE_FIELD_NUMBER
Field ValueUNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER
public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER
Field ValueStatic Methods
getDefaultInstance()
public static FaceAnnotation getDefaultInstance()
ReturnsgetDescriptor()
public static final Descriptors.Descriptor getDescriptor()
ReturnsnewBuilder()
public static FaceAnnotation.Builder newBuilder()
ReturnsnewBuilder(FaceAnnotation )
public static FaceAnnotation.Builder newBuilder(FaceAnnotation )
ParameterReturnspublic static FaceAnnotation parseDelimitedFrom(InputStream input)
ParameterReturnsExceptionspublic static FaceAnnotation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionsparseFrom(byte[] data)
public static FaceAnnotation parseFrom(byte[] data)
ParameterName | Description |
data | byte[]
|
ReturnsExceptionsparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static FaceAnnotation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionsparseFrom(ByteString data)
public static FaceAnnotation parseFrom(ByteString data)
ParameterReturnsExceptionsparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static FaceAnnotation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionspublic static FaceAnnotation parseFrom(CodedInputStream input)
ParameterReturnsExceptionspublic static FaceAnnotation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionspublic static FaceAnnotation parseFrom(InputStream input)
ParameterReturnsExceptionspublic static FaceAnnotation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionsparseFrom(ByteBuffer data)
public static FaceAnnotation parseFrom(ByteBuffer data)
ParameterReturnsExceptionsparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static FaceAnnotation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
ParametersReturnsExceptionsparser()
public static Parser<FaceAnnotation> parser()
ReturnsMethods
equals(Object obj)
public boolean equals(Object obj)
ParameterReturnsOverridesgetAngerLikelihood()
public Likelihood getAngerLikelihood()
Anger likelihood.
.google.cloud.vision.v1.Likelihood anger_likelihood = 11;
ReturnsgetAngerLikelihoodValue()
public int getAngerLikelihoodValue()
Anger likelihood.
.google.cloud.vision.v1.Likelihood anger_likelihood = 11;
ReturnsType | Description |
int | The enum numeric value on the wire for angerLikelihood. |
getBlurredLikelihood()
public Likelihood getBlurredLikelihood()
Blurred likelihood.
.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;
ReturnsgetBlurredLikelihoodValue()
public int getBlurredLikelihoodValue()
Blurred likelihood.
.google.cloud.vision.v1.Likelihood blurred_likelihood = 14;
ReturnsType | 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. 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.v1.BoundingPoly bounding_poly = 1;
ReturnsgetBoundingPolyOrBuilder()
public BoundingPolyOrBuilder getBoundingPolyOrBuilder()
The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. 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.v1.BoundingPoly bounding_poly = 1;
ReturnsgetDefaultInstanceForType()
public FaceAnnotation getDefaultInstanceForType()
ReturnsgetDetectionConfidence()
public float getDetectionConfidence()
Detection confidence. Range [0, 1].
float detection_confidence = 7;
ReturnsType | 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.v1.BoundingPoly fd_bounding_poly = 2;
ReturnsgetFdBoundingPolyOrBuilder()
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.v1.BoundingPoly fd_bounding_poly = 2;
ReturnsgetHeadwearLikelihood()
public Likelihood getHeadwearLikelihood()
Headwear likelihood.
.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;
ReturnsgetHeadwearLikelihoodValue()
public int getHeadwearLikelihoodValue()
Headwear likelihood.
.google.cloud.vision.v1.Likelihood headwear_likelihood = 15;
ReturnsType | Description |
int | The enum numeric value on the wire for headwearLikelihood. |
getJoyLikelihood()
public Likelihood getJoyLikelihood()
Joy likelihood.
.google.cloud.vision.v1.Likelihood joy_likelihood = 9;
ReturnsgetJoyLikelihoodValue()
public int getJoyLikelihoodValue()
Joy likelihood.
.google.cloud.vision.v1.Likelihood joy_likelihood = 9;
ReturnsType | 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;
ReturnsType | Description |
float | The landmarkingConfidence. |
getLandmarks(int index)
public FaceAnnotation.Landmark getLandmarks(int index)
Detected face landmarks.
repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
ParameterReturnsgetLandmarksCount()
public int getLandmarksCount()
Detected face landmarks.
repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
ReturnsgetLandmarksList()
public List<FaceAnnotation.Landmark> getLandmarksList()
Detected face landmarks.
repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
ReturnsgetLandmarksOrBuilder(int index)
public FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder(int index)
Detected face landmarks.
repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
ParameterReturnsgetLandmarksOrBuilderList()
public List<? extends FaceAnnotation.LandmarkOrBuilder> getLandmarksOrBuilderList()
Detected face landmarks.
repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
ReturnsType | Description |
List<? extends com.google.cloud.vision.v1.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;
ReturnsType | Description |
float | The panAngle. |
getParserForType()
public Parser<FaceAnnotation> getParserForType()
ReturnsOverridesgetRollAngle()
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;
ReturnsType | Description |
float | The rollAngle. |
getSerializedSize()
public int getSerializedSize()
ReturnsOverridesgetSorrowLikelihood()
public Likelihood getSorrowLikelihood()
Sorrow likelihood.
.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;
ReturnsgetSorrowLikelihoodValue()
public int getSorrowLikelihoodValue()
Sorrow likelihood.
.google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;
ReturnsType | Description |
int | The enum numeric value on the wire for sorrowLikelihood. |
getSurpriseLikelihood()
public Likelihood getSurpriseLikelihood()
Surprise likelihood.
.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;
ReturnsgetSurpriseLikelihoodValue()
public int getSurpriseLikelihoodValue()
Surprise likelihood.
.google.cloud.vision.v1.Likelihood surprise_likelihood = 12;
ReturnsType | 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;
ReturnsType | Description |
float | The tiltAngle. |
getUnderExposedLikelihood()
public Likelihood getUnderExposedLikelihood()
Under-exposed likelihood.
.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;
ReturnsType | Description |
Likelihood | The underExposedLikelihood. |
getUnderExposedLikelihoodValue()
public int getUnderExposedLikelihoodValue()
Under-exposed likelihood.
.google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;
ReturnsType | Description |
int | The enum numeric value on the wire for underExposedLikelihood. |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
ReturnsOverrideshasBoundingPoly()
public boolean hasBoundingPoly()
The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. 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.v1.BoundingPoly bounding_poly = 1;
ReturnsType | 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.v1.BoundingPoly fd_bounding_poly = 2;
ReturnsType | Description |
boolean | Whether the fdBoundingPoly field is set. |
hashCode()
ReturnsOverridesinternalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
ReturnsOverridesisInitialized()
public final boolean isInitialized()
ReturnsOverridesnewBuilderForType()
public FaceAnnotation.Builder newBuilderForType()
ReturnsnewBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected FaceAnnotation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
ParameterReturnsOverridesnewInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
ParameterReturnsOverridestoBuilder()
public FaceAnnotation.Builder toBuilder()
ReturnswriteTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
ParameterOverridesExceptions