Class: Google::Cloud::Vision::Annotation::Face::Features::Lips

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/vision/annotation/face.rb

Overview

Lips

The landmarks of the lips in the features of a face.

See Google::Cloud::Vision::Annotation::Face::Features and Google::Cloud::Vision::Annotation::Face.

Examples:

require "google/cloud/vision"

vision = Google::Cloud::Vision.new

image = vision.image "path/to/face.jpg"
face = image.face

lips = face.features.lips

lips.top
#<Landmark (x: 228.54768, y: 143.2952, z: -5.6550336)>

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bottomLandmark (readonly) Also known as: lower

The lower lip.

Returns:

  • (Landmark)

    the current value of bottom



1109
1110
1111
# File 'lib/google/cloud/vision/annotation/face.rb', line 1109

def bottom
  @bottom
end

#topLandmark (readonly) Also known as: upper

The upper lip.

Returns:

  • (Landmark)

    the current value of top



1109
1110
1111
# File 'lib/google/cloud/vision/annotation/face.rb', line 1109

def top
  @top
end

Instance Method Details

#to_aArray

Returns the object's property values as an array.

Returns:

  • (Array)


1127
1128
1129
# File 'lib/google/cloud/vision/annotation/face.rb', line 1127

def to_a
  [top, bottom]
end

#to_hHash

Deeply converts object to a hash. All keys will be symbolized.

Returns:

  • (Hash)


1136
1137
1138
# File 'lib/google/cloud/vision/annotation/face.rb', line 1136

def to_h
  { top: top.to_h, bottom: bottom.to_h }
end