Class: Google::Apis::VisionV1::CropHint
- Inherits:
 - 
      Object
      
        
- Object
 - Google::Apis::VisionV1::CropHint
 
 
- Includes:
 - Core::Hashable, Core::JsonObjectSupport
 
- Defined in:
 - generated/google/apis/vision_v1/classes.rb,
generated/google/apis/vision_v1/representations.rb,
generated/google/apis/vision_v1/representations.rb 
Overview
Single crop hint that is used to generate a new crop when serving an image.
Instance Attribute Summary collapse
- 
  
    
      #bounding_poly  ⇒ Google::Apis::VisionV1::BoundingPoly 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
A bounding polygon for the detected image annotation.
 - 
  
    
      #confidence  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Confidence of this being a salient region.
 - 
  
    
      #importance_fraction  ⇒ Float 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Fraction of importance of this salient region with respect to the original image.
 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ CropHint 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of CropHint.
 - 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Update properties of this object.
 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ CropHint
Returns a new instance of CropHint
      731 732 733  | 
    
      # File 'generated/google/apis/vision_v1/classes.rb', line 731 def initialize(**args) update!(**args) end  | 
  
Instance Attribute Details
#bounding_poly ⇒ Google::Apis::VisionV1::BoundingPoly
A bounding polygon for the detected image annotation.
Corresponds to the JSON property boundingPoly
      718 719 720  | 
    
      # File 'generated/google/apis/vision_v1/classes.rb', line 718 def bounding_poly @bounding_poly end  | 
  
#confidence ⇒ Float
Confidence of this being a salient region.  Range [0, 1].
Corresponds to the JSON property confidence
      723 724 725  | 
    
      # File 'generated/google/apis/vision_v1/classes.rb', line 723 def confidence @confidence end  | 
  
#importance_fraction ⇒ Float
Fraction of importance of this salient region with respect to the original
image.
Corresponds to the JSON property importanceFraction
      729 730 731  | 
    
      # File 'generated/google/apis/vision_v1/classes.rb', line 729 def importance_fraction @importance_fraction end  | 
  
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
      736 737 738 739 740  | 
    
      # File 'generated/google/apis/vision_v1/classes.rb', line 736 def update!(**args) @bounding_poly = args[:bounding_poly] if args.key?(:bounding_poly) @confidence = args[:confidence] if args.key?(:confidence) @importance_fraction = args[:importance_fraction] if args.key?(:importance_fraction) end  |