Cloud Vision V1 Client - Class EntityAnnotation (1.9.3)

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

Namespace

Google \ Cloud \ Vision \ V1

Methods

__construct

Constructor.

Parameters
Name Description
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
Type Description
string

setMid

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

Parameter
Name Description
var string
Returns
Type Description
$this

getLocale

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

Returns
Type Description
string

setLocale

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

Parameter
Name Description
var string
Returns
Type Description
$this

getDescription

Entity textual description, expressed in its locale language.

Returns
Type Description
string

setDescription

Entity textual description, expressed in its locale language.

Parameter
Name Description
var string
Returns
Type Description
$this

getScore

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

Returns
Type Description
float

setScore

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

Parameter
Name Description
var float
Returns
Type Description
$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
Type Description
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
Name Description
var float
Returns
Type Description
$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
Type Description
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
Name Description
var float
Returns
Type Description
$this

getBoundingPoly

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

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

hasBoundingPoly

clearBoundingPoly

setBoundingPoly

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

Parameter
Name Description
var Google\Cloud\Vision\V1\BoundingPoly
Returns
Type Description
$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
Type Description
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
Name Description
var array<Google\Cloud\Vision\V1\LocationInfo>
Returns
Type Description
$this

getProperties

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

Returns
Type Description
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
Name Description
var array<Google\Cloud\Vision\V1\Property>
Returns
Type Description
$this