Class: Google::Cloud::Vision::Image::Context
- Inherits:
-
Object
- Object
- Google::Cloud::Vision::Image::Context
- Defined in:
- lib/google/cloud/vision/image.rb
Overview
Image::Context
Represents an image context.
Defined Under Namespace
Classes: Area
Instance Attribute Summary collapse
-
#area ⇒ Area
readonly
Returns a lat/long rectangle that specifies the location of the image.
-
#languages ⇒ Array<String>
A list of ISO 639-1 language codes to use for text (OCR) detection.
Instance Method Summary collapse
-
#empty? ⇒ Boolean
Returns
true
if eithermin
ormax
are not populated.
Instance Attribute Details
#area ⇒ Area (readonly)
Returns a lat/long rectangle that specifies the location of the image.
442 443 444 |
# File 'lib/google/cloud/vision/image.rb', line 442 def area @area end |
#languages ⇒ Array<String>
A list of ISO 639-1 language codes to use for text (OCR) 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).
437 438 439 |
# File 'lib/google/cloud/vision/image.rb', line 437 def languages @languages end |
Instance Method Details
#empty? ⇒ Boolean
Returns true
if either min
or max
are not populated.
458 459 460 |
# File 'lib/google/cloud/vision/image.rb', line 458 def empty? area.empty? && languages.empty? end |