Class FaceAnnotation (3.38.0)

public final class FaceAnnotation extends GeneratedMessageV3 implements FaceAnnotationOrBuilder

A face annotation object contains the results of face detection.

Protobuf type google.cloud.vision.v1p1beta1.FaceAnnotation

Static Fields

ANGER_LIKELIHOOD_FIELD_NUMBER

public static final int ANGER_LIKELIHOOD_FIELD_NUMBER
Field Value
TypeDescription
int

BLURRED_LIKELIHOOD_FIELD_NUMBER

public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER
Field Value
TypeDescription
int

BOUNDING_POLY_FIELD_NUMBER

public static final int BOUNDING_POLY_FIELD_NUMBER
Field Value
TypeDescription
int

DETECTION_CONFIDENCE_FIELD_NUMBER

public static final int DETECTION_CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

FD_BOUNDING_POLY_FIELD_NUMBER

public static final int FD_BOUNDING_POLY_FIELD_NUMBER
Field Value
TypeDescription
int

HEADWEAR_LIKELIHOOD_FIELD_NUMBER

public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER
Field Value
TypeDescription
int

JOY_LIKELIHOOD_FIELD_NUMBER

public static final int JOY_LIKELIHOOD_FIELD_NUMBER
Field Value
TypeDescription
int

LANDMARKING_CONFIDENCE_FIELD_NUMBER

public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

LANDMARKS_FIELD_NUMBER

public static final int LANDMARKS_FIELD_NUMBER
Field Value
TypeDescription
int

PAN_ANGLE_FIELD_NUMBER

public static final int PAN_ANGLE_FIELD_NUMBER
Field Value
TypeDescription
int

ROLL_ANGLE_FIELD_NUMBER

public static final int ROLL_ANGLE_FIELD_NUMBER
Field Value
TypeDescription
int

SORROW_LIKELIHOOD_FIELD_NUMBER

public static final int SORROW_LIKELIHOOD_FIELD_NUMBER
Field Value
TypeDescription
int

SURPRISE_LIKELIHOOD_FIELD_NUMBER

public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER
Field Value
TypeDescription
int

TILT_ANGLE_FIELD_NUMBER

public static final int TILT_ANGLE_FIELD_NUMBER
Field Value
TypeDescription
int

UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER

public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static FaceAnnotation getDefaultInstance()
Returns
TypeDescription
FaceAnnotation

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static FaceAnnotation.Builder newBuilder()
Returns
TypeDescription
FaceAnnotation.Builder

newBuilder(FaceAnnotation prototype)

public static FaceAnnotation.Builder newBuilder(FaceAnnotation prototype)
Parameter
NameDescription
prototypeFaceAnnotation
Returns
TypeDescription
FaceAnnotation.Builder

parseDelimitedFrom(InputStream input)

public static FaceAnnotation parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FaceAnnotation parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static FaceAnnotation parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static FaceAnnotation parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static FaceAnnotation parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static FaceAnnotation parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static FaceAnnotation parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static FaceAnnotation parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static FaceAnnotation parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static FaceAnnotation parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static FaceAnnotation parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static FaceAnnotation parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
FaceAnnotation
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<FaceAnnotation> parser()
Returns
TypeDescription
Parser<FaceAnnotation>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAngerLikelihood()

public Likelihood getAngerLikelihood()

Anger likelihood.

.google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11;

Returns
TypeDescription
Likelihood

The angerLikelihood.

getAngerLikelihoodValue()

public int getAngerLikelihoodValue()

Anger likelihood.

.google.cloud.vision.v1p1beta1.Likelihood anger_likelihood = 11;

Returns
TypeDescription
int

The enum numeric value on the wire for angerLikelihood.

getBlurredLikelihood()

public Likelihood getBlurredLikelihood()

Blurred likelihood.

.google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14;

Returns
TypeDescription
Likelihood

The blurredLikelihood.

getBlurredLikelihoodValue()

public int getBlurredLikelihoodValue()

Blurred likelihood.

.google.cloud.vision.v1p1beta1.Likelihood blurred_likelihood = 14;

Returns
TypeDescription
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.v1p1beta1.BoundingPoly bounding_poly = 1;

Returns
TypeDescription
BoundingPoly

The boundingPoly.

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.v1p1beta1.BoundingPoly bounding_poly = 1;

Returns
TypeDescription
BoundingPolyOrBuilder

getDefaultInstanceForType()

public FaceAnnotation getDefaultInstanceForType()
Returns
TypeDescription
FaceAnnotation

