Cloud Vision V1 Client - Class TextAnnotation (1.6.8)

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

Methods

__construct

Constructor.

Parameters
NameDescription
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
TypeDescription
Google\Protobuf\Internal\RepeatedField

setPages

List of pages detected by OCR.

Parameter
NameDescription
var array<Google\Cloud\Vision\V1\Page>
Returns
TypeDescription
$this

getText

UTF-8 text detected on the pages.

Returns
TypeDescription
string

setText

UTF-8 text detected on the pages.

Parameter
NameDescription
var string
Returns
TypeDescription
$this