Ressource: ReferenceImage
Ein ReferenceImage
stellt ein Produktbild und die zugehörigen Metadaten wie Begrenzungsrahmen dar.
JSON-Darstellung | |
---|---|
{
"name": string,
"uri": string,
"boundingPolys": [
{
object( |
Felder | |
---|---|
name |
Der Ressourcenname des Referenzbildes. Format ist:
Dieses Feld wird beim Erstellen eines Referenzbildes ignoriert. |
uri |
Der Google Cloud Storage-URI des Referenzbildes. Der URI muss mit Erforderlich. |
boundingPolys[] |
Polygone an den relevanten Bereichen im Referenzbild begrenzen Optional. Wenn dieses Feld leer ist, versucht das System, interessante Regionen zu erkennen. Es werden maximal zehn Begrenzungspolygone verwendet. Die bereitgestellte Form wird in ein nicht gedrehtes Rechteck konvertiert. Nach der Umwandlung muss der kleine Rand des Rechtecks größer oder gleich 300 Pixel sein. Das Seitenverhältnis muss 1:4 oder niedriger sein, z. B. 1:3 ist zulässig, 1:5 nicht. |
BoundingPoly
Ein Begrenzungspolygon für die erkannte Bildanmerkung
JSON-Darstellung | |
---|---|
{ "vertices": [ { object( |
Felder | |
---|---|
vertices[] |
Die Eckpunkte des Begrenzungspolygons |
normalizedVertices[] |
Das Eckpolygon normalisierte Eckpunkte. |
Vertex
Ein Scheitelpunkt repräsentiert einen 2D-Punkt im Bild. HINWEIS: Die Scheitelpunktkoordinaten haben den gleichen Maßstab wie das Originalbild.
JSON-Darstellung | |
---|---|
{ "x": number, "y": number } |
Felder | |
---|---|
x |
X-Koordinate |
y |
Y-Koordinate |
Zero coordinate values
The general format for bounding polys in the JSON response when detected is an array of 4 vertex objects:
[{"x": 63,"y": 18},{"x": 123,"y": 18},{"x": 123,"y": 38},{"x": 63,"y": 38}]
[{},{"x": 28},
{"x": 28,"y": 43},{"y": 43}]
. This response shows all three representation possibilities:
{}
- an empty object when both"x":0
and"y":0
.{"x": 28}
and{"y": 43}
- an object with a single key-value pair when one coordinate is 0 but the other is a non-zero value.{"x": 28,"y": 43}
- an object with both key-value pairs when both coordinates have a non-zero value.
NormalizedVertex
Ein Scheitelpunkt repräsentiert einen 2D-Punkt im Bild. HINWEIS: Die normalisierten Eckpunktkoordinaten sind relativ zum Originalbild und reichen von 0 bis 1.
JSON-Darstellung | |
---|---|
{ "x": number, "y": number } |
Felder | |
---|---|
x |
X-Koordinate |
y |
Y-Koordinate |
Zero coordinate values
The general format for bounding polys in the JSON response when detected is an array of 4 vertex objects:
[{"x": 0.063,"y": 0.018},{"x": 0.123,"y": 0.018},{"x": 0.123,"y": 0.038},{"x": 0.063,"y": 0.038}]
[{},{"x": 0.028},
{"x": 0.028,"y": 0.043},{"y": 0.043}]
. This response shows all three representation possibilities:
{}
- an empty object when both"x":0.0
and"y":0.0
.{"x": 0.028}
and{"y": 0.043}
- an object with a single key-value pair when one coordinate is 0.0 but the other is a non-zero value.{"x": 0.028,"y": 0.043}
- an object with both key-value pairs when both coordinates have a non-zero value.
Methoden |
|
---|---|
|
Erstellt eine neue ReferenceImage-Ressource und gibt diese zurück. |
|
Löscht ein Referenzbild endgültig. |
|
Ruft Informationen zu einem ReferenceImage ab. |
|
Listet Referenzbilder auf. |