Class: Gcloud::Vision::Annotation::Face::Features::Eyes
- Inherits:
-
Object
- Object
- Gcloud::Vision::Annotation::Face::Features::Eyes
- Defined in:
- lib/gcloud/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 Gcloud::Vision::Annotation::Face::Features and Gcloud::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_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) ⇒ Eyes
Returns a new instance of Eyes.
1118 1119 1120 1121 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1118 def initialize left, right @left = left @right = right end |
Instance Attribute Details
#left ⇒ Eye (readonly)
The left eye.
1113 1114 1115 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1113 def left @left end |
#right ⇒ Eye (readonly)
The right eye.
1113 1114 1115 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1113 def right @right end |
Instance Method Details
#inspect ⇒ Object
1165 1166 1167 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1165 def inspect "#<Eyes #{self}>" end |
#to_a ⇒ Array
Returns the object’s property values as an array.
1128 1129 1130 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1128 def to_a to_ary end |
#to_ary ⇒ Array
Returns the object’s property values as an array.
1137 1138 1139 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1137 def to_ary [left, right] end |
#to_h ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
1146 1147 1148 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1146 def to_h to_hash end |
#to_hash ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
1155 1156 1157 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1155 def to_hash { left: left.to_h, right: right.to_h } end |
#to_s ⇒ Object
1160 1161 1162 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1160 def to_s "(left: #{left.inspect}, right: #{right.inspect})" end |