1、通用表格识别 - 接口说明

接口地址
图片为base64流 https://netocr.com/api/recog_table_base64
图片为file格式 https://netocr.com/recog_table_file
接口调用方法 post

(注:调用图片为base64流接口时传参数img,调用图片为file格式接口传参数file)

2、请求参数

(1) 图片为base64流

接口地址 https://netocr.com/api/recog_table_base64
接口调用方法 post

接口接收参数:

序号 名称 类型 必填 说明
1 img String 上传的文件(图片的base64流)
2 key String 用户ocrKey
3 secret String 用户ocrSecrert
4 typeId Integer 识别类型:3050
5 format String json
6 nLanguage Integer 识别语言:2 英文、3 中文(默认)
7 filterColor Integer 滤色:0 关闭、1 弱滤红(默认)、2 强滤红、3 弱滤蓝、4 强滤蓝
8 backgroundFilter Integer 背景色过滤:0 关闭(默认)、1 开启

(2) 图片为file格式

接口地址 https://netocr.com/recog_table_file
接口调用方法 post

接口接收参数:

序号 名称 类型 必填 说明
1 file MultipartFile 上传的文件(上传文件的字段名必须是“file”)
2 key String 用户ocrKey
3 secret String 用户ocrSecrert
4 typeId Integer 识别类型:3050
5 format String json
6 nLanguage Integer 识别语言:2 英文、3 中文(默认)
7 filterColor Integer 滤色:0 关闭、1 弱滤红(默认)、2 强滤红、3 弱滤蓝、4 强滤蓝
8 backgroundFilter Integer 背景色过滤:0 关闭(默认)、1 开启

(3) 识别文件下载

接口地址 https://netocr.com/api/external_download
接口调用方法 get

接口接收参数:

序号 名称 类型 必填 说明
1 filePath String 识别结果的文件路径 pdfPath、jsonPath

3、结果示例

