Class: Google::Apis::VisionV1p2beta1::GoogleCloudVisionV1p4beta1CropHint

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

Overview

Single crop hint that is used to generate a new crop when serving an image.

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) ⇒ GoogleCloudVisionV1p4beta1CropHint

Returns a new instance of GoogleCloudVisionV1p4beta1CropHint



7422
7423
7424
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 7422

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

Instance Attribute Details

#bounding_polyGoogle::Apis::VisionV1p2beta1::GoogleCloudVisionV1p4beta1BoundingPoly

A bounding polygon for the detected image annotation. Corresponds to the JSON property boundingPoly



7409
7410
7411
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 7409

def bounding_poly
  @bounding_poly
end

#confidenceFloat

Confidence of this being a salient region. Range [0, 1]. Corresponds to the JSON property confidence

Returns:

  • (Float)


7414
7415
7416
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 7414

def confidence
  @confidence
end

#importance_fractionFloat

Fraction of importance of this salient region with respect to the original image. Corresponds to the JSON property importanceFraction

Returns:

  • (Float)


7420
7421
7422
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 7420

def importance_fraction
  @importance_fraction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7427
7428
7429
7430
7431
# File 'generated/google/apis/vision_v1p2beta1/classes.rb', line 7427

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