Class: Google::Cloud::Vision::Annotation::Face::Features::Landmark
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Cloud::Vision::Annotation::Face::Features::Landmark
 
 
- Defined in:
 - lib/google/cloud/vision/annotation/face.rb
 
Overview
Landmark
A face-specific landmark (for example, a face feature). Landmark
positions may fall outside the bounds of the image when the face
is near one or more edges of the image. Therefore it is NOT
guaranteed that 0 <= x < width or 0 <= y < height.
See Google::Cloud::Vision::Annotation::Face::Features and Google::Cloud::Vision::Annotation::Face.
Instance Method Summary collapse
- 
  
    
      #to_a  ⇒ Array 
    
    
  
  
  
  
  
  
  
  
  
    
Returns the object's property values as an array.
 - 
  
    
      #to_h  ⇒ Hash 
    
    
  
  
  
  
  
  
  
  
  
    
Converts object to a hash.
 - 
  
    
      #type  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
The landmark type code.
 - 
  
    
      #x  ⇒ Float 
    
    
  
  
  
  
  
  
  
  
  
    
The X (horizontal) coordinate.
 - 
  
    
      #y  ⇒ Float 
    
    
  
  
  
  
  
  
  
  
  
    
The Y (vertical) coordinate.
 - 
  
    
      #z  ⇒ Float 
    
    
  
  
  
  
  
  
  
  
  
    
The Z (depth) coordinate.
 
Instance Method Details
#to_a ⇒ Array
Returns the object's property values as an array.
      621 622 623  | 
    
      # File 'lib/google/cloud/vision/annotation/face.rb', line 621 def to_a [x, y, z] end  | 
  
#to_h ⇒ Hash
Converts object to a hash. All keys will be symbolized.
      630 631 632  | 
    
      # File 'lib/google/cloud/vision/annotation/face.rb', line 630 def to_h { x: x, y: y, z: z } end  | 
  
#type ⇒ String
The landmark type code.
      582 583 584  | 
    
      # File 'lib/google/cloud/vision/annotation/face.rb', line 582 def type @grpc.type end  | 
  
#x ⇒ Float
The X (horizontal) coordinate.
      591 592 593 594  | 
    
      # File 'lib/google/cloud/vision/annotation/face.rb', line 591 def x return nil unless @grpc.position @grpc.position.x end  | 
  
#y ⇒ Float
The Y (vertical) coordinate.
      601 602 603 604  | 
    
      # File 'lib/google/cloud/vision/annotation/face.rb', line 601 def y return nil unless @grpc.position @grpc.position.y end  | 
  
#z ⇒ Float
The Z (depth) coordinate.
      611 612 613 614  | 
    
      # File 'lib/google/cloud/vision/annotation/face.rb', line 611 def z return nil unless @grpc.position @grpc.position.z end  |