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
array
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Vision V1 Client - Class TextDetectionParams (2.0.3)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.3 (latest)](/php/docs/reference/cloud-vision/latest/V1.TextDetectionParams)\n- [2.0.2](/php/docs/reference/cloud-vision/2.0.2/V1.TextDetectionParams)\n- [1.10.3](/php/docs/reference/cloud-vision/1.10.3/V1.TextDetectionParams)\n- [1.9.4](/php/docs/reference/cloud-vision/1.9.4/V1.TextDetectionParams)\n- [1.8.0](/php/docs/reference/cloud-vision/1.8.0/V1.TextDetectionParams)\n- [1.7.6](/php/docs/reference/cloud-vision/1.7.6/V1.TextDetectionParams)\n- [1.6.8](/php/docs/reference/cloud-vision/1.6.8/V1.TextDetectionParams) \nReference documentation and code samples for the Cloud Vision V1 Client class TextDetectionParams.\n\nParameters for text detections. This is used to control TEXT_DETECTION and\nDOCUMENT_TEXT_DETECTION features.\n\nGenerated from protobuf message `google.cloud.vision.v1.TextDetectionParams`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Vision \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getEnableTextDetectionConfidenceScore\n\nBy default, Cloud Vision API only includes confidence score for\nDOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence\nscore for TEXT_DETECTION as well.\n\n### setEnableTextDetectionConfidenceScore\n\nBy default, Cloud Vision API only includes confidence score for\nDOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence\nscore for TEXT_DETECTION as well.\n\n### getAdvancedOcrOptions\n\nA list of advanced OCR options to further fine-tune OCR behavior.\n\nCurrent valid values are:\n\n- `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.\n\n### setAdvancedOcrOptions\n\nA list of advanced OCR options to further fine-tune OCR behavior.\n\nCurrent valid values are:\n\n- `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."]]