Class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1CropHintsParams

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/vision_v1p1beta1/classes.rb,
generated/google/apis/vision_v1p1beta1/representations.rb,
generated/google/apis/vision_v1p1beta1/representations.rb

Overview

Parameters for crop hints annotation request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudVisionV1p1beta1CropHintsParams

Returns a new instance of GoogleCloudVisionV1p1beta1CropHintsParams



1576
1577
1578
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 1576

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#aspect_ratiosArray<Float>

Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored. Corresponds to the JSON property aspectRatios

Returns:

  • (Array<Float>)


1574
1575
1576
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 1574

def aspect_ratios
  @aspect_ratios
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1581
1582
1583
# File 'generated/google/apis/vision_v1p1beta1/classes.rb', line 1581

def update!(**args)
  @aspect_ratios = args[:aspect_ratios] if args.key?(:aspect_ratios)
end