Class: Google::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1LabelAnnotation

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

Label annotation.

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

Returns a new instance of GoogleCloudVideointelligenceV1LabelAnnotation.



263
264
265
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 263

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

Instance Attribute Details

#category_entitiesArray<Google::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1Entity>

Common categories for the detected entity. E.g. when the label is Terrier the category is likely dog. And in some cases there might be more than one categories e.g. Terrier could also be a pet. Corresponds to the JSON property categoryEntities



246
247
248
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 246

def category_entities
  @category_entities
end

#entityGoogle::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1Entity

Detected entity from video analysis. Corresponds to the JSON property entity



251
252
253
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 251

def entity
  @entity
end

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

All video frames where a label was detected. Corresponds to the JSON property frames



256
257
258
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 256

def frames
  @frames
end

#segmentsArray<Google::Apis::VideointelligenceV1::GoogleCloudVideointelligenceV1LabelSegment>

All video segments where a label was detected. Corresponds to the JSON property segments



261
262
263
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 261

def segments
  @segments
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



268
269
270
271
272
273
# File 'generated/google/apis/videointelligence_v1/classes.rb', line 268

def update!(**args)
  @category_entities = args[:category_entities] if args.key?(:category_entities)
  @entity = args[:entity] if args.key?(:entity)
  @frames = args[:frames] if args.key?(:frames)
  @segments = args[:segments] if args.key?(:segments)
end