# ImageContext

Image context and/or feature-specific parameters.

| JSON representation |
|---|
| ``` { "languageHints": [ string ], "textDetectionParams": { object (`https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/vertex-ai/ocr/rest/v1/ImageContext#TextDetectionParams`) } } ``` |

| Fields ||
|---|---|
| `languageHints[]` | `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 `languageHints` 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](https://cloud.google.com/vision/docs/languages). |
| `textDetectionParams` | ``object (`https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/appliance/apis/service/vertex-ai/ocr/rest/v1/ImageContext#TextDetectionParams`)`` Parameters for text detection and document text detection. |

## TextDetectionParams

Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.

| JSON representation |
|---|
| ``` { "enableTextDetectionConfidenceScore": boolean, "advancedOcrOptions": [ string ] } ``` |

| Fields ||
|---|---|
| `enableTextDetectionConfidenceScore` | `boolean` By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well. |
| `advancedOcrOptions[]` | `string` A list of advanced OCR options to fine-tune OCR behavior. |