1、通用表格识别 - 接口说明
接口说明(非必传项功能开启后,返回结果的速度会相应的变慢)
| 接口地址 | |
|---|---|
| 图片为base64流 | https://netocr.com/api/recog_table_base64 | 
| 图片为file格式 | https://netocr.com/api/recog_table_file | 
| 接口调用方法 | post | 
(注:调用图片为base64流接口时传参数img,调用图片为file格式接口传参数file)
2、接口接收参数
| 序号 | 名称 | 类型 | 必填 | 说明 | 
|---|---|---|---|---|
| 1 | img | String | 是 | 上传的文件(图片的base64流) | 
| 2 | file | Multipart | 是 | 上传的文件(上传文件的字段名必须是“file”) | 
| 3 | key | String | 是 | 用户ocrKey | 
| 4 | secret | String | 是 | 用户ocrSecrert | 
| 5 | typeId | Integer | 是 | 识别类型:3050 | 
| 6 | format | String | 是 | 固定值:json | 
| 7 | nLanguage | Integer | 否 | 识别语言:0-简体中文(默认) 1-繁体中文 2-英文 3-手写简体 4-手写繁体 | 
| 8 | filterColor | Integer | 否 | 滤色:0 关闭(默认)、1 弱滤红、2 强滤红、3 弱滤蓝、4 强滤蓝 | 
| 9 | backgroundFilter | Integer | 否 | 背景色过滤:0 关闭(默认)、1 开启 | 
| 10 | autoRotation | Integer | 否 | 0 - 不开启自动旋转、1 – 开启自动旋转 | 
| 11 | inclineCorrect | Integer | 否 | 0 - 不开启倾斜矫正、1 – 开启倾斜校正 | 
| 12 | lineProcess | Integer | 否 | 逐行校正:0 关闭(默认)、1 开启 | 
| 13 | refactoring | Integer | 否 | 表格重构:0-少补线(默认) 1-不补线 2-多补线 3-全补线 | 
3、结果示例
{
    "message": {
        "status": 0,
        "value": "识别完成"
    },
    "info": {
        "result": [
            {
                "path": "",
                "table": "",
                "ocr": {}
            }
        ],
        "num": "1-1",
        "consumeId": "1747805597028327",
        "typeId": 3060
    }
}