【发布时间】:2019-05-19 15:35:18
【问题描述】:
我想将表单识别器“boundingBox”的结果转换为图像坐标,以可视化叠加图像和识别的数据。 但是,boundingBox 结果看起来不像此图像这样的 XY 坐标位置。 https://i.stack.imgur.com/DOEi5.png
我需要每个boundingBox的左上(X1,Y1)右下(X2,Y2)计算规则。
我也用认知服务 OCR 和文本识别做了一些计算规则,但没有关于表单识别器的信息。 我试图通过减号或除法找到 XY 坐标规则,但没有找到规则。
这是我通过表单识别器的示例图像获得的结果 json 数据。但无法从中找到 boundingBox 规则。
Responsebody: {
'status': 'success',
'pages': [
{
'number': 1,
'height': 792,
'width': 612,
'clusterId': 0,
'keyValuePairs': [
{
'key': [
{
'text': 'Address:',
'boundingBox': [
57.3,
683.0,
100.5,
683.0,
100.5,
673.7,
57.3,
673.7
]
}
],
'value': [
{
'text': '1020 Enterpirse Way.',
'boundingBox': [
57.3,
672.2,
153.1,
672.2,
153.1,
658.8,
57.3,
658.8
],
'confidence': 0.53
},
我需要每个boundingBox的左上(X1,Y1)和右下(X2,Y2)计算规则。
感谢团队。
【问题讨论】:
-
也许我误解了你的问题,但不是你正在寻找的 boundingBox 属性吗?这八个数字代表文本框所有四个角的 X 和 Y。
标签: azure preview opencv-python form-recognizer