# Cloud Vision V1 Client - Class TextDetectionParams (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 TextDetectionParams.

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

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

## Namespace

Google \\ Cloud \\ Vision \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ enable_text_detection_confidence_score` | `bool` 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. |
| `↳ advanced_ocr_options` | `string[]` A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation. |

### getEnableTextDetectionConfidenceScore

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setEnableTextDetectionConfidenceScore

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

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

### getAdvancedOcrOptions

A list of advanced OCR options to further fine-tune OCR behavior.

Current valid values are:

- `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.

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

### setAdvancedOcrOptions

A list of advanced OCR options to further fine-tune OCR behavior.

Current valid values are:

- `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.

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

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