Cloud Vision V1 Client - Class LocalizedObjectAnnotation (1.7.6)

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
NameDescription
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
TypeDescription
string

setMid

Object ID that should align with EntityAnnotation mid.

Parameter
NameDescription
var string
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var string
Returns
TypeDescription
$this

getName

Object name, expressed in its language_code language.

Returns
TypeDescription
string

setName

Object name, expressed in its language_code language.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getScore

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

Returns
TypeDescription
float

setScore

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

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getBoundingPoly

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

Returns
TypeDescription
Google\Cloud\Vision\V1\BoundingPoly|null

hasBoundingPoly

clearBoundingPoly

setBoundingPoly

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

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