Class: Google::Cloud::Vision::Annotation::Face::Features::Mouth
- Inherits:
-
Object
- Object
- Google::Cloud::Vision::Annotation::Face::Features::Mouth
- Defined in:
- lib/google/cloud/vision/annotation/face.rb
Overview
# Mouth
The landmarks of the mouth in the features of a face.
Left and right are defined from the vantage of the viewer of the image, without considering mirror projections typical of photos. So ‘face.features.eyes.left` typically is the person’s right eye.
See Google::Cloud::Vision::Annotation::Face::Features and Google::Cloud::Vision::Annotation::Face.
Instance Attribute Summary collapse
-
#center ⇒ Landmark
readonly
The mouth, center.
-
#left ⇒ Landmark
readonly
The mouth, left.
-
#right ⇒ Landmark
readonly
TThe mouth, right.
Instance Method Summary collapse
-
#initialize(left, center, right) ⇒ Mouth
constructor
A new instance of Mouth.
- #inspect ⇒ Object
-
#to_a ⇒ Array
Returns the object’s property values as an array.
-
#to_h ⇒ Hash
Deeply converts object to a hash.
- #to_s ⇒ Object
Constructor Details
#initialize(left, center, right) ⇒ Mouth
Returns a new instance of Mouth.
1185 1186 1187 1188 1189 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1185 def initialize left, center, right @left = left @center = center @right = right end |
Instance Attribute Details
#center ⇒ Landmark (readonly)
The mouth, center.
1180 1181 1182 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1180 def center @center end |
#left ⇒ Landmark (readonly)
The mouth, left.
1180 1181 1182 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1180 def left @left end |
#right ⇒ Landmark (readonly)
TThe mouth, right.
1180 1181 1182 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1180 def right @right end |
Instance Method Details
#inspect ⇒ Object
1216 1217 1218 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1216 def inspect "#<Mouth #{self}>" end |
#to_a ⇒ Array
Returns the object’s property values as an array.
1196 1197 1198 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1196 def to_a [left, center, right] end |
#to_h ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
1205 1206 1207 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1205 def to_h { left: left.to_h, center: center.to_h, right: right.to_h } end |
#to_s ⇒ Object
1210 1211 1212 1213 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1210 def to_s format "(left: %s, center: %s, right: %s)", left.inspect, center.inspect, right.inspect end |