Reference documentation and code samples for the Cloud Vision V1 Client class TextAnnotation.
TextAnnotation contains a structured representation of OCR extracted text.
The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.
Generated from protobuf message google.cloud.vision.v1.TextAnnotation
Namespace
Google \ Cloud \ Vision \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ pages |
array<Google\Cloud\Vision\V1\Page>
List of pages detected by OCR. |
↳ text |
string
UTF-8 text detected on the pages. |
getPages
List of pages detected by OCR.
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setPages
List of pages detected by OCR.
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Vision\V1\Page>
|
Returns | |
---|---|
Type | Description |
$this |
getText
UTF-8 text detected on the pages.
Returns | |
---|---|
Type | Description |
string |
setText
UTF-8 text detected on the pages.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |