Cloud Vision V1 Client - Class EntityAnnotation (1.6.8)

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

Set of detected entity features.

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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ mid string

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

↳ locale string

The language code for the locale in which the entity textual description is expressed.

↳ description string

Entity textual description, expressed in its locale language.

↳ score float

Overall score of the result. Range [0, 1].

↳ confidence float

Deprecated. Use score instead. The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].

↳ topicality float

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].

↳ bounding_poly Google\Cloud\Vision\V1\BoundingPoly

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

↳ locations array<Google\Cloud\Vision\V1\LocationInfo>

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.

↳ properties array<Google\Cloud\Vision\V1\Property>

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

getMid

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

Returns
TypeDescription
string

setMid

Opaque entity ID. Some IDs may be available in Google Knowledge Graph Search API.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getLocale

The language code for the locale in which the entity textual description is expressed.

Returns
TypeDescription
string

setLocale

The language code for the locale in which the entity textual description is expressed.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDescription

Entity textual description, expressed in its locale language.

Returns
TypeDescription
string

setDescription

Entity textual description, expressed in its locale language.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getScore

Overall score of the result. Range [0, 1].

Returns
TypeDescription
float

setScore

Overall score of the result. Range [0, 1].

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getConfidence

Deprecated. Use score instead. The accuracy of the entity detection in an image.

For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].

Returns
TypeDescription
float

setConfidence

Deprecated. Use score instead. The accuracy of the entity detection in an image.

For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getTopicality

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].

Returns
TypeDescription
float

setTopicality

The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].

Parameter
NameDescription
var float
Returns
TypeDescription
$this

getBoundingPoly

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

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

hasBoundingPoly

clearBoundingPoly

setBoundingPoly

Image region to which this entity belongs. Not produced for LABEL_DETECTION features.

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

getLocations

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken.

Location information is usually present for landmarks.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLocations

The location information for the detected entity. Multiple LocationInfo elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken.

Location information is usually present for landmarks.

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

getProperties

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setProperties

Some entities may have optional user-supplied Property (name/value) fields, such a score or string that qualifies the entity.

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