Google Vision未返回顶点

问题描述 投票:0回答:2

我正在通过Google Vision OCR API发送图像以获取文档的文本层,我以前对此没有任何问题,并且已经对其进行了至少一千次测试。我最近将POC交付给某人,他们报告错误而没有找回有效的文本层。

我看过了,在JSON返回值中,我没有从Google那里获得Vertices。

这是我的要求:

{
"requests": [
{
    "inputConfig': {
    "content': [tiff byte stream to string goes here],
    "mimeType': 'image/tiff"
    },
    'pages': [
    1
    ],
    'features': [
    {
        'type': 'DOCUMENT_TEXT_DETECTION'
    }
    ]
}
]
}

这里是我得到的回馈的一小部分

{
  "property": {
    "detectedLanguages": [
      {
        "languageCode": "en"
      }
    ]
  },
  "boundingBox": {
    "vertices": [
      {},
      {},
      {},
      {}
    ]
  },
  "text": "1",
  "confidence": 0.99
},
{
  "property": {
    "detectedLanguages": [
      {
        "languageCode": "en"
      }
    ]
  },
  "boundingBox": {
    "vertices": [
      {},
      {},
      {},
      {}
    ]
  },
  "text": "4",
  "confidence": 0.97
},

提前谢谢您

c# google-cloud-platform google-vision google-apis-explorer
2个回答
0
投票

Vision API使用Protocol Buffers v3

未设置的原始字段具有语言定义的默认值。

如果未设置X或Y值,则表示它为0。


0
投票

与Google一起打开了一个缺陷,根据他们的说法,修复正在等待中。这不是代码问题,感谢您的全部投入!

© www.soinside.com 2019 - 2024. All rights reserved.