Class: Gcloud::Vision::Annotation::Face::Features::Mouth
- Inherits:
-
Object
- Object
- Gcloud::Vision::Annotation::Face::Features::Mouth
- Defined in:
- lib/gcloud/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 Gcloud::Vision::Annotation::Face::Features and Gcloud::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_ary ⇒ Array
Returns the object’s property values as an array.
-
#to_h ⇒ Hash
Deeply converts object to a hash.
-
#to_hash ⇒ Hash
Deeply converts object to a hash.
- #to_s ⇒ Object
Constructor Details
#initialize(left, center, right) ⇒ Mouth
Returns a new instance of Mouth.
1394 1395 1396 1397 1398 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1394 def initialize left, center, right @left = left @center = center @right = right end |
Instance Attribute Details
#center ⇒ Landmark (readonly)
The mouth, center.
1389 1390 1391 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1389 def center @center end |
#left ⇒ Landmark (readonly)
The mouth, left.
1389 1390 1391 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1389 def left @left end |
#right ⇒ Landmark (readonly)
TThe mouth, right.
1389 1390 1391 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1389 def right @right end |
Instance Method Details
#inspect ⇒ Object
1443 1444 1445 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1443 def inspect "#<Mouth #{self}>" end |
#to_a ⇒ Array
Returns the object’s property values as an array.
1405 1406 1407 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1405 def to_a to_ary end |
#to_ary ⇒ Array
Returns the object’s property values as an array.
1414 1415 1416 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1414 def to_ary [left, center, right] end |
#to_h ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
1423 1424 1425 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1423 def to_h to_hash end |
#to_hash ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
1432 1433 1434 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1432 def to_hash { left: left.to_h, center: center.to_h, right: right.to_h } end |
#to_s ⇒ Object
1437 1438 1439 1440 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1437 def to_s format "(left: %s, center: %s, right: %s)", left.inspect, center.inspect, right.inspect end |