Class: Google::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1CropHint

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/vision_v1p1beta1/classes.rb,
lib/google/apis/vision_v1p1beta1/representations.rb,
lib/google/apis/vision_v1p1beta1/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

Constructor Details

#initialize(**args) ⇒ GoogleCloudVisionV1p1beta1CropHint

Returns a new instance of GoogleCloudVisionV1p1beta1CropHint.



1557
1558
1559
# File 'lib/google/apis/vision_v1p1beta1/classes.rb', line 1557

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

Instance Attribute Details

#bounding_polyGoogle::Apis::VisionV1p1beta1::GoogleCloudVisionV1p1beta1BoundingPoly

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



1544
1545
1546
# File 'lib/google/apis/vision_v1p1beta1/classes.rb', line 1544

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)


1549
1550
1551
# File 'lib/google/apis/vision_v1p1beta1/classes.rb', line 1549

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)


1555
1556
1557
# File 'lib/google/apis/vision_v1p1beta1/classes.rb', line 1555

def importance_fraction
  @importance_fraction
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1562
1563
1564
1565
1566
# File 'lib/google/apis/vision_v1p1beta1/classes.rb', line 1562

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