{
    "message": {
        "status": 0,
        "value": "识别完成"
    },
    "info": {
        "result": [
            {
                "path": "",
                "table": "<body><p></p><table border=\"1\" border-collapse = collapse  cellspacing =\"0\"  ><tr><td style=\"text-align:center;vertical-align:middle;\" colspan = \"3\" ><p><span RectRow=6,13,102,13,6,39,102,39>检查单位:\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=357,15,442,15,357,37,442,37>检查人员\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" colspan = \"4\" ><p> &nbsp;&nbsp;&nbsp;&nbsp;</p></td></tr><tr><td style=\"text-align:center;vertical-align:middle;\" colspan = \"3\" ><p><span RectRow=7,61,103,61,7,87,103,87>检查时间:\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=368,64,432,64,368,86,432,86>审核人\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" colspan = \"4\" ><p> &nbsp;&nbsp;&nbsp;&nbsp;</p></td></tr><tr><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=7,100,30,100,7,120,30,120>序\n</span></p><p><span RectRow=7,124,28,124,7,143,28,143>号\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=42,100,64,100,42,120,64,120>单\n</span></p><p><span RectRow=46,126,65,126,46,143,65,143>元\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=144,114,208,114,144,132,208,132>检查项目\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=368,114,433,114,368,132,433,132>检查标准\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=576,111,642,111,576,132,642,132>检查方法\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=712,111,779,111,712,132,779,132>检查结果\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=839,114,920,114,839,132,920,132>存在的问题\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=996,114,1061,114,996,132,1061,132>整改方案\n</span></p></td></tr><tr><td style=\"text-align:center;vertical-align:middle;\" rowspan=\"6\" ><p><span RectRow=3,220,21,220,3,235,21,235>1\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" rowspan=\"6\" ><p><span RectRow=48,190,62,190,48,203,62,203>工\n</span></p><p><span RectRow=48,213,63,213,48,228,63,228>作\n</span></p><p><span RectRow=48,237,63,237,48,252,63,252>环\n</span></p><p><span RectRow=43,258,64,258,43,277,64,277>境\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=80,152,211,152,80,168,211,168>1、厂房内通风情况\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=287,150,383,150,287,167,383,167>通风要求良好\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=527,147,673,147,527,167,673,167>自然通风或强制通风\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p> &nbsp;&nbsp;&nbsp;&nbsp;</p></td><td style=\"text-align:center;vertical-align:middle;\" ><p> &nbsp;&nbsp;&nbsp;&nbsp;</p></td><td style=\"text-align:center;vertical-align:middle;\" ><p> &nbsp;&nbsp;&nbsp;&nbsp;</p></td></tr><tr><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=79,178,198,178,79,198,198,198>2、噪声控制情况\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=285,174,462,174,285,197,462,197>噪声是否控制在标准之内\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p><span RectRow=530,178,593,178,530,195,593,195>测量噪声\n</span></p></td><td style=\"text-align:center;vertical-align:middle;\" ><p> &nbsp;&nbsp;&nbsp;&nbsp;</p></td><td style=\"text-align:center;vertical-align:middle;\" ><p> &nbsp;&nbsp;&nbsp;&nbsp;</p></td><td style=\"text-align:center;vertical-align:middle;\" ><p> &nbsp;&nbsp;&nbsp;&nbsp;</p></td></tr></table><p></p></body>",
                "ocr": {
                    "Height": 668,
                    "NodeID": 0,
                    "NodeType": "page",
                    "Width": 1094,
                    "rcInImage": "0,0,1094,668",
                    "table": [
                        {
                            "NodeID": 1,
                            "NodeType": "table",
                            "cell": [
                                {
                                    "NodeID": 2,
                                    "NodeType": "cell",
                                    "Primitive_col": 0,
                                    "Primitive_row": 0,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": -2,
                                    "loca_row": -2,
                                    "rcInImage": "0,0,0,0"
                                },
                                {
                                    "NodeID": 3,
                                    "NodeType": "cell",
                                    "Primitive_col": 3,
                                    "Primitive_row": 1,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": 0,
                                    "loca_row": 0,
                                    "rcInImage": "1,2,279,50",
                                    "row": [
                                        {
                                            "NodeID": 4,
                                            "NodeType": "row",
                                            "char": [
                                                {
                                                    "NodeID": 191,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "检",
                                                    "rcInImage": "6,13,121,39"
                                                },
                                                {
                                                    "NodeID": 192,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "查",
                                                    "rcInImage": "25,13,140,39"
                                                },
                                                {
                                                    "NodeID": 193,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "单",
                                                    "rcInImage": "44,13,159,39"
                                                },
                                                {
                                                    "NodeID": 194,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "位",
                                                    "rcInImage": "63,13,178,39"
                                                },
                                                {
                                                    "NodeID": 195,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": ":",
                                                    "rcInImage": "82,13,197,39"
                                                },
                                                {
                                                    "NodeID": 196,
                                                    "NodeType": "char",
                                                    "confidence": 10000,
                                                    "dwCode": "\n",
                                                    "rcInImage": "101,13,216,39"
                                                }
                                            ],
                                            "rcInImage": "6,13,102,13,6,39,102,39"
                                        }
                                    ]
                                },
                                {
                                    "NodeID": 5,
                                    "NodeType": "cell",
                                    "Primitive_col": 1,
                                    "Primitive_row": 1,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": 3,
                                    "loca_row": 0,
                                    "rcInImage": "279,2,520,50",
                                    "row": [
                                        {
                                            "NodeID": 6,
                                            "NodeType": "row",
                                            "char": [
                                                {
                                                    "NodeID": 197,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "检",
                                                    "rcInImage": "357,15,463,37"
                                                },
                                                {
                                                    "NodeID": 198,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "查",
                                                    "rcInImage": "378,15,484,37"
                                                },
                                                {
                                                    "NodeID": 199,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "人",
                                                    "rcInImage": "399,15,505,37"
                                                },
                                                {
                                                    "NodeID": 200,
                                                    "NodeType": "char",
                                                    "confidence": 9997,
                                                    "dwCode": "员",
                                                    "rcInImage": "420,15,526,37"
                                                },
                                                {
                                                    "NodeID": 201,
                                                    "NodeType": "char",
                                                    "confidence": 10000,
                                                    "dwCode": "\n",
                                                    "rcInImage": "441,15,547,37"
                                                }
                                            ],
                                            "rcInImage": "357,15,442,15,357,37,442,37"
                                        }
                                    ]
                                },
                                {
                                    "NodeID": 7,
                                    "NodeType": "cell",
                                    "Primitive_col": 4,
                                    "Primitive_row": 1,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": 4,
                                    "loca_row": 0,
                                    "rcInImage": "520,2,1088,50"
                                },
                                {
                                    "NodeID": 8,
                                    "NodeType": "cell",
                                    "Primitive_col": 3,
                                    "Primitive_row": 1,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": 0,
                                    "loca_row": 1,
                                    "rcInImage": "1,50,279,97",
                                    "row": [
                                        {
                                            "NodeID": 9,
                                            "NodeType": "row",
                                            "char": [
                                                {
                                                    "NodeID": 202,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "检",
                                                    "rcInImage": "7,61,122,87"
                                                },
                                                {
                                                    "NodeID": 203,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "查",
                                                    "rcInImage": "26,61,141,87"
                                                },
                                                {
                                                    "NodeID": 204,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "时",
                                                    "rcInImage": "45,61,160,87"
                                                },
                                                {
                                                    "NodeID": 205,
                                                    "NodeType": "char",
                                                    "confidence": 9997,
                                                    "dwCode": "间",
                                                    "rcInImage": "64,61,179,87"
                                                },
                                                {
                                                    "NodeID": 206,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": ":",
                                                    "rcInImage": "83,61,198,87"
                                                },
                                                {
                                                    "NodeID": 207,
                                                    "NodeType": "char",
                                                    "confidence": 10000,
                                                    "dwCode": "\n",
                                                    "rcInImage": "102,61,217,87"
                                                }
                                            ],
                                            "rcInImage": "7,61,103,61,7,87,103,87"
                                        }
                                    ]
                                },
                                {
                                    "NodeID": 10,
                                    "NodeType": "cell",
                                    "Primitive_col": 1,
                                    "Primitive_row": 1,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": 3,
                                    "loca_row": 1,
                                    "rcInImage": "279,50,520,97",
                                    "row": [
                                        {
                                            "NodeID": 11,
                                            "NodeType": "row",
                                            "char": [
                                                {
                                                    "NodeID": 208,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "审",
                                                    "rcInImage": "368,64,453,86"
                                                },
                                                {
                                                    "NodeID": 209,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "核",
                                                    "rcInImage": "389,64,474,86"
                                                },
                                                {
                                                    "NodeID": 210,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "人",
                                                    "rcInImage": "410,64,495,86"
                                                },
                                                {
                                                    "NodeID": 211,
                                                    "NodeType": "char",
                                                    "confidence": 10000,
                                                    "dwCode": "\n",
                                                    "rcInImage": "431,64,516,86"
                                                }
                                            ],
                                            "rcInImage": "368,64,432,64,368,86,432,86"
                                        }
                                    ]
                                },
                                {
                                    "NodeID": 12,
                                    "NodeType": "cell",
                                    "Primitive_col": 4,
                                    "Primitive_row": 1,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": 4,
                                    "loca_row": 1,
                                    "rcInImage": "520,50,1088,97"
                                },
                                {
                                    "NodeID": 13,
                                    "NodeType": "cell",
                                    "Primitive_col": 1,
                                    "Primitive_row": 1,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": 0,
                                    "loca_row": 2,
                                    "rcInImage": "1,97,35,145",
                                    "row": [
                                        {
                                            "NodeID": 14,
                                            "NodeType": "row",
                                            "char": [
                                                {
                                                    "NodeID": 212,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "序",
                                                    "rcInImage": "7,100,53,120"
                                                },
                                                {
                                                    "NodeID": 213,
                                                    "NodeType": "char",
                                                    "confidence": 10000,
                                                    "dwCode": "\n",
                                                    "rcInImage": "30,100,76,120"
                                                }
                                            ],
                                            "rcInImage": "7,100,30,100,7,120,30,120"
                                        },
                                        {
                                            "NodeID": 15,
                                            "NodeType": "row",
                                            "char": [
                                                {
                                                    "NodeID": 214,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "号",
                                                    "rcInImage": "7,124,49,143"
                                                },
                                                {
                                                    "NodeID": 215,
                                                    "NodeType": "char",
                                                    "confidence": 10000,
                                                    "dwCode": "\n",
                                                    "rcInImage": "28,124,70,143"
                                                }
                                            ],
                                            "rcInImage": "7,124,28,124,7,143,28,143"
                                        }
                                    ]
                                },
                                {
                                    "NodeID": 16,
                                    "NodeType": "cell",
                                    "Primitive_col": 1,
                                    "Primitive_row": 1,
                                    "borders": "borders:top:0,bottom:0,left:0,right:0",
                                    "loca_col": 1,
                                    "loca_row": 2,
                                    "rcInImage": "35,97,72,145",
                                    "row": [
                                        {
                                            "NodeID": 17,
                                            "NodeType": "row",
                                            "char": [
                                                {
                                                    "NodeID": 216,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "单",
                                                    "rcInImage": "42,100,86,120"
                                                },
                                                {
                                                    "NodeID": 217,
                                                    "NodeType": "char",
                                                    "confidence": 10000,
                                                    "dwCode": "\n",
                                                    "rcInImage": "64,100,108,120"
                                                }
                                            ],
                                            "rcInImage": "42,100,64,100,42,120,64,120"
                                        },
                                        {
                                            "NodeID": 18,
                                            "NodeType": "row",
                                            "char": [
                                                {
                                                    "NodeID": 218,
                                                    "NodeType": "char",
                                                    "confidence": 10002,
                                                    "dwCode": "元",
                                                    "rcInImage": "46,126,84,143"
                                                },
                                                {
                                                    "NodeID": 219,
                                                    "NodeType": "char",
                                                    "confidence": 10000,
                                                    "dwCode": "\n",
                                                    "rcInImage": "65,126,103,143"
                                                }
                                            ],
                                            "rcInImage": "46,126,65,126,46,143,65,143"
                                        }
                                    ]
                                }
                            ],
                            "rcInImage": "1,2,1089,667",
                            "table_cols": 32570,
                            "table_rows": -872415112
                        }
                    ]
                }
            }
        ],
        "typeId": 3000
    }
}

results matching ""

    No results matching ""