# Cloud Vision V1 Client - Class ImageContext (2.2.1)

2.2.1 (latest) 2.2.0 2.1.3 2.0.3 1.10.3 1.9.4 1.8.0 1.7.6 1.6.8 Reference documentation and code samples for the Cloud Vision V1 Client class ImageContext.

Image context and/or feature-specific parameters.

Generated from protobuf message `google.cloud.vision.v1.ImageContext`

## Namespace

Google \\ Cloud \\ Vision \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ lat_long_rect` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.LatLongRect` Not used. |
| `↳ language_hints` | `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](https://cloud.google.com/vision/docs/languages). |
| `↳ crop_hints_params` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.CropHintsParams` Parameters for crop hints annotation request. |
| `↳ product_search_params` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.ProductSearchParams` Parameters for product search. |
| `↳ web_detection_params` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.WebDetectionParams` Parameters for web detection. |
| `↳ text_detection_params` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.TextDetectionParams` Parameters for text detection and document text detection. |

### getLatLongRect

Not used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.LatLongRect|null` |   |

### hasLatLongRect

### clearLatLongRect

### setLatLongRect

Not used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.LatLongRect` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLanguageHints

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](https://cloud.google.com/vision/docs/languages).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setLanguageHints

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](https://cloud.google.com/vision/docs/languages).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCropHintsParams

Parameters for crop hints annotation request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.CropHintsParams|null` |   |

### hasCropHintsParams

### clearCropHintsParams

### setCropHintsParams

Parameters for crop hints annotation request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.CropHintsParams` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getProductSearchParams

Parameters for product search.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.ProductSearchParams|null` |   |

### hasProductSearchParams

### clearProductSearchParams

### setProductSearchParams

Parameters for product search.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.ProductSearchParams` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getWebDetectionParams

Parameters for web detection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.WebDetectionParams|null` |   |

### hasWebDetectionParams

### clearWebDetectionParams

### setWebDetectionParams

Parameters for web detection.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.WebDetectionParams` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTextDetectionParams

Parameters for text detection and document text detection.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.TextDetectionParams|null` |   |

### hasTextDetectionParams

### clearTextDetectionParams

### setTextDetectionParams

Parameters for text detection and document text detection.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-vision/latest/V1.TextDetectionParams` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |