リソース: ReferenceImage
ReferenceImage
は、商品画像とそれに関連するメタデータ(境界ボックスなど)を表します。
JSON 表現 | |
---|---|
{
"name": string,
"uri": string,
"boundingPolys": [
{
object( |
フィールド | |
---|---|
name |
参照画像のリソース名。 形式:
参照画像を作成する場合、このフィールドは無視されます。 |
uri |
参照画像の Google Cloud Storage URI。 URI は、 必須。 |
boundingPolys[] |
参照画像内の関心領域を囲む境界ポリゴン。省略可。このフィールドが空の場合、システムは関心領域の検出を試みます。境界ポリゴンは、最大 10 個使用されます。 指定したシェイプは、回転しない長方形に変換されます。変換後、長方形の小さい端を 300 ピクセル以上にする必要があります。アスペクト比は 1:4 以下でなければなりません(1:3 は許容されますが、1:5 は許容されません)。 |
BoundingPoly
検出された画像アノテーションの境界ポリゴン。
JSON 表現 | |
---|---|
{ "vertices": [ { object( |
フィールド | |
---|---|
vertices[] |
境界ポリゴンの頂点。 |
normalizedVertices[] |
境界ポリゴンの正規化された頂点。 |
Vertex
頂点は、画像上の 2D の点を表します。注: 頂点の座標は元の画像と同じスケールです。
JSON 表現 | |
---|---|
{ "x": number, "y": number } |
フィールド | |
---|---|
x |
X 座標。 |
y |
Y 座標。 |
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
頂点は、画像上の 2D の点を表します。注: 正規化された頂点座標は、元の画像と相対しており、0~1 の範囲になります。
JSON 表現 | |
---|---|
{ "x": number, "y": number } |
フィールド | |
---|---|
x |
X 座標。 |
y |
Y 座標。 |
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.
メソッド |
|
---|---|
|
新しい ReferenceImage リソースを作成して返します。 |
|
参照画像を完全に削除します。 |
|
ReferenceImage に関連付けられた情報を取得します。 |
|
参照画像を一覧表示します。 |