Cloud Vision V1 Client - Class AnnotateImageResponse (1.6.8)

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

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ face_annotations array<Google\Cloud\Vision\V1\FaceAnnotation>

If present, face detection has completed successfully.

↳ landmark_annotations array<Google\Cloud\Vision\V1\EntityAnnotation>

If present, landmark detection has completed successfully.

↳ logo_annotations array<Google\Cloud\Vision\V1\EntityAnnotation>

If present, logo detection has completed successfully.

↳ label_annotations array<Google\Cloud\Vision\V1\EntityAnnotation>

If present, label detection has completed successfully.

↳ localized_object_annotations array<Google\Cloud\Vision\V1\LocalizedObjectAnnotation>

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

↳ text_annotations array<Google\Cloud\Vision\V1\EntityAnnotation>

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

↳ full_text_annotation Google\Cloud\Vision\V1\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 Google\Cloud\Vision\V1\SafeSearchAnnotation

If present, safe-search annotation has completed successfully.

↳ image_properties_annotation Google\Cloud\Vision\V1\ImageProperties

If present, image properties were extracted successfully.

↳ crop_hints_annotation Google\Cloud\Vision\V1\CropHintsAnnotation

If present, crop hints have completed successfully.

↳ web_detection Google\Cloud\Vision\V1\WebDetection

If present, web detection has completed successfully.

↳ product_search_results Google\Cloud\Vision\V1\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 Google\Cloud\Vision\V1\ImageAnnotationContext

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

getFaceAnnotations

If present, face detection has completed successfully.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setFaceAnnotations

If present, face detection has completed successfully.

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

getLandmarkAnnotations

If present, landmark detection has completed successfully.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLandmarkAnnotations

If present, landmark detection has completed successfully.

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

getLogoAnnotations

If present, logo detection has completed successfully.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLogoAnnotations

If present, logo detection has completed successfully.

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

getLabelAnnotations

If present, label detection has completed successfully.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLabelAnnotations

If present, label detection has completed successfully.

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

getLocalizedObjectAnnotations

If present, localized object detection has completed successfully.

This will be sorted descending by confidence score.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setLocalizedObjectAnnotations

If present, localized object detection has completed successfully.

This will be sorted descending by confidence score.

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

getTextAnnotations

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

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTextAnnotations

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

Parameter
NameDescription
var array<Google\Cloud\Vision\V1\EntityAnnotation>
Returns
TypeDescription
$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
TypeDescription
Google\Cloud\Vision\V1\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
NameDescription
var Google\Cloud\Vision\V1\TextAnnotation
Returns
TypeDescription
$this

getSafeSearchAnnotation

If present, safe-search annotation has completed successfully.

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

hasSafeSearchAnnotation

clearSafeSearchAnnotation

setSafeSearchAnnotation

If present, safe-search annotation has completed successfully.

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

getImagePropertiesAnnotation

If present, image properties were extracted successfully.

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

hasImagePropertiesAnnotation

clearImagePropertiesAnnotation

setImagePropertiesAnnotation

If present, image properties were extracted successfully.

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

getCropHintsAnnotation

If present, crop hints have completed successfully.

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

hasCropHintsAnnotation

clearCropHintsAnnotation

setCropHintsAnnotation

If present, crop hints have completed successfully.

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

getWebDetection

If present, web detection has completed successfully.

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

hasWebDetection

clearWebDetection

setWebDetection

If present, web detection has completed successfully.

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

getProductSearchResults

If present, product search has completed successfully.

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

hasProductSearchResults

clearProductSearchResults

setProductSearchResults

If present, product search has completed successfully.

Parameter
NameDescription
var Google\Cloud\Vision\V1\ProductSearchResults
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Rpc\Status
Returns
TypeDescription
$this

getContext

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

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

hasContext

clearContext

setContext

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

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