class TextAnnotation extends Message

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 [google.cloud.vision.v1.TextAnnotation.TextProperty][google.cloud.vision.v1.TextAnnotation.TextProperty] message definition below for more detail.

Protobuf type Google\Cloud\Vision\V1\TextAnnotation

Methods

__construct()

No description

RepeatedField
getPages()

List of pages detected by OCR.

setPages(array|RepeatedField $var)

List of pages detected by OCR.

string
getText()

UTF-8 text detected on the pages.

setText(string $var)

UTF-8 text detected on the pages.

Details

at line 37
__construct()

at line 48
RepeatedField getPages()

List of pages detected by OCR.

Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1;

Return Value

RepeatedField

at line 59
setPages(array|RepeatedField $var)

List of pages detected by OCR.

Generated from protobuf field repeated .google.cloud.vision.v1.Page pages = 1;

Parameters

array|RepeatedField $var

at line 71
string getText()

UTF-8 text detected on the pages.

Generated from protobuf field string text = 2;

Return Value

string

at line 82
setText(string $var)

UTF-8 text detected on the pages.

Generated from protobuf field string text = 2;

Parameters

string $var