文字识别 OCR-通用表格识别:响应示例

时间:2024-04-15 09:41:20

响应示例

状态码: 200

成功响应样例

{
  "result" : {
    "words_region_count" : 2,
    "words_region_list" : [ {
      "type" : "text",
      "words_block_count" : 1,
      "words_block_list" : [ {
        "words" : "文字区域识别文字块1",
        "confidence" : 0.9991
      } ]
    }, {
      "type" : "table",
      "words_block_count" : 2,
      "words_block_list" : [ {
        "words" : "表格区域识别文字块1",
        "confidence" : 0.9942,
        "rows" : [ 0 ],
        "columns" : [ 0 ]
      }, {
        "words" : "表格区域识别文字块2",
        "confidence" : 0.914,
        "rows" : [ 0 ],
        "columns" : [ 1, 2 ]
      } ]
    } ]
  }
}

状态码: 400

失败响应样例

{
  "result" : {
    "error_code" : "AIS.0103",
    "error_msg" : "The image size does not meet the requirements."
  }
}
support.huaweicloud.com/api-ocr/ocr_03_0031.html