Class: Gcloud::Vision::Annotation::Face::Features::Ears
- Inherits:
-
Object
- Object
- Gcloud::Vision::Annotation::Face::Features::Ears
- Defined in:
- lib/gcloud/vision/annotation/face.rb
Overview
# Ears
The landmarks for the ear tragions.
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
-
#left ⇒ Landmark
readonly
The left ear tragion.
-
#right ⇒ Landmark
readonly
The right ear tragion.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ Ears
constructor
A new instance of Ears.
- #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, right) ⇒ Ears
Returns a new instance of Ears.
848 849 850 851 |
# File 'lib/gcloud/vision/annotation/face.rb', line 848 def initialize left, right @left = left @right = right end |
Instance Attribute Details
#left ⇒ Landmark (readonly)
The left ear tragion.
843 844 845 |
# File 'lib/gcloud/vision/annotation/face.rb', line 843 def left @left end |
#right ⇒ Landmark (readonly)
The right ear tragion.
843 844 845 |
# File 'lib/gcloud/vision/annotation/face.rb', line 843 def right @right end |
Instance Method Details
#inspect ⇒ Object
895 896 897 |
# File 'lib/gcloud/vision/annotation/face.rb', line 895 def inspect "#<Ears #{self}>" end |
#to_a ⇒ Array
Returns the object’s property values as an array.
858 859 860 |
# File 'lib/gcloud/vision/annotation/face.rb', line 858 def to_a to_ary end |
#to_ary ⇒ Array
Returns the object’s property values as an array.
867 868 869 |
# File 'lib/gcloud/vision/annotation/face.rb', line 867 def to_ary [left, right] end |
#to_h ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
876 877 878 |
# File 'lib/gcloud/vision/annotation/face.rb', line 876 def to_h to_hash end |
#to_hash ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
885 886 887 |
# File 'lib/gcloud/vision/annotation/face.rb', line 885 def to_hash { left: left.to_h, right: right.to_h } end |
#to_s ⇒ Object
890 891 892 |
# File 'lib/gcloud/vision/annotation/face.rb', line 890 def to_s "(left: #{left.inspect}, right: #{right.inspect})" end |