Class: Gcloud::Vision::Annotation::Face::Features::Eyebrow
- Inherits:
-
Object
- Object
- Gcloud::Vision::Annotation::Face::Features::Eyebrow
- Defined in:
- lib/gcloud/vision/annotation/face.rb
Overview
# Eyebrow
The landmarks of an eyebrow 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 Eyebrows, Gcloud::Vision::Annotation::Face::Features and Gcloud::Vision::Annotation::Face.
Instance Attribute Summary collapse
-
#left ⇒ Landmark
readonly
The eyebrow, left.
-
#right ⇒ Landmark
readonly
The eyebrow, right.
-
#top ⇒ Landmark
readonly
The eyebrow, upper midpoint.
Instance Method Summary collapse
-
#initialize(left, top, right) ⇒ Eyebrow
constructor
A new instance of Eyebrow.
- #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, top, right) ⇒ Eyebrow
Returns a new instance of Eyebrow.
1027 1028 1029 1030 1031 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1027 def initialize left, top, right @left = left @top = top @right = right end |
Instance Attribute Details
#left ⇒ Landmark (readonly)
The eyebrow, left.
1022 1023 1024 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1022 def left @left end |
#right ⇒ Landmark (readonly)
The eyebrow, right.
1022 1023 1024 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1022 def right @right end |
#top ⇒ Landmark (readonly)
The eyebrow, upper midpoint.
1022 1023 1024 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1022 def top @top end |
Instance Method Details
#inspect ⇒ Object
1076 1077 1078 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1076 def inspect "#<Eyebrow #{self}>" end |
#to_a ⇒ Array
Returns the object’s property values as an array.
1038 1039 1040 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1038 def to_a to_ary end |
#to_ary ⇒ Array
Returns the object’s property values as an array.
1047 1048 1049 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1047 def to_ary [left, top, right] end |
#to_h ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
1056 1057 1058 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1056 def to_h to_hash end |
#to_hash ⇒ Hash
Deeply converts object to a hash. All keys will be symbolized.
1065 1066 1067 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1065 def to_hash { left: left.to_h, top: top.to_h, right: right.to_h } end |
#to_s ⇒ Object
1070 1071 1072 1073 |
# File 'lib/gcloud/vision/annotation/face.rb', line 1070 def to_s format "(left: %s, top: %s, right: %s)", left.inspect, top.inspect, right.inspect end |