Class: Google::Cloud::Vision::Annotation::Face::Features::Eyes
- Inherits:
-
Object
- Object
- Google::Cloud::Vision::Annotation::Face::Features::Eyes
- Defined in:
- lib/google/cloud/vision/annotation/face.rb
Overview
# Eyes
The landmarks of the eyes 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
-
#left ⇒ Eye
readonly
The left eye.
-
#right ⇒ Eye
readonly
The right eye.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ Eyes
constructor
A new instance of Eyes.
- #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, right) ⇒ Eyes
Returns a new instance of Eyes.
966 967 968 969 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 966 def initialize left, right @left = left @right = right end |
Instance Attribute Details
#left ⇒ Eye (readonly)
The left eye.
961 962 963 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 961 def left @left end |
#right ⇒ Eye (readonly)
The right eye.
961 962 963 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 961 def right @right end |
Instance Method Details
#inspect ⇒ Object
995 996 997 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 995 def inspect "#<Eyes #{self}>" end |
#to_a ⇒ Array
Returns the object’s property values as an array.
976 977 978 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 976 def to_a [left, right] end |
#to_h ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
985 986 987 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 985 def to_h { left: left.to_h, right: right.to_h } end |
#to_s ⇒ Object
990 991 992 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 990 def to_s "(left: #{left.inspect}, right: #{right.inspect})" end |