Resource: ReferenceImage
A ReferenceImage
represents a product image and its associated metadata, such as bounding boxes.
JSON representation |
---|
{
"name": string,
"uri": string,
"boundingPolys": [
{
object ( |
Fields | |
---|---|
name |
The resource name of the reference image. Format is: This field is ignored when creating a reference image. |
uri |
Required. The Google Cloud Storage URI of the reference image. The URI must start with |
boundingPolys[] |
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). |
BoundingPoly
A bounding polygon for the detected image annotation.
JSON representation |
---|
{ "vertices": [ { object ( |
Fields | |
---|---|
vertices[] |
The bounding polygon vertices. |
normalizedVertices[] |
The bounding polygon normalized vertices. |
Vertex
A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.
JSON representation |
---|
{ "x": integer, "y": integer } |
Fields | |
---|---|
x |
X coordinate. |
y |
Y coordinate. |
NormalizedVertex
A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.
JSON representation |
---|
{ "x": number, "y": number } |
Fields | |
---|---|
x |
X coordinate. |
y |
Y coordinate. |
Methods |
|
---|---|
|
Creates and returns a new ReferenceImage resource. |
|
Permanently deletes a reference image. |
|
Gets information associated with a ReferenceImage. |
|
Lists reference images. |