리소스: 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와 연결된 정보를 가져옵니다. |
|
참조 이미지를 나열합니다. |