Class: Google::Apis::VisionV1::FaceAnnotation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/vision_v1/classes.rb,
generated/google/apis/vision_v1/representations.rb,
generated/google/apis/vision_v1/representations.rb

Overview

A face annotation object contains the results of face detection.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ FaceAnnotation

Returns a new instance of FaceAnnotation



1105
1106
1107
# File 'generated/google/apis/vision_v1/classes.rb', line 1105

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#anger_likelihoodString

Anger likelihood. Corresponds to the JSON property angerLikelihood

Returns:

  • (String)


1028
1029
1030
# File 'generated/google/apis/vision_v1/classes.rb', line 1028

def anger_likelihood
  @anger_likelihood
end

#blurred_likelihoodString

Blurred likelihood. Corresponds to the JSON property blurredLikelihood

Returns:

  • (String)


1033
1034
1035
# File 'generated/google/apis/vision_v1/classes.rb', line 1033

def blurred_likelihood
  @blurred_likelihood
end

#bounding_polyGoogle::Apis::VisionV1::BoundingPoly

A bounding polygon for the detected image annotation. Corresponds to the JSON property boundingPoly



1038
1039
1040
# File 'generated/google/apis/vision_v1/classes.rb', line 1038

def bounding_poly
  @bounding_poly
end

#detection_confidenceFloat

Detection confidence. Range [0, 1]. Corresponds to the JSON property detectionConfidence

Returns:

  • (Float)


1043
1044
1045
# File 'generated/google/apis/vision_v1/classes.rb', line 1043

def detection_confidence
  @detection_confidence
end

#fd_bounding_polyGoogle::Apis::VisionV1::BoundingPoly

A bounding polygon for the detected image annotation. Corresponds to the JSON property fdBoundingPoly



1048
1049
1050
# File 'generated/google/apis/vision_v1/classes.rb', line 1048

def fd_bounding_poly
  @fd_bounding_poly
end

#headwear_likelihoodString

Headwear likelihood. Corresponds to the JSON property headwearLikelihood

Returns:

  • (String)


1053
1054
1055
# File 'generated/google/apis/vision_v1/classes.rb', line 1053

def headwear_likelihood
  @headwear_likelihood
end

#joy_likelihoodString

Joy likelihood. Corresponds to the JSON property joyLikelihood

Returns:

  • (String)


1058
1059
1060
# File 'generated/google/apis/vision_v1/classes.rb', line 1058

def joy_likelihood
  @joy_likelihood
end

#landmarking_confidenceFloat

Face landmarking confidence. Range [0, 1]. Corresponds to the JSON property landmarkingConfidence

Returns:

  • (Float)


1063
1064
1065
# File 'generated/google/apis/vision_v1/classes.rb', line 1063

def landmarking_confidence
  @landmarking_confidence
end

#landmarksArray<Google::Apis::VisionV1::Landmark>

Detected face landmarks. Corresponds to the JSON property landmarks



1068
1069
1070
# File 'generated/google/apis/vision_v1/classes.rb', line 1068

def landmarks
  @landmarks
end

#pan_angleFloat

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]. Corresponds to the JSON property panAngle

Returns:

  • (Float)


1075
1076
1077
# File 'generated/google/apis/vision_v1/classes.rb', line 1075

def pan_angle
  @pan_angle
end

#roll_angleFloat

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]. Corresponds to the JSON property rollAngle

Returns:

  • (Float)


1082
1083
1084
# File 'generated/google/apis/vision_v1/classes.rb', line 1082

def roll_angle
  @roll_angle
end

#sorrow_likelihoodString

Sorrow likelihood. Corresponds to the JSON property sorrowLikelihood

Returns:

  • (String)


1087
1088
1089
# File 'generated/google/apis/vision_v1/classes.rb', line 1087

def sorrow_likelihood
  @sorrow_likelihood
end

#surprise_likelihoodString

Surprise likelihood. Corresponds to the JSON property surpriseLikelihood

Returns:

  • (String)


1092
1093
1094
# File 'generated/google/apis/vision_v1/classes.rb', line 1092

def surprise_likelihood
  @surprise_likelihood
end

#tilt_angleFloat

Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180]. Corresponds to the JSON property tiltAngle

Returns:

  • (Float)


1098
1099
1100
# File 'generated/google/apis/vision_v1/classes.rb', line 1098

def tilt_angle
  @tilt_angle
end

#under_exposed_likelihoodString

Under-exposed likelihood. Corresponds to the JSON property underExposedLikelihood

Returns:

  • (String)


1103
1104
1105
# File 'generated/google/apis/vision_v1/classes.rb', line 1103

def under_exposed_likelihood
  @under_exposed_likelihood
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
# File 'generated/google/apis/vision_v1/classes.rb', line 1110

def update!(**args)
  @anger_likelihood = args[:anger_likelihood] if args.key?(:anger_likelihood)
  @blurred_likelihood = args[:blurred_likelihood] if args.key?(:blurred_likelihood)
  @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly)
  @detection_confidence = args[:detection_confidence] if args.key?(:detection_confidence)
  @fd_bounding_poly = args[:fd_bounding_poly] if args.key?(:fd_bounding_poly)
  @headwear_likelihood = args[:headwear_likelihood] if args.key?(:headwear_likelihood)
  @joy_likelihood = args[:joy_likelihood] if args.key?(:joy_likelihood)
  @landmarking_confidence = args[:landmarking_confidence] if args.key?(:landmarking_confidence)
  @landmarks = args[:landmarks] if args.key?(:landmarks)
  @pan_angle = args[:pan_angle] if args.key?(:pan_angle)
  @roll_angle = args[:roll_angle] if args.key?(:roll_angle)
  @sorrow_likelihood = args[:sorrow_likelihood] if args.key?(:sorrow_likelihood)
  @surprise_likelihood = args[:surprise_likelihood] if args.key?(:surprise_likelihood)
  @tilt_angle = args[:tilt_angle] if args.key?(:tilt_angle)
  @under_exposed_likelihood = args[:under_exposed_likelihood] if args.key?(:under_exposed_likelihood)
end