Class: Google::Cloud::Vision::Annotation::Face::Angles
- Inherits:
-
Object
- Object
- Google::Cloud::Vision::Annotation::Face::Angles
- Defined in:
- lib/google/cloud/vision/annotation/face.rb
Overview
Angles
The orientation of the face relative to the image.
Instance Method Summary collapse
-
#pitch ⇒ Float
(also: #tilt)
Pitch (tilt) angle.
-
#roll ⇒ Float
Roll angle.
-
#to_a ⇒ Array
Returns the object's property values as an array.
-
#to_h ⇒ Hash
Converts object to a hash.
-
#yaw ⇒ Float
(also: #pan)
Yaw (pan) angle.
Instance Method Details
#pitch ⇒ Float Also known as: tilt
Pitch (tilt) angle. Indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane.
186 187 188 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 186 def pitch @gapi.tilt_angle end |
#roll ⇒ Float
Roll angle. Indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical, about the axis perpendicular to the face.
164 165 166 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 164 def roll @gapi.roll_angle end |
#to_a ⇒ Array
Returns the object's property values as an array.
196 197 198 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 196 def to_a [roll, yaw, pitch] end |
#to_h ⇒ Hash
Converts object to a hash. All keys will be symbolized.
205 206 207 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 205 def to_h { roll: roll, yaw: yaw, pitch: pitch } end |
#yaw ⇒ Float Also known as: pan
Yaw (pan) angle. Indicates the leftward/rightward angle that the face is pointing, relative to the vertical plane perpendicular to the image.
175 176 177 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 175 def yaw @gapi.pan_angle end |