Cloud Vision V1 Client - Class Page (1.9.2)

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
Name Description
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
Type Description
Google\Cloud\Vision\V1\TextAnnotation\TextProperty|null

hasProperty

clearProperty

setProperty

Additional information detected on the page.

Parameter
Name Description
var Google\Cloud\Vision\V1\TextAnnotation\TextProperty
Returns
Type Description
$this

getWidth

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

Returns
Type Description
int

setWidth

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

Parameter
Name Description
var int
Returns
Type Description
$this

getHeight

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

Returns
Type Description
int

setHeight

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

Parameter
Name Description
var int
Returns
Type Description
$this

getBlocks

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

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setBlocks

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

Parameter
Name Description
var array<Google\Cloud\Vision\V1\Block>
Returns
Type Description
$this

getConfidence

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

Returns
Type Description
float

setConfidence

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

Parameter
Name Description
var float
Returns
Type Description
$this