Cloud Vision V1 Client - Class AnnotateImageResponse (1.10.1)

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

Response to an image annotation request.

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

Namespace

Google \ Cloud \ Vision \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ face_annotations array<FaceAnnotation>

If present, face detection has completed successfully.

↳ landmark_annotations array<EntityAnnotation>

If present, landmark detection has completed successfully.

↳ logo_annotations array<EntityAnnotation>

If present, logo detection has completed successfully.

↳ label_annotations array<EntityAnnotation>

If present, label detection has completed successfully.

↳ localized_object_annotations array<LocalizedObjectAnnotation>

If present, localized object detection has completed successfully. This will be sorted descending by confidence score.

↳ text_annotations array<EntityAnnotation>

If present, text (OCR) detection has completed successfully.

↳ full_text_annotation TextAnnotation

If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.

↳ safe_search_annotation SafeSearchAnnotation

If present, safe-search annotation has completed successfully.

↳ image_properties_annotation ImageProperties

If present, image properties were extracted successfully.

↳ crop_hints_annotation CropHintsAnnotation

If present, crop hints have completed successfully.

↳ web_detection WebDetection

If present, web detection has completed successfully.

↳ product_search_results ProductSearchResults

If present, product search has completed successfully.

↳ error Google\Rpc\Status

If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when error is set.

↳ context ImageAnnotationContext

If present, contextual information is needed to understand where this image comes from.

getFaceAnnotations

If present, face detection has completed successfully.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setFaceAnnotations

If present, face detection has completed successfully.

Parameter
Name Description
var array<FaceAnnotation>
Returns
Type Description
$this

getLandmarkAnnotations

If present, landmark detection has completed successfully.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setLandmarkAnnotations

If present, landmark detection has completed successfully.

Parameter
Name Description
var array<EntityAnnotation>
Returns
Type Description
$this

getLogoAnnotations

If present, logo detection has completed successfully.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setLogoAnnotations

If present, logo detection has completed successfully.

Parameter
Name Description
var array<EntityAnnotation>
Returns
Type Description
$this

getLabelAnnotations

If present, label detection has completed successfully.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setLabelAnnotations

If present, label detection has completed successfully.

Parameter
Name Description
var array<EntityAnnotation>
Returns
Type Description
$this

getLocalizedObjectAnnotations

If present, localized object detection has completed successfully.

This will be sorted descending by confidence score.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setLocalizedObjectAnnotations

If present, localized object detection has completed successfully.

This will be sorted descending by confidence score.

Parameter
Name Description
var array<LocalizedObjectAnnotation>
Returns
Type Description
$this

getTextAnnotations

If present, text (OCR) detection has completed successfully.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setTextAnnotations

If present, text (OCR) detection has completed successfully.

Parameter
Name Description
var array<EntityAnnotation>
Returns
Type Description
$this

getFullTextAnnotation

If present, text (OCR) detection or document (OCR) text detection has completed successfully.

This annotation provides the structural hierarchy for the OCR detected text.

Returns
Type Description
TextAnnotation|null

hasFullTextAnnotation

clearFullTextAnnotation

setFullTextAnnotation

If present, text (OCR) detection or document (OCR) text detection has completed successfully.

This annotation provides the structural hierarchy for the OCR detected text.

Parameter
Name Description
var TextAnnotation
Returns
Type Description
$this

getSafeSearchAnnotation

If present, safe-search annotation has completed successfully.

Returns
Type Description
SafeSearchAnnotation|null

hasSafeSearchAnnotation

clearSafeSearchAnnotation

setSafeSearchAnnotation

If present, safe-search annotation has completed successfully.

Parameter
Name Description
var SafeSearchAnnotation
Returns
Type Description
$this

getImagePropertiesAnnotation

If present, image properties were extracted successfully.

Returns
Type Description
ImageProperties|null

hasImagePropertiesAnnotation

clearImagePropertiesAnnotation

setImagePropertiesAnnotation

If present, image properties were extracted successfully.

Parameter
Name Description
var ImageProperties
Returns
Type Description
$this

getCropHintsAnnotation

If present, crop hints have completed successfully.

Returns
Type Description
CropHintsAnnotation|null

hasCropHintsAnnotation

clearCropHintsAnnotation

setCropHintsAnnotation

If present, crop hints have completed successfully.

Parameter
Name Description
var CropHintsAnnotation
Returns
Type Description
$this

getWebDetection

If present, web detection has completed successfully.

Returns
Type Description
WebDetection|null

hasWebDetection

clearWebDetection

setWebDetection

If present, web detection has completed successfully.

Parameter
Name Description
var WebDetection
Returns
Type Description
$this

getProductSearchResults

If present, product search has completed successfully.

Returns
Type Description
ProductSearchResults|null

hasProductSearchResults

clearProductSearchResults

setProductSearchResults

If present, product search has completed successfully.

Parameter
Name Description
var ProductSearchResults
Returns
Type Description
$this

getError

If set, represents the error message for the operation.

Note that filled-in image annotations are guaranteed to be correct, even when error is set.

Returns
Type Description
Google\Rpc\Status|null

hasError

clearError

setError

If set, represents the error message for the operation.

Note that filled-in image annotations are guaranteed to be correct, even when error is set.

Parameter
Name Description
var Google\Rpc\Status
Returns
Type Description
$this

getContext

If present, contextual information is needed to understand where this image comes from.

Returns
Type Description
ImageAnnotationContext|null

hasContext

clearContext

setContext

If present, contextual information is needed to understand where this image comes from.

Parameter
Name Description
var ImageAnnotationContext
Returns
Type Description
$this