Class: Google::Apis::VideointelligenceV1p1beta1::GoogleCloudVideointelligenceV1p1beta1TextFrame

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

Overview

Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.

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

Returns a new instance of GoogleCloudVideointelligenceV1p1beta1TextFrame



2467
2468
2469
# File 'generated/google/apis/videointelligence_v1p1beta1/classes.rb', line 2467

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

Instance Attribute Details

#rotated_bounding_boxGoogle::Apis::VideointelligenceV1p1beta1::GoogleCloudVideointelligenceV1p1beta1NormalizedBoundingPoly

Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box. Corresponds to the JSON property rotatedBoundingBox



2460
2461
2462
# File 'generated/google/apis/videointelligence_v1p1beta1/classes.rb', line 2460

def rotated_bounding_box
  @rotated_bounding_box
end

#time_offsetString

Timestamp of this frame. Corresponds to the JSON property timeOffset

Returns:

  • (String)


2465
2466
2467
# File 'generated/google/apis/videointelligence_v1p1beta1/classes.rb', line 2465

def time_offset
  @time_offset
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2472
2473
2474
2475
# File 'generated/google/apis/videointelligence_v1p1beta1/classes.rb', line 2472

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