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

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
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 and/or feature-specific parameters.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ImageContext

Returns a new instance of ImageContext.



8569
8570
8571
# File 'lib/google/apis/vision_v1/classes.rb', line 8569

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

Instance Attribute Details

#crop_hints_paramsGoogle::Apis::VisionV1::CropHintsParams

Parameters for crop hints annotation request. Corresponds to the JSON property cropHintsParams



8534
8535
8536
# File 'lib/google/apis/vision_v1/classes.rb', line 8534

def crop_hints_params
  @crop_hints_params
end

#language_hintsArray<String>

List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the supported languages. Corresponds to the JSON property languageHints

Returns:

  • (Array<String>)


8546
8547
8548
# File 'lib/google/apis/vision_v1/classes.rb', line 8546

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



8551
8552
8553
# File 'lib/google/apis/vision_v1/classes.rb', line 8551

def lat_long_rect
  @lat_long_rect
end

#product_search_paramsGoogle::Apis::VisionV1::ProductSearchParams

Parameters for a product search request. Corresponds to the JSON property productSearchParams



8556
8557
8558
# File 'lib/google/apis/vision_v1/classes.rb', line 8556

def product_search_params
  @product_search_params
end

#text_detection_paramsGoogle::Apis::VisionV1::TextDetectionParams

Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features. Corresponds to the JSON property textDetectionParams



8562
8563
8564
# File 'lib/google/apis/vision_v1/classes.rb', line 8562

def text_detection_params
  @text_detection_params
end

#web_detection_paramsGoogle::Apis::VisionV1::WebDetectionParams

Parameters for web detection request. Corresponds to the JSON property webDetectionParams



8567
8568
8569
# File 'lib/google/apis/vision_v1/classes.rb', line 8567

def web_detection_params
  @web_detection_params
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8574
8575
8576
8577
8578
8579
8580
8581
# File 'lib/google/apis/vision_v1/classes.rb', line 8574

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