Cloud Vision V1 Client - Class ObjectAnnotation (1.7.6)

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

Prediction for what the object in the bounding box is.

Generated from protobuf message google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation

Namespace

Google \ Cloud \ Vision \ V1 \ ProductSearchResults

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].

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