Reference documentation and code samples for the Cloud Vision V1 Client class ReferenceImage.
A ReferenceImage
represents a product image and its associated metadata,
such as bounding boxes.
Generated from protobuf message google.cloud.vision.v1.ReferenceImage
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ name |
string
The resource name of the reference image. Format is: |
↳ uri |
string
Required. The Google Cloud Storage URI of the reference image. The URI must start with |
↳ bounding_polys |
array<Google\Cloud\Vision\V1\BoundingPoly>
Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not). |
getName
The resource name of the reference image.
Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID
.
This field is ignored when creating a reference image.
Returns | |
---|---|
Type | Description |
string |
setName
The resource name of the reference image.
Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID
.
This field is ignored when creating a reference image.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getUri
Required. The Google Cloud Storage URI of the reference image.
The URI must start with gs://
.
Returns | |
---|---|
Type | Description |
string |
setUri
Required. The Google Cloud Storage URI of the reference image.
The URI must start with gs://
.
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getBoundingPolys
Optional. Bounding polygons around the areas of interest in the reference image.
If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setBoundingPolys
Optional. Bounding polygons around the areas of interest in the reference image.
If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Vision\V1\BoundingPoly>
|
Returns | |
---|---|
Type | Description |
$this |