Class: Google::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1TextSegment

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

Video segment level annotation results for text detection.

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

Returns a new instance of GoogleCloudVideointelligenceV1TextSegment.



918
919
920
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 918

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

Instance Attribute Details

#confidenceFloat

Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears. Corresponds to the JSON property confidence

Returns:

  • (Float)


906
907
908
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 906

def confidence
  @confidence
end

#framesArray<Google::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1TextFrame>

Information related to the frames where OCR detected text appears. Corresponds to the JSON property frames



911
912
913
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 911

def frames
  @frames
end

#segmentGoogle::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1VideoSegment

Video segment. Corresponds to the JSON property segment



916
917
918
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 916

def segment
  @segment
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



923
924
925
926
927
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 923

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