Class: Google::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1NormalizedBoundingBox

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

Overview

Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].

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

Returns a new instance of GoogleCloudVideointelligenceV1NormalizedBoundingBox.



526
527
528
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 526

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

Instance Attribute Details

#bottomFloat

Bottom Y coordinate. Corresponds to the JSON property bottom

Returns:

  • (Float)


509
510
511
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 509

def bottom
  @bottom
end

#leftFloat

Left X coordinate. Corresponds to the JSON property left

Returns:

  • (Float)


514
515
516
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 514

def left
  @left
end

#rightFloat

Right X coordinate. Corresponds to the JSON property right

Returns:

  • (Float)


519
520
521
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 519

def right
  @right
end

#topFloat

Top Y coordinate. Corresponds to the JSON property top

Returns:

  • (Float)


524
525
526
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 524

def top
  @top
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



531
532
533
534
535
536
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 531

def update!(**args)
  @bottom = args[:bottom] if args.key?(:bottom)
  @left = args[:left] if args.key?(:left)
  @right = args[:right] if args.key?(:right)
  @top = args[:top] if args.key?(:top)
end