getDetectionConfidence()

public float getDetectionConfidence()

Detection confidence. Range [0, 1].

float detection_confidence = 7;

Returns
TypeDescription
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.v1p1beta1.BoundingPoly fd_bounding_poly = 2;

Returns
TypeDescription
BoundingPoly

The fdBoundingPoly.

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.v1p1beta1.BoundingPoly fd_bounding_poly = 2;

Returns
TypeDescription
BoundingPolyOrBuilder

getHeadwearLikelihood()

public Likelihood getHeadwearLikelihood()

Headwear likelihood.

.google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15;

Returns
TypeDescription
Likelihood

The headwearLikelihood.

getHeadwearLikelihoodValue()

public int getHeadwearLikelihoodValue()

Headwear likelihood.

.google.cloud.vision.v1p1beta1.Likelihood headwear_likelihood = 15;

Returns
TypeDescription
int

The enum numeric value on the wire for headwearLikelihood.

getJoyLikelihood()

public Likelihood getJoyLikelihood()

Joy likelihood.

.google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9;

Returns
TypeDescription
Likelihood

The joyLikelihood.

getJoyLikelihoodValue()

public int getJoyLikelihoodValue()

Joy likelihood.

.google.cloud.vision.v1p1beta1.Likelihood joy_likelihood = 9;

Returns
TypeDescription
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
TypeDescription
float

The landmarkingConfidence.

getLandmarks(int index)

public FaceAnnotation.Landmark getLandmarks(int index)

Detected face landmarks.

repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
FaceAnnotation.Landmark

getLandmarksCount()

public int getLandmarksCount()

Detected face landmarks.

repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3;

Returns
TypeDescription
int

getLandmarksList()

public List<FaceAnnotation.Landmark> getLandmarksList()

Detected face landmarks.

repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3;

Returns
TypeDescription
List<Landmark>

getLandmarksOrBuilder(int index)

public FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder(int index)

Detected face landmarks.

repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
FaceAnnotation.LandmarkOrBuilder

getLandmarksOrBuilderList()

public List<? extends FaceAnnotation.LandmarkOrBuilder> getLandmarksOrBuilderList()

Detected face landmarks.

repeated .google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark landmarks = 3;

Returns
TypeDescription
List<? extends com.google.cloud.vision.v1p1beta1.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
TypeDescription
float

The panAngle.

getParserForType()

public Parser<FaceAnnotation> getParserForType()
Returns
TypeDescription
Parser<FaceAnnotation>
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
TypeDescription
float

The rollAngle.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getSorrowLikelihood()

public Likelihood getSorrowLikelihood()

Sorrow likelihood.

.google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10;

Returns
TypeDescription
Likelihood

The sorrowLikelihood.

getSorrowLikelihoodValue()

public int getSorrowLikelihoodValue()

Sorrow likelihood.

.google.cloud.vision.v1p1beta1.Likelihood sorrow_likelihood = 10;

Returns
TypeDescription
int

The enum numeric value on the wire for sorrowLikelihood.

getSurpriseLikelihood()

public Likelihood getSurpriseLikelihood()

Surprise likelihood.

.google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12;

Returns
TypeDescription
Likelihood

The surpriseLikelihood.

getSurpriseLikelihoodValue()

public int getSurpriseLikelihoodValue()

Surprise likelihood.

.google.cloud.vision.v1p1beta1.Likelihood surprise_likelihood = 12;

Returns
TypeDescription
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
TypeDescription
float

The tiltAngle.

getUnderExposedLikelihood()

public Likelihood getUnderExposedLikelihood()

Under-exposed likelihood.

.google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13;

Returns
TypeDescription
Likelihood

The underExposedLikelihood.

getUnderExposedLikelihoodValue()

public int getUnderExposedLikelihoodValue()

Under-exposed likelihood.

.google.cloud.vision.v1p1beta1.Likelihood under_exposed_likelihood = 13;

Returns
TypeDescription
int

The enum numeric value on the wire for underExposedLikelihood.

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.v1p1beta1.BoundingPoly bounding_poly = 1;

Returns
TypeDescription
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.v1p1beta1.BoundingPoly fd_bounding_poly = 2;

Returns
TypeDescription
boolean

Whether the fdBoundingPoly field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public FaceAnnotation.Builder newBuilderForType()
Returns
TypeDescription
FaceAnnotation.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected FaceAnnotation.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
FaceAnnotation.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public FaceAnnotation.Builder toBuilder()
Returns
TypeDescription
FaceAnnotation.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException