Class: Google::Cloud::Vision::Annotation::Face::Features::Eye
- Inherits:
-
Object
- Object
- Google::Cloud::Vision::Annotation::Face::Features::Eye
- Defined in:
- lib/google/cloud/vision/annotation/face.rb
Overview
Eye
The landmarks of an eye 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 Eyes, Google::Cloud::Vision::Annotation::Face::Features and Google::Cloud::Vision::Annotation::Face.
Instance Attribute Summary collapse
-
#bottom ⇒ Landmark
readonly
The eye, bottom boundary.
-
#center ⇒ Landmark
readonly
The eye, center.
-
#left ⇒ Landmark
readonly
The eye, left corner.
-
#pupil ⇒ Landmark
readonly
The eye pupil.
-
#right ⇒ Landmark
readonly
The eye, right corner.
-
#top ⇒ Landmark
readonly
The eye, top boundary.
Instance Method Summary collapse
-
#to_a ⇒ Array
Returns the object's property values as an array.
-
#to_h ⇒ Hash
Deeply converts object to a hash.
Instance Attribute Details
#bottom ⇒ Landmark (readonly)
The eye, bottom boundary.
1047 1048 1049 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1047 def bottom @bottom end |
#center ⇒ Landmark (readonly)
The eye, center.
1047 1048 1049 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1047 def center @center end |
#left ⇒ Landmark (readonly)
The eye, left corner.
1047 1048 1049 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1047 def left @left end |
#pupil ⇒ Landmark (readonly)
The eye pupil.
1047 1048 1049 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1047 def pupil @pupil end |
#right ⇒ Landmark (readonly)
The eye, right corner.
1047 1048 1049 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1047 def right @right end |
#top ⇒ Landmark (readonly)
The eye, top boundary.
1047 1048 1049 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1047 def top @top end |
Instance Method Details
#to_a ⇒ Array
Returns the object's property values as an array.
1066 1067 1068 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1066 def to_a [left, top, right] end |
#to_h ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
1075 1076 1077 1078 |
# File 'lib/google/cloud/vision/annotation/face.rb', line 1075 def to_h { left: left.to_h, bottom: bottom.to_h, center: center.to_h, pupil: pupil.to_h, top: top.to_h, right: right.to_h } end |