Class FaceAnnotation

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.vision.v1.FaceAnnotation
All Implemented Interfaces:
FaceAnnotationOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class FaceAnnotation extends com.google.protobuf.GeneratedMessage implements FaceAnnotationOrBuilder
 A face annotation object contains the results of face detection.
 
Protobuf type google.cloud.vision.v1.FaceAnnotation
See Also:
  • Field Details

    • BOUNDING_POLY_FIELD_NUMBER

      public static final int BOUNDING_POLY_FIELD_NUMBER
      See Also:
    • FD_BOUNDING_POLY_FIELD_NUMBER

      public static final int FD_BOUNDING_POLY_FIELD_NUMBER
      See Also:
    • LANDMARKS_FIELD_NUMBER

      public static final int LANDMARKS_FIELD_NUMBER
      See Also:
    • ROLL_ANGLE_FIELD_NUMBER

      public static final int ROLL_ANGLE_FIELD_NUMBER
      See Also:
    • PAN_ANGLE_FIELD_NUMBER

      public static final int PAN_ANGLE_FIELD_NUMBER
      See Also:
    • TILT_ANGLE_FIELD_NUMBER

      public static final int TILT_ANGLE_FIELD_NUMBER
      See Also:
    • DETECTION_CONFIDENCE_FIELD_NUMBER

      public static final int DETECTION_CONFIDENCE_FIELD_NUMBER
      See Also:
    • LANDMARKING_CONFIDENCE_FIELD_NUMBER

      public static final int LANDMARKING_CONFIDENCE_FIELD_NUMBER
      See Also:
    • JOY_LIKELIHOOD_FIELD_NUMBER

      public static final int JOY_LIKELIHOOD_FIELD_NUMBER
      See Also:
    • SORROW_LIKELIHOOD_FIELD_NUMBER

      public static final int SORROW_LIKELIHOOD_FIELD_NUMBER
      See Also:
    • ANGER_LIKELIHOOD_FIELD_NUMBER

      public static final int ANGER_LIKELIHOOD_FIELD_NUMBER
      See Also:
    • SURPRISE_LIKELIHOOD_FIELD_NUMBER

      public static final int SURPRISE_LIKELIHOOD_FIELD_NUMBER
      See Also:
    • UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER

      public static final int UNDER_EXPOSED_LIKELIHOOD_FIELD_NUMBER
      See Also:
    • BLURRED_LIKELIHOOD_FIELD_NUMBER

      public static final int BLURRED_LIKELIHOOD_FIELD_NUMBER
      See Also:
    • HEADWEAR_LIKELIHOOD_FIELD_NUMBER

      public static final int HEADWEAR_LIKELIHOOD_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • hasBoundingPoly

      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;
      Specified by:
      hasBoundingPoly in interface FaceAnnotationOrBuilder
      Returns:
      Whether the boundingPoly field is set.
    • 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;
      Specified by:
      getBoundingPoly in interface FaceAnnotationOrBuilder
      Returns:
      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.
       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;
      Specified by:
      getBoundingPolyOrBuilder in interface FaceAnnotationOrBuilder
    • 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;
      Specified by:
      hasFdBoundingPoly in interface FaceAnnotationOrBuilder
      Returns:
      Whether the fdBoundingPoly field is set.
    • 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;
      Specified by:
      getFdBoundingPoly in interface FaceAnnotationOrBuilder
      Returns:
      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.v1.BoundingPoly fd_bounding_poly = 2;
      Specified by:
      getFdBoundingPolyOrBuilder in interface FaceAnnotationOrBuilder
    • getLandmarksList

      public List<FaceAnnotation.Landmark> getLandmarksList()
       Detected face landmarks.
       
      repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
      Specified by:
      getLandmarksList in interface FaceAnnotationOrBuilder
    • getLandmarksOrBuilderList

      public List<? extends FaceAnnotation.LandmarkOrBuilder> getLandmarksOrBuilderList()
       Detected face landmarks.
       
      repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
      Specified by:
      getLandmarksOrBuilderList in interface FaceAnnotationOrBuilder
    • getLandmarksCount

      public int getLandmarksCount()
       Detected face landmarks.
       
      repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
      Specified by:
      getLandmarksCount in interface FaceAnnotationOrBuilder
    • getLandmarks

      public FaceAnnotation.Landmark getLandmarks(int index)
       Detected face landmarks.
       
      repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
      Specified by:
      getLandmarks in interface FaceAnnotationOrBuilder
    • getLandmarksOrBuilder

      public FaceAnnotation.LandmarkOrBuilder getLandmarksOrBuilder(int index)
       Detected face landmarks.
       
      repeated .google.cloud.vision.v1.FaceAnnotation.Landmark landmarks = 3;
      Specified by:
      getLandmarksOrBuilder in interface FaceAnnotationOrBuilder
    • 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;
      Specified by:
      getRollAngle in interface FaceAnnotationOrBuilder
      Returns:
      The rollAngle.
    • 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;
      Specified by:
      getPanAngle in interface FaceAnnotationOrBuilder
      Returns:
      The panAngle.
    • 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;
      Specified by:
      getTiltAngle in interface FaceAnnotationOrBuilder
      Returns:
      The tiltAngle.
    • getDetectionConfidence

      public float getDetectionConfidence()
       Detection confidence. Range [0, 1].
       
      float detection_confidence = 7;
      Specified by:
      getDetectionConfidence in interface FaceAnnotationOrBuilder
      Returns:
      The detectionConfidence.
    • getLandmarkingConfidence

      public float getLandmarkingConfidence()
       Face landmarking confidence. Range [0, 1].
       
      float landmarking_confidence = 8;
      Specified by:
      getLandmarkingConfidence in interface FaceAnnotationOrBuilder
      Returns:
      The landmarkingConfidence.
    • getJoyLikelihoodValue

      public int getJoyLikelihoodValue()
       Joy likelihood.
       
      .google.cloud.vision.v1.Likelihood joy_likelihood = 9;
      Specified by:
      getJoyLikelihoodValue in interface FaceAnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for joyLikelihood.
    • getJoyLikelihood

      public Likelihood getJoyLikelihood()
       Joy likelihood.
       
      .google.cloud.vision.v1.Likelihood joy_likelihood = 9;
      Specified by:
      getJoyLikelihood in interface FaceAnnotationOrBuilder
      Returns:
      The joyLikelihood.
    • getSorrowLikelihoodValue

      public int getSorrowLikelihoodValue()
       Sorrow likelihood.
       
      .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;
      Specified by:
      getSorrowLikelihoodValue in interface FaceAnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for sorrowLikelihood.
    • getSorrowLikelihood

      public Likelihood getSorrowLikelihood()
       Sorrow likelihood.
       
      .google.cloud.vision.v1.Likelihood sorrow_likelihood = 10;
      Specified by:
      getSorrowLikelihood in interface FaceAnnotationOrBuilder
      Returns:
      The sorrowLikelihood.
    • getAngerLikelihoodValue

      public int getAngerLikelihoodValue()
       Anger likelihood.
       
      .google.cloud.vision.v1.Likelihood anger_likelihood = 11;
      Specified by:
      getAngerLikelihoodValue in interface FaceAnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for angerLikelihood.
    • getAngerLikelihood

      public Likelihood getAngerLikelihood()
       Anger likelihood.
       
      .google.cloud.vision.v1.Likelihood anger_likelihood = 11;
      Specified by:
      getAngerLikelihood in interface FaceAnnotationOrBuilder
      Returns:
      The angerLikelihood.
    • getSurpriseLikelihoodValue

      public int getSurpriseLikelihoodValue()
       Surprise likelihood.
       
      .google.cloud.vision.v1.Likelihood surprise_likelihood = 12;
      Specified by:
      getSurpriseLikelihoodValue in interface FaceAnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for surpriseLikelihood.
    • getSurpriseLikelihood

      public Likelihood getSurpriseLikelihood()
       Surprise likelihood.
       
      .google.cloud.vision.v1.Likelihood surprise_likelihood = 12;
      Specified by:
      getSurpriseLikelihood in interface FaceAnnotationOrBuilder
      Returns:
      The surpriseLikelihood.
    • getUnderExposedLikelihoodValue

      public int getUnderExposedLikelihoodValue()
       Under-exposed likelihood.
       
      .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;
      Specified by:
      getUnderExposedLikelihoodValue in interface FaceAnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for underExposedLikelihood.
    • getUnderExposedLikelihood

      public Likelihood getUnderExposedLikelihood()
       Under-exposed likelihood.
       
      .google.cloud.vision.v1.Likelihood under_exposed_likelihood = 13;
      Specified by:
      getUnderExposedLikelihood in interface FaceAnnotationOrBuilder
      Returns:
      The underExposedLikelihood.
    • getBlurredLikelihoodValue

      public int getBlurredLikelihoodValue()
       Blurred likelihood.
       
      .google.cloud.vision.v1.Likelihood blurred_likelihood = 14;
      Specified by:
      getBlurredLikelihoodValue in interface FaceAnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for blurredLikelihood.
    • getBlurredLikelihood

      public Likelihood getBlurredLikelihood()
       Blurred likelihood.
       
      .google.cloud.vision.v1.Likelihood blurred_likelihood = 14;
      Specified by:
      getBlurredLikelihood in interface FaceAnnotationOrBuilder
      Returns:
      The blurredLikelihood.
    • getHeadwearLikelihoodValue

      public int getHeadwearLikelihoodValue()
       Headwear likelihood.
       
      .google.cloud.vision.v1.Likelihood headwear_likelihood = 15;
      Specified by:
      getHeadwearLikelihoodValue in interface FaceAnnotationOrBuilder
      Returns:
      The enum numeric value on the wire for headwearLikelihood.
    • getHeadwearLikelihood

      public Likelihood getHeadwearLikelihood()
       Headwear likelihood.
       
      .google.cloud.vision.v1.Likelihood headwear_likelihood = 15;
      Specified by:
      getHeadwearLikelihood in interface FaceAnnotationOrBuilder
      Returns:
      The headwearLikelihood.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static FaceAnnotation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FaceAnnotation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FaceAnnotation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FaceAnnotation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FaceAnnotation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FaceAnnotation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static FaceAnnotation parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static FaceAnnotation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static FaceAnnotation parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static FaceAnnotation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static FaceAnnotation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static FaceAnnotation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public FaceAnnotation.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static FaceAnnotation.Builder newBuilder()
    • newBuilder

      public static FaceAnnotation.Builder newBuilder(FaceAnnotation prototype)
    • toBuilder

      public FaceAnnotation.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected FaceAnnotation.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static FaceAnnotation getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<FaceAnnotation> parser()
    • getParserForType

      public com.google.protobuf.Parser<FaceAnnotation> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public FaceAnnotation getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder