Class: Google::Apis::VisionV1::ImageContext

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable
Defined in:
lib/google/apis/vision_v1/classes.rb,
lib/google/apis/vision_v1/representations.rb,
lib/google/apis/vision_v1/representations.rb

Overview

Image context.

Defined Under Namespace

Classes: Representation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ImageContext

Returns a new instance of ImageContext.



684
685
686
# File 'lib/google/apis/vision_v1/classes.rb', line 684

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

Instance Attribute Details

#language_hintsArray<String>

List of languages to use for TEXT_DETECTION. In most cases, an empty value will yield the best results as it will allow text detection to automatically detect the text language. For languages based on the latin alphabet a hint is not needed. In rare cases, when the language of the text in the image is known in advance, setting this hint will help get better results (although it will hurt a great deal if the hint is wrong). Text detection will return an error if one or more of the languages specified here are not supported. The exact list of supported languages are specified here: cloud.google.com/translate/v2/using_rest#language-params Corresponds to the JSON property ‘languageHints`

Returns:

  • (Array<String>)


677
678
679
# File 'lib/google/apis/vision_v1/classes.rb', line 677

def language_hints
  @language_hints
end

#lat_long_rectGoogle::Apis::VisionV1::LatLongRect

Rectangle determined by min and max LatLng pairs. Corresponds to the JSON property ‘latLongRect`



682
683
684
# File 'lib/google/apis/vision_v1/classes.rb', line 682

def lat_long_rect
  @lat_long_rect
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



689
690
691
692
# File 'lib/google/apis/vision_v1/classes.rb', line 689

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