你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Planogram Compliance - Match

针对货架图和产品理解结果运行货架图匹配操作。

POST /planogramcompliance:match?api-version=2023-04-01-preview

URI 参数

名称 必需 类型 说明
api-version
query True

string

请求的 API 版本。

请求正文

Media Types: "application/json-patch+json"

名称 必需 类型 说明
detectedProducts True

ProductRecognitionResultApiModel

产品理解作的结果。

planogram True

PlanogramApiModel

描述用于货架图匹配操作的货架图。

响应

名称 类型 说明
200 OK

PlanogramMatchingResultApiModel

成功

Other Status Codes

ErrorResponse

错误

标头

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
          }
        ]
      }
    }
  ]
}

定义

名称 说明
BoundingBox

图像内区域的边界框。

DetectedObject

描述在图像中检测到的对象。

ErrorResponse

发生错误时返回的响应。

ErrorResponseDetails

错误信息。

ErrorResponseInnerError

详细错误。

FixtureApiModel

描述平面图中的装置。

ImageMetadataApiModel

图像元数据信息,如高度和宽度。

PlanogramApiModel

描述用于货架图匹配操作的货架图。

PlanogramMatchingRequestApiModel

要传入计划图匹配作的输入。

PlanogramMatchingResultApiModel

计划图匹配作的结果。

PositionApiModel

描述计划图中的产品位置。

PositionMatchingResultApiModel

根据产品理解结果,对货架图位置 ID 和对应检测到的对象进行匹配。

ProductApiModel

描述货架图中的产品。

ProductRecognitionResultApiModel

产品理解作的结果。

Tag

图像中的实体观察以及置信度分数。

BoundingBox

图像内区域的边界框。

名称 类型 说明
h

integer (int32)

minimum: 1

从区域左上角(以像素为单位)测量的高度。

w

integer (int32)

minimum: 1

从区域的左上角点(以像素为单位)测量的宽度。

x

integer (int32)

minimum: 0

区域左上角点的左坐标(以像素为单位)。

y

integer (int32)

minimum: 0

区域左上角点的上坐标(以像素为单位)。

DetectedObject

描述在图像中检测到的对象。

名称 类型 说明
boundingBox

BoundingBox

图像内区域的边界框。

id

string

minLength: 1

检测到的对象 ID。

tags

Tag[]

检测到的对象的分类置信度。

ErrorResponse

发生错误时返回的响应。

名称 类型 说明
error

ErrorResponseDetails

错误信息。

ErrorResponseDetails

错误信息。

名称 类型 说明
code

string

错误代码。

details

ErrorResponseDetails[]

详细错误列表。

innererror

ErrorResponseInnerError

详细错误。

message

string

错误信息。

target

string

错误的目标。

ErrorResponseInnerError

详细错误。

名称 类型 说明
code

string

错误代码。

innererror

ErrorResponseInnerError

详细错误。

message

string

错误信息。

FixtureApiModel

描述平面图中的装置。

名称 类型 说明
h

number (double)

固定物的高度。

id

string

minLength: 1

固定装置的 ID。

w

number (double)

固定物的宽度。

x

number (double)

minimum: 0

从原点的左偏移量(以英寸为单位或厘米为单位)。

y

number (double)

minimum: 0

原点的上偏移量,单位为英寸或厘米。

ImageMetadataApiModel

图像元数据信息,如高度和宽度。

名称 类型 说明
height

integer (int32)

minimum: 1

图像的高度(以像素为单位)。

width

integer (int32)

minimum: 1

图像的宽度(以像素为单位)。

PlanogramApiModel

描述用于货架图匹配操作的货架图。

名称 类型 说明
fixtures

FixtureApiModel[]

货架图中的固定物列表。

height

number (double)

货架图的高度。

positions

PositionApiModel[]

货架图中的位置列表。

products

ProductApiModel[]

货架图中的产品列表。

width

number (double)

货架图的宽度。

PlanogramMatchingRequestApiModel

要传入计划图匹配作的输入。

名称 类型 说明
detectedProducts

ProductRecognitionResultApiModel

产品理解作的结果。

planogram

PlanogramApiModel

描述用于货架图匹配操作的货架图。

PlanogramMatchingResultApiModel

计划图匹配作的结果。

名称 类型 说明
matchingResultPerPosition

PositionMatchingResultApiModel[]

每个计划图位置的匹配检测到的对象信息。

PositionApiModel

描述计划图中的产品位置。

名称 类型 说明
fixtureId

string

minLength: 1

产品打开的固定装置的 ID。

id

string

minLength: 1

位置的 ID。

productId

string

minLength: 1

产品的 ID。

x

number (double)

minimum: 0

从原点的左偏移量(以英寸为单位或厘米为单位)。

y

number (double)

minimum: 0

原点的上偏移量,单位为英寸或厘米。

PositionMatchingResultApiModel

根据产品理解结果,对货架图位置 ID 和对应检测到的对象进行匹配。

名称 类型 说明
detectedObject

DetectedObject

描述在图像中检测到的对象。

positionId

string

minLength: 1

货架图中的位置 ID 与对应检测到的对象匹配。

ProductApiModel

描述货架图中的产品。

名称 类型 说明
h

number (double)

固定物的高度。

id

string

minLength: 1

产品的 ID。

name

string

minLength: 1
maxLength: 255

产品的名称。

w

number (double)

产品的宽度。

ProductRecognitionResultApiModel

产品理解作的结果。

名称 类型 说明
gaps

DetectedObject[]

在图像中检测到的空隙。

imageMetadata

ImageMetadataApiModel

图像元数据信息,如高度和宽度。

products

DetectedObject[]

在图像中检测到的产品。

Tag

图像中的实体观察以及置信度分数。

名称 类型 说明
confidence

number (double)

minimum: 0
maximum: 1

观察到实体的置信度级别。

name

string

minLength: 1

实体的名称。