Cloud Vision V1 Client - Class LocalizedObjectAnnotation (1.9.2)

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

Set of detected objects with bounding boxes.

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

Namespace

Google \ Cloud \ Vision \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ mid string

Object ID that should align with EntityAnnotation mid.

↳ language_code string

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

↳ name string

Object name, expressed in its language_code language.

↳ score float

Score of the result. Range [0, 1].

↳ bounding_poly Google\Cloud\Vision\V1\BoundingPoly

Image region to which this object belongs. This must be populated.

getMid

Object ID that should align with EntityAnnotation mid.

Returns
Type Description
string

setMid

Object ID that should align with EntityAnnotation mid.

Parameter
Name Description
var string
Returns
Type Description
$this

getLanguageCode

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

Returns
Type Description
string

setLanguageCode

The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

Parameter
Name Description
var string
Returns
Type Description
$this

getName

Object name, expressed in its language_code language.

Returns
Type Description
string

setName

Object name, expressed in its language_code language.

Parameter
Name Description
var string
Returns
Type Description
$this

getScore

Score of the result. Range [0, 1].

Returns
Type Description
float

setScore

Score of the result. Range [0, 1].

Parameter
Name Description
var float
Returns
Type Description
$this

getBoundingPoly

Image region to which this object belongs. This must be populated.

Returns
Type Description
Google\Cloud\Vision\V1\BoundingPoly|null

hasBoundingPoly

clearBoundingPoly

setBoundingPoly

Image region to which this object belongs. This must be populated.

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