Cloud Vision V1 Client - Class Page (1.7.6)

Reference documentation and code samples for the Cloud Vision V1 Client class Page.

Detected page from OCR.

Generated from protobuf message google.cloud.vision.v1.Page

Namespace

Google \ Cloud \ Vision \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ property Google\Cloud\Vision\V1\TextAnnotation\TextProperty

Additional information detected on the page.

↳ width int

Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.

↳ height int

Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.

↳ blocks array<Google\Cloud\Vision\V1\Block>

List of blocks of text, images etc on this page.

↳ confidence float

Confidence of the OCR results on the page. Range [0, 1].

getProperty

Additional information detected on the page.

Returns
TypeDescription
Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null

hasProperty

clearProperty

setProperty

Additional information detected on the page.

Parameter
NameDescription
var Google\Cloud\Vision\V1\TextAnnotation\TextProperty
Returns
TypeDescription
$this

getWidth

Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.

Returns
TypeDescription
int

setWidth

Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getHeight

Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.

Returns
TypeDescription
int

setHeight

Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getBlocks

List of blocks of text, images etc on this page.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setBlocks

List of blocks of text, images etc on this page.

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

getConfidence

Confidence of the OCR results on the page. Range [0, 1].

Returns
TypeDescription
float

setConfidence

Confidence of the OCR results on the page. Range [0, 1].

Parameter
NameDescription
var float
Returns
TypeDescription
$this