你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Planogram Compliance - Match
针对 planogram 和产品理解结果运行 planogram 匹配操作。
POST /planogramcompliance:match?api-version=2023-04-01-preview
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
api-version
|
query | True |
string |
请求的 API 版本。 |
请求正文
Media Types: "application/json-patch+json"
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
detectedProducts | True |
产品理解操作的结果。 |
|
planogram | True |
描述用于货架图匹配操作的货架图。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
错误 标头 x-ms-error-code: string |
示例
PlanogramCompliance_Match
示例请求
POST /planogramcompliance:match?api-version=2023-04-01-preview
{
"detectedProducts": {
"imageMetadata": {
"width": 660,
"height": 495
},
"products": [
{
"id": "1",
"boundingBox": {
"x": 197,
"y": 68,
"w": 356,
"h": 394
},
"tags": [
{
"name": "class1",
"confidence": 0.92431640625
}
]
}
],
"gaps": [
{
"id": "1",
"boundingBox": {
"x": 197,
"y": 68,
"w": 356,
"h": 394
},
"tags": [
{
"name": "gap",
"confidence": 0.92431640625
}
]
}
]
},
"planogram": {
"width": 10,
"height": 16,
"products": [
{
"id": "1",
"name": "product-1",
"w": 8,
"h": 25
}
],
"fixtures": [
{
"id": "1",
"w": 20,
"h": 4,
"x": 0,
"y": 0
}
],
"positions": [
{
"id": "1",
"productId": "1",
"fixtureId": "1",
"x": 0,
"y": 0
}
]
}
}
示例响应
{
"matchingResultPerPosition": [
{
"positionId": "0",
"detectedObject": {
"id": "0",
"boundingBox": {
"x": 197,
"y": 68,
"w": 356,
"h": 394
},
"tags": [
{
"name": "class1",
"confidence": 0.92431640625
}
]
}
}
]
}
定义
名称 | 说明 |
---|---|
Bounding |
图像内部区域的边框。 |
Detected |
描述在图像中检测到的对象。 |
Error |
发生错误时返回的响应。 |
Error |
错误信息。 |
Error |
详细错误。 |
Fixture |
描述平面图中的固定装置。 |
Image |
图像元数据信息,例如高度和宽度。 |
Planogram |
描述用于货架图匹配操作的货架图。 |
Planogram |
要传入到平面图匹配操作的输入。 |
Planogram |
平面图匹配操作的结果。 |
Position |
描述平面图中的产品位置。 |
Position |
根据产品理解结果,对货架图位置 ID 和对应检测到的对象进行匹配。 |
Product |
描述货架图中的产品。 |
Product |
产品理解操作的结果。 |
Tag |
图像中的实体观察以及置信度分数。 |
BoundingBox
图像内部区域的边框。
名称 | 类型 | 说明 |
---|---|---|
h |
integer |
从区域左上角点测得的高度(以像素为单位)。 |
w |
integer |
从区域左上角点测得的宽度(以像素为单位)。 |
x |
integer |
区域左上角点的左坐标(以像素为单位)。 |
y |
integer |
区域左上角点的上坐标(以像素为单位)。 |
DetectedObject
描述在图像中检测到的对象。
名称 | 类型 | 说明 |
---|---|---|
boundingBox |
图像内部区域的边框。 |
|
id |
string |
检测到的对象 ID。 |
tags |
Tag[] |
检测到的对象的分类置信度。 |
ErrorResponse
发生错误时返回的响应。
名称 | 类型 | 说明 |
---|---|---|
error |
错误信息。 |
ErrorResponseDetails
错误信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
details |
详细错误列表。 |
|
innererror |
详细错误。 |
|
message |
string |
错误消息。 |
target |
string |
错误的目标。 |
ErrorResponseInnerError
详细错误。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
innererror |
详细错误。 |
|
message |
string |
错误消息。 |
FixtureApiModel
描述平面图中的固定装置。
名称 | 类型 | 说明 |
---|---|---|
h |
number |
固定物的高度。 |
id |
string |
固定装置的 ID。 |
w |
number |
固定物的宽度。 |
x |
number |
与原点的左偏移量,单位为 英寸或厘米。 |
y |
number |
与原点的上偏移量,单位为英寸或厘米。 |
ImageMetadataApiModel
图像元数据信息,例如高度和宽度。
名称 | 类型 | 说明 |
---|---|---|
height |
integer |
图像的高度(以像素为单位)。 |
width |
integer |
图像的宽度(以像素为单位)。 |
PlanogramApiModel
描述用于货架图匹配操作的货架图。
名称 | 类型 | 说明 |
---|---|---|
fixtures |
货架图中的固定物列表。 |
|
height |
number |
货架图的高度。 |
positions |
货架图中的位置列表。 |
|
products |
货架图中的产品列表。 |
|
width |
number |
货架图的宽度。 |
PlanogramMatchingRequestApiModel
要传入到平面图匹配操作的输入。
名称 | 类型 | 说明 |
---|---|---|
detectedProducts |
产品理解操作的结果。 |
|
planogram |
描述用于货架图匹配操作的货架图。 |
PlanogramMatchingResultApiModel
平面图匹配操作的结果。
名称 | 类型 | 说明 |
---|---|---|
matchingResultPerPosition |
每个平面图位置的匹配检测到的对象信息。 |
PositionApiModel
描述平面图中的产品位置。
名称 | 类型 | 说明 |
---|---|---|
fixtureId |
string |
产品所打开的固定装置的 ID。 |
id |
string |
位置的 ID。 |
productId |
string |
产品的 ID。 |
x |
number |
与原点的左偏移量,单位为 英寸或厘米。 |
y |
number |
与原点的上偏移量,单位为英寸或厘米。 |
PositionMatchingResultApiModel
根据产品理解结果,对货架图位置 ID 和对应检测到的对象进行匹配。
名称 | 类型 | 说明 |
---|---|---|
detectedObject |
描述在图像中检测到的对象。 |
|
positionId |
string |
货架图中的位置 ID 与对应检测到的对象匹配。 |
ProductApiModel
描述货架图中的产品。
名称 | 类型 | 说明 |
---|---|---|
h |
number |
固定物的高度。 |
id |
string |
产品的 ID。 |
name |
string |
产品的名称。 |
w |
number |
产品的宽度。 |
ProductRecognitionResultApiModel
产品理解操作的结果。
名称 | 类型 | 说明 |
---|---|---|
gaps |
在图像中检测到的空隙。 |
|
imageMetadata |
图像元数据信息,例如高度和宽度。 |
|
products |
在图像中检测到的产品。 |
Tag
图像中的实体观察以及置信度分数。
名称 | 类型 | 说明 |
---|---|---|
confidence |
number |
观察到实体的置信度级别。 |
name |
string |
实体的名称。 |