接口说明
更新时间:2020-04-06
通用文字识别
用户向服务请求识别某张图中的所有文字
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用通用文字识别, 图片参数为本地图片 """
client.basicGeneral(image);
""" 如果有可选参数 """
options = {}
options["language_type"] = "CHN_ENG"
options["detect_direction"] = "true"
options["detect_language"] = "true"
options["probability"] = "true"
""" 带参数调用通用文字识别, 图片参数为本地图片 """
client.basicGeneral(image, options)
url = "https//www.x.com/sample.jpg"
""" 调用通用文字识别, 图片参数为远程url图片 """
client.basicGeneralUrl(url);
""" 如果有可选参数 """
options = {}
options["language_type"] = "CHN_ENG"
options["detect_direction"] = "true"
options["detect_language"] = "true"
options["probability"] = "true"
""" 带参数调用通用文字识别, 图片参数为远程url图片 """
client.basicGeneralUrl(url, options)
通用文字识别 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
url | 是 | string | 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 | ||
language_type | 否 | string | CHN_ENG ENG POR FRE GER ITA SPA RUS JAP KOR |
CHN_ENG | 识别语言类型,默认为CHN_ENG。可选值包括: - CHN_ENG:中英文混合; - ENG:英文; - POR:葡萄牙语; - FRE:法语; - GER:德语; - ITA:意大利语; - SPA:西班牙语; - RUS:俄语; - JAP:日语; - KOR:韩语; |
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
detect_language | 否 | string | true false |
false | 是否检测语言,默认不检测。当前支持(中文、英语、日语、韩语) |
probability | 否 | string | true false |
是否返回识别结果中每一行的置信度 |
通用文字识别 返回数据参数详情
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
direction | 否 | number | 图像方向,当detect_direction=true时存在。 - -1:未定义, - 0:正向, - 1: 逆时针90度, - 2:逆时针180度, - 3:逆时针270度 |
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
words_result | 是 | array | 定位和识别结果数组 |
+words | 否 | string | 识别结果字符串 |
probability | 否 | object | 行置信度信息;如果输入参数 probability = true 则输出 |
+average | 否 | number | 行置信度平均值 |
+variance | 否 | number | 行置信度方差 |
+min | 否 | number | 行置信度最小值 |
通用文字识别 返回示例
{
"log_id": 2471272194,
"words_result_num": 2,
"words_result":
[
{"words": " TSINGTAO"},
{"words": "青岛睥酒"}
]
}
通用文字识别(高精度版)
用户向服务请求识别某张图中的所有文字,相对于通用文字识别该产品精度更高,但是识别耗时会稍长。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用通用文字识别(高精度版) """
client.basicAccurate(image);
""" 如果有可选参数 """
options = {}
options["detect_direction"] = "true"
options["probability"] = "true"
""" 带参数调用通用文字识别(高精度版) """
client.basicAccurate(image, options)
通用文字识别(高精度版) 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
probability | 否 | string | true false |
是否返回识别结果中每一行的置信度 |
通用文字识别(高精度版) 返回数据参数详情
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
direction | 否 | number | 图像方向,当detect_direction=true时存在。 - -1:未定义, - 0:正向, - 1: 逆时针90度, - 2:逆时针180度, - 3:逆时针270度 |
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
words_result | 是 | array | 定位和识别结果数组 |
+words | 否 | string | 识别结果字符串 |
probability | 否 | object | 行置信度信息;如果输入参数 probability = true 则输出 |
+average | 否 | number | 行置信度平均值 |
+variance | 否 | number | 行置信度方差 |
+min | 否 | number | 行置信度最小值 |
通用文字识别(高精度版) 返回示例
参考通用文字识别返回示例
通用文字识别(含位置信息版)
用户向服务请求识别某张图中的所有文字,并返回文字在图中的位置信息。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用通用文字识别(含位置信息版), 图片参数为本地图片 """
client.general(image);
""" 如果有可选参数 """
options = {}
options["recognize_granularity"] = "big"
options["language_type"] = "CHN_ENG"
options["detect_direction"] = "true"
options["detect_language"] = "true"
options["vertexes_location"] = "true"
options["probability"] = "true"
""" 带参数调用通用文字识别(含位置信息版), 图片参数为本地图片 """
client.general(image, options)
url = "https//www.x.com/sample.jpg"
""" 调用通用文字识别(含位置信息版), 图片参数为远程url图片 """
client.generalUrl(url);
""" 如果有可选参数 """
options = {}
options["recognize_granularity"] = "big"
options["language_type"] = "CHN_ENG"
options["detect_direction"] = "true"
options["detect_language"] = "true"
options["vertexes_location"] = "true"
options["probability"] = "true"
""" 带参数调用通用文字识别(含位置信息版), 图片参数为远程url图片 """
client.generalUrl(url, options)
通用文字识别(含位置信息版) 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
url | 是 | string | 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 | ||
recognize_granularity | 否 | string | big - 不定位单字符位置 small - 定位单字符位置 |
small | 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 |
language_type | 否 | string | CHN_ENG ENG POR FRE GER ITA SPA RUS JAP KOR |
CHN_ENG | 识别语言类型,默认为CHN_ENG。可选值包括: - CHN_ENG:中英文混合; - ENG:英文; - POR:葡萄牙语; - FRE:法语; - GER:德语; - ITA:意大利语; - SPA:西班牙语; - RUS:俄语; - JAP:日语; - KOR:韩语; |
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
detect_language | 否 | string | true false |
false | 是否检测语言,默认不检测。当前支持(中文、英语、日语、韩语) |
vertexes_location | 否 | string | true false |
false | 是否返回文字外接多边形顶点位置,不支持单字位置。默认为false |
probability | 否 | string | true false |
是否返回识别结果中每一行的置信度 |
通用文字识别(含位置信息版) 返回数据参数详情
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
direction | 否 | number | 图像方向,当detect_direction=true时存在。 - -1:未定义, - 0:正向, - 1: 逆时针90度, - 2:逆时针180度, - 3:逆时针270度 |
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result | 是 | array | 定位和识别结果数组 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
+vertexes_location | 否 | array | 当前为四个顶点: 左上,右上,右下,左下。当vertexes_location=true时存在 |
++x | 是 | number | 水平座标(座标0点为左上角) |
++y | 是 | number | 垂直座标(座标0点为左上角) |
+location | 是 | array | 位置数组(座标0点为左上角) |
++left | 是 | number | 表示定位位置的长方形左上顶点的水平座标 |
++top | 是 | number | 表示定位位置的长方形左上顶点的垂直座标 |
++width | 是 | number | 表示定位位置的长方形的宽度 |
++height | 是 | number | 表示定位位置的长方形的高度 |
+words | 否 | number | 识别结果字符串 |
+chars | 否 | array | 单字符结果,recognize_granularity=small时存在 |
++location | 是 | array | 位置数组(座标0点为左上角) |
+++left | 是 | number | 表示定位位置的长方形左上顶点的水平座标 |
+++top | 是 | number | 表示定位位置的长方形左上顶点的垂直座标 |
+++width | 是 | number | 表示定位定位位置的长方形的宽度 |
+++height | 是 | number | 表示位置的长方形的高度 |
++char | 是 | string | 单字符识别结果 |
probability | 否 | object | 行置信度信息;如果输入参数 probability = true 则输出 |
+ average | 否 | number | 行置信度平均值 |
+ variance | 否 | number | 行置信度方差 |
+ min | 否 | number | 行置信度最小值 |
通用文字识别(含位置信息版) 返回示例
{
"log_id": 3523983603,
"direction": 0, //detect_direction=true时存在
"words_result_num": 2,
"words_result": [
{
"location": {
"left": 35,
"top": 53,
"width": 193,
"height": 109
},
"words": "感动",
"chars": [ //recognize_granularity=small时存在
{
"location": {
"left": 56,
"top": 65,
"width": 69,
"height": 88
},
"char": "感"
},
{
"location": {
"left": 140,
"top": 65,
"width": 70,
"height": 88
},
"char": "动"
}
]
}
...
]
}
通用文字识别(含位置高精度版)
用户向服务请求识别某张图中的所有文字,并返回文字在图片中的座标信息,相对于通用文字识别(含位置信息版)该产品精度更高,但是识别耗时会稍长。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用通用文字识别(含位置高精度版) """
client.accurate(image);
""" 如果有可选参数 """
options = {}
options["recognize_granularity"] = "big"
options["detect_direction"] = "true"
options["vertexes_location"] = "true"
options["probability"] = "true"
""" 带参数调用通用文字识别(含位置高精度版) """
client.accurate(image, options)
通用文字识别(含位置高精度版) 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
recognize_granularity | 否 | string | big - 不定位单字符位置 small - 定位单字符位置 |
small | 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 |
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
vertexes_location | 否 | string | true false |
false | 是否返回文字外接多边形顶点位置,不支持单字位置。默认为false |
probability | 否 | string | true false |
是否返回识别结果中每一行的置信度 |
通用文字识别(含位置高精度版) 返回数据参数详情
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
direction | 否 | number | 图像方向,当detect_direction=true时存在。 - -1:未定义, - 0:正向, - 1: 逆时针90度, - 2:逆时针180度, - 3:逆时针270度 |
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result | 是 | array | 定位和识别结果数组 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
+vertexes_location | 否 | array | 当前为四个顶点: 左上,右上,右下,左下。当vertexes_location=true时存在 |
++x | 是 | number | 水平座标(座标0点为左上角) |
++y | 是 | number | 垂直座标(座标0点为左上角) |
+location | 是 | array | 位置数组(座标0点为左上角) |
++left | 是 | number | 表示定位位置的长方形左上顶点的水平座标 |
++top | 是 | number | 表示定位位置的长方形左上顶点的垂直座标 |
++width | 是 | number | 表示定位位置的长方形的宽度 |
++height | 是 | number | 表示定位位置的长方形的高度 |
+words | 否 | number | 识别结果字符串 |
+chars | 否 | array | 单字符结果,recognize_granularity=small时存在 |
++location | 是 | array | 位置数组(座标0点为左上角) |
+++left | 是 | number | 表示定位位置的长方形左上顶点的水平座标 |
+++top | 是 | number | 表示定位位置的长方形左上顶点的垂直座标 |
+++width | 是 | number | 表示定位定位位置的长方形的宽度 |
+++height | 是 | number | 表示位置的长方形的高度 |
++char | 是 | string | 单字符识别结果 |
probability | 否 | object | 行置信度信息;如果输入参数 probability = true 则输出 |
+ average | 否 | number | 行置信度平均值 |
+ variance | 否 | number | 行置信度方差 |
+ min | 否 | number | 行置信度最小值 |
通用文字识别(含位置高精度版) 返回示例
{
"log_id": 3523983603,
"direction": 0, //detect_direction=true时存在
"words_result_num": 2,
"words_result": [
{
"location": {
"left": 35,
"top": 53,
"width": 193,
"height": 109
},
"words": "感动",
"chars": [ //recognize_granularity=small时存在
{
"location": {
"left": 56,
"top": 65,
"width": 69,
"height": 88
},
"char": "感"
},
{
"location": {
"left": 140,
"top": 65,
"width": 70,
"height": 88
},
"char": "动"
}
]
}
...
]
}
通用文字识别(含生僻字版)
某些场景中,图片中的中文不光有常用字,还包含了生僻字,这时用户需要对该图进行文字识别,应使用通用文字识别(含生僻字版)。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用通用文字识别(含生僻字版), 图片参数为本地图片 """
client.enhancedGeneral(image);
""" 如果有可选参数 """
options = {}
options["language_type"] = "CHN_ENG"
options["detect_direction"] = "true"
options["detect_language"] = "true"
options["probability"] = "true"
""" 带参数调用通用文字识别(含生僻字版), 图片参数为本地图片 """
client.enhancedGeneral(image, options)
url = "https//www.x.com/sample.jpg"
""" 调用通用文字识别(含生僻字版), 图片参数为远程url图片 """
client.enhancedGeneralUrl(url);
""" 如果有可选参数 """
options = {}
options["language_type"] = "CHN_ENG"
options["detect_direction"] = "true"
options["detect_language"] = "true"
options["probability"] = "true"
""" 带参数调用通用文字识别(含生僻字版), 图片参数为远程url图片 """
client.enhancedGeneralUrl(url, options)
通用文字识别(含生僻字版) 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
url | 是 | string | 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 | ||
language_type | 否 | string | CHN_ENG ENG POR FRE GER ITA SPA RUS JAP KOR |
CHN_ENG | 识别语言类型,默认为CHN_ENG。可选值包括: - CHN_ENG:中英文混合; - ENG:英文; - POR:葡萄牙语; - FRE:法语; - GER:德语; - ITA:意大利语; - SPA:西班牙语; - RUS:俄语; - JAP:日语; - KOR:韩语; |
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
detect_language | 否 | string | true false |
false | 是否检测语言,默认不检测。当前支持(中文、英语、日语、韩语) |
probability | 否 | string | true false |
是否返回识别结果中每一行的置信度 |
通用文字识别(含生僻字版) 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
direction | 否 | int32 | 图像方向,当detect_direction=true时存在。 - -1:未定义, - 0:正向, - 1: 逆时针90度, - 2:逆时针180度, - 3:逆时针270度 |
log_id | 是 | uint64 | 唯一的log id,用于问题定位 |
words_result | 是 | array() | 识别结果数组 |
words_result_num | 是 | uint32 | 识别结果数,表示words_result的元素个数 |
+words | 否 | string | 识别结果字符串 |
probability | 否 | object | 识别结果中每一行的置信度值,包含average:行置信度平均值,variance:行置信度方差,min:行置信度最小值 |
+ average | 否 | number | 行置信度平均值 |
+ variance | 否 | number | 行置信度方差 |
+ min | 否 | number | 行置信度最小值 |
通用文字识别(含生僻字版) 返回示例
{
"log_id": 2471272194,
"words_result_num": 2,
"words_result":
[
{"words": " TSINGTAO"},
{"words": "青岛睥酒"}
]
}
网络图片文字识别
用户向服务请求识别一些网络上背景复杂,特殊字体的文字。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用网络图片文字识别, 图片参数为本地图片 """
client.webImage(image);
""" 如果有可选参数 """
options = {}
options["detect_direction"] = "true"
options["detect_language"] = "true"
""" 带参数调用网络图片文字识别, 图片参数为本地图片 """
client.webImage(image, options)
url = "https//www.x.com/sample.jpg"
""" 调用网络图片文字识别, 图片参数为远程url图片 """
client.webImageUrl(url);
""" 如果有可选参数 """
options = {}
options["detect_direction"] = "true"
options["detect_language"] = "true"
""" 带参数调用网络图片文字识别, 图片参数为远程url图片 """
client.webImageUrl(url, options)
网络图片文字识别 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
url | 是 | string | 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 | ||
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
detect_language | 否 | string | true false |
false | 是否检测语言,默认不检测。当前支持(中文、英语、日语、韩语) |
网络图片文字识别 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
direction | 否 | number | 图像方向,当detect_direction=true时存在。 - -1:未定义, - 0:正向, - 1: 逆时针90度, - 2:逆时针180度, - 3:逆时针270度 |
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result | 是 | array() | 识别结果数组 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
+words | 否 | string | 识别结果字符串 |
probability | 否 | object | 识别结果中每一行的置信度值,包含average:行置信度平均值,variance:行置信度方差,min:行置信度最小值 |
+ average | 否 | number | 行置信度平均值 |
+ variance | 否 | number | 行置信度方差 |
+ min | 否 | number | 行置信度最小值 |
网络图片文字识别 返回示例
{
"log_id": 2471272194,
"words_result_num": 2,
"words_result":
[
{"words": " TSINGTAO"},
{"words": "青岛睥酒"}
]
}
身份证识别
用户向服务请求识别身份证,身份证识别包括正面和背面。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
idCardSide = "back"
""" 调用身份证识别 """
client.idcard(image, idCardSide);
""" 如果有可选参数 """
options = {}
options["detect_direction"] = "true"
options["detect_risk"] = "false"
""" 带参数调用身份证识别 """
client.idcard(image, idCardSide, options)
身份证识别 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
id_card_side | 是 | string | front - 身份证含照片的一面 back - 身份证带国徽的一面 |
front:身份证含照片的一面;back:身份证带国徽的一面 | |
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
detect_risk | 否 | string | true - 开启 false - 不开启 |
是否开启身份证风险类型(身份证复印件、临时身份证、身份证翻拍、修改过的身份证)功能,默认不开启,即:false。可选值:true-开启;false-不开启 |
身份证识别 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
direction | 否 | number | 图像方向,当detect_direction=true时存在。 - -1:未定义, - 0:正向, - 1: 逆时针90度, - 2:逆时针180度, - 3:逆时针270度 |
image_status | 是 | string | normal-识别正常 reversed_side-未摆正身份证 non_idcard-上传的图片中不包含身份证 blurred-身份证模糊 over_exposure-身份证关键字段反光或过曝 unknown-未知状态 |
risk_type | 否 | string | 输入参数 detect_risk = true 时,则返回该字段识别身份证类型: normal-正常身份证;copy-复印件;temporary-临时身份证;screen-翻拍;unknow-其他未知情况 |
edit_tool | 否 | string | 如果参数 detect_risk = true 时,则返回此字段。如果检测身份证被编辑过,该字段指定编辑软件名称,如:Adobe Photoshop CC 2014 (Macintosh),如果没有被编辑过则返回值无此参数 |
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result | 是 | array(object) | 定位和识别结果数组 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
+location | 是 | array(object) | 位置数组(座标0点为左上角) |
++left | 是 | number | 表示定位位置的长方形左上顶点的水平座标 |
++top | 是 | number | 表示定位位置的长方形左上顶点的垂直座标 |
++width | 是 | number | 表示定位位置的长方形的宽度 |
++height | 是 | number | 表示定位位置的长方形的高度 |
+words | 否 | string | 识别结果字符串 |
身份证识别 返回示例
{
"log_id": 2648325511,
"direction": 0,
"image_status": "normal",
"idcard_type": "normal",
"edit_tool": "Adobe Photoshop CS3 Windows",
"words_result": {
"住址": {
"location": {
"left": 267,
"top": 453,
"width": 459,
"height": 99
},
"words": "南京市江宁区弘景大道3889号"
},
"公民身份号码": {
"location": {
"left": 443,
"top": 681,
"width": 589,
"height": 45
},
"words": "330881199904173914"
},
"出生": {
"location": {
"left": 270,
"top": 355,
"width": 357,
"height": 45
},
"words": "19990417"
},
"姓名": {
"location": {
"left": 267,
"top": 176,
"width": 152,
"height": 50
},
"words": "伍云龙"
},
"性别": {
"location": {
"left": 269,
"top": 262,
"width": 33,
"height": 52
},
"words": "男"
},
"民族": {
"location": {
"left": 492,
"top": 279,
"width": 30,
"height": 37
},
"words": "汉"
}
},
"words_result_num": 6
}
银行卡识别
识别银行卡并返回卡号和发卡行。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用银行卡识别 """
client.bankcard(image);
银行卡识别 请求参数详情
参数名称 | 是否必选 | 类型 | 说明 |
---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 |
银行卡识别 返回数据参数详情
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
log_id | number | 是 | 请求标识码,随机数,唯一。 |
result | object | 是 | 返回结果 |
+bank_card_number | string | 是 | 银行卡卡号 |
+bank_name | string | 是 | 银行名,不能识别时为空 |
+bank_card_type | number | 是 | 银行卡类型,0:不能识别; 1: 借记卡; 2: 信用卡 |
银行卡识别 返回示例
{
"log_id": 1447188951,
"result": {
"bank_card_number": "622500000000000",
"bank_name": "招商银行",
"bank_card_type": 1
}
}
驾驶证识别
对机动车驾驶证所有关键字段进行识别
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用驾驶证识别 """
client.drivingLicense(image);
""" 如果有可选参数 """
options = {}
options["detect_direction"] = "true"
""" 带参数调用驾驶证识别 """
client.drivingLicense(image, options)
驾驶证识别 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
驾驶证识别 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
words_result | 是 | array(object) | 识别结果数组 |
+words | 否 | string | 识别结果字符串 |
驾驶证识别 返回示例
{
"errno": 0,
"msg": "success",
"data": {
"words_result_num": 10,
"words_result": {
"证号": {
"words": "3208231999053090"
},
"有效期限": {
"words": "6年"
},
"准驾车型": {
"words": "B2"
},
"有效起始日期": {
"words": "20101125"
},
"住址": {
"words": "江苏省南通市海门镇秀山新城"
},
"姓名": {
"words": "小欧欧"
},
"国籍": {
"words": "中国"
},
"出生日期": {
"words": "19990530"
},
"性别": {
"words": "男"
},
"初次领证日期": {
"words": "20100125"
}
}
}
}
行驶证识别
对机动车行驶证正本所有关键字段进行识别
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用行驶证识别 """
client.vehicleLicense(image);
""" 如果有可选参数 """
options = {}
options["detect_direction"] = "true"
options["accuracy"] = "normal"
""" 带参数调用行驶证识别 """
client.vehicleLicense(image, options)
行驶证识别 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
vehicle_license_side | 否 | string | front/back | front | - front:识别行驶证主页 - back:识别行驶证副页 |
unified | 否 | string | true/false | false | - false:不进行归一化处理 - true:对输出字段进行归一化处理,将新/老版行驶证的“注册登记日期/注册日期”统一为”注册日期“进行输出 |
行驶证识别 返回数据参数详情
字段 | 必选 | 类型 | 说明 |
---|---|---|---|
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
words_result | 是 | array(object) | 识别结果数组 |
+words | 否 | string | 识别结果字符串 |
行驶证识别 返回示例
{
"errno": 0,
"msg": "success",
"data": {
"words_result_num": 10,
"words_result": {
"品牌型号": {
"words": "保时捷GT37182RUCRE"
},
"发证日期": {
"words": "20160104"
},
"使用性质": {
"words": "非营运"
},
"发动机号码": {
"words": "20832"
},
"号牌号码": {
"words": "苏A001"
},
"所有人": {
"words": "圆圆"
},
"住址": {
"words": "南京市江宁区弘景大道"
},
"注册日期": {
"words": "20160104"
},
"车辆识别代号": {
"words": "HCE58"
},
"车辆类型": {
"words": "小型轿车"
}
}
}
}
车牌识别
识别机动车车牌,并返回签发地和号牌。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用车牌识别 """
client.licensePlate(image);
""" 如果有可选参数 """
options = {}
options["multi_detect"] = "true"
""" 带参数调用车牌识别 """
client.licensePlate(image, options)
车牌识别 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
multi_detect | 否 | string | true false |
false | 是否检测多张车牌,默认为false,当置为true的时候可以对一张图片内的多张车牌进行识别 |
车牌识别 返回数据参数详情
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
log_id | uint64 | 是 | 请求标识码,随机数,唯一。 |
Color | string | 是 | 车牌颜色 |
number | string | 是 | 车牌号码 |
车牌识别 返回示例
{
"log_id": 3583925545,
"words_result": {
"color": "blue",
"number": "苏HS7766"
}
}
营业执照识别
识别营业执照,并返回关键字段的值,包括单位名称、法人、地址、有效期、证件编号、社会信用代码等。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用营业执照识别 """
client.businessLicense(image);
营业执照识别 请求参数详情
参数名称 | 是否必选 | 类型 | 说明 |
---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 |
营业执照识别 返回数据参数详情
参数 | 是否必须 | 类型 | 说明 |
---|---|---|---|
log_id | 是 | number | 请求标识码,随机数,唯一。 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
words_result | 是 | array(object) | 识别结果数组 |
left | 是 | number | 表示定位位置的长方形左上顶点的水平座标 |
top | 是 | number | 表示定位位置的长方形左上顶点的垂直座标 |
width | 是 | number | 表示定位位置的长方形的宽度 |
height | 是 | number | 表示定位位置的长方形的高度 |
words | 否 | string | 识别结果字符串 |
营业执照识别 返回示例
{
"log_id": 490058765,
"words_result": {
"单位名称": {
"location": {
"left": 500,
"top": 479,
"width": 618,
"height": 54
},
"words": "袁氏财团有限公司"
},
"法人": {
"location": {
"left": 938,
"top": 557,
"width": 94,
"height": 46
},
"words": "袁运筹"
},
"地址": {
"location": {
"left": 503,
"top": 644,
"width": 574,
"height": 57
},
"words": "江苏省南京市中山东路19号"
},
"有效期": {
"location": {
"left": 779,
"top": 1108,
"width": 271,
"height": 49
},
"words": "2015年02月12日"
},
"证件编号": {
"location": {
"left": 1219,
"top": 357,
"width": 466,
"height": 39
},
"words": "苏餐证字(2019)第666602666661号"
},
"社会信用代码": {
"location": {
"left": 0,
"top": 0,
"width": 0,
"height": 0
},
"words": "无"
}
},
"words_result_num": 6
}
通用票据识别
用户向服务请求识别医疗票据、发票、的士票、保险保单等票据类图片中的所有文字,并返回文字在图中的位置信息。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用通用票据识别 """
client.receipt(image);
""" 如果有可选参数 """
options = {}
options["recognize_granularity"] = "big"
options["probability"] = "true"
options["accuracy"] = "normal"
options["detect_direction"] = "true"
""" 带参数调用通用票据识别 """
client.receipt(image, options)
通用票据识别 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 | ||
recognize_granularity | 否 | string | big - 不定位单字符位置 small - 定位单字符位置 |
small | 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 |
probability | 否 | string | true false |
是否返回识别结果中每一行的置信度 | |
accuracy | 否 | string | normal - 使用快速服务 | normal 使用快速服务,1200ms左右时延;缺省或其它值使用高精度服务,1600ms左右时延 | |
detect_direction | 否 | string | true false |
false | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: - true:检测朝向; - false:不检测朝向。 |
通用票据识别 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
log_id | 是 | number | 唯一的log id,用于问题定位 |
words_result_num | 是 | number | 识别结果数,表示words_result的元素个数 |
words_result | 是 | array() | 定位和识别结果数组 |
location | 是 | object | 位置数组(座标0点为左上角) |
left | 是 | number | 表示定位位置的长方形左上顶点的水平座标 |
top | 是 | number | 表示定位位置的长方形左上顶点的垂直座标 |
width | 是 | number | 表示定位位置的长方形的宽度 |
height | 是 | number | 表示定位位置的长方形的高度 |
words | 是 | string | 识别结果字符串 |
chars | 否 | array() | 单字符结果,recognize_granularity=small时存在 |
location | 是 | array() | 位置数组(座标0点为左上角) |
left | 是 | number | 表示定位位置的长方形左上顶点的水平座标 |
top | 是 | number | 表示定位位置的长方形左上顶点的垂直座标 |
width | 是 | number | 表示定位定位位置的长方形的宽度 |
height | 是 | number | 表示位置的长方形的高度 |
char | 是 | string | 单字符识别结果 |
probability | 否 | object | 识别结果中每一行的置信度值,包含average:行置信度平均值,variance:行置信度方差,min:行置信度最小值 |
通用票据识别 返回示例
{
"log_id": 2661573626,
"words_result": [
{
"location": {
"left": 10,
"top": 3,
"width": 121,
"height": 24
},
"words": "姓名:小明明",
"chars": [
{
"location": {
"left": 16,
"top": 6,
"width": 17,
"height": 20
},
"char": "姓"
}
...
]
},
{
"location": {
"left": 212,
"top": 3,
"width": 738,
"height": 24
},
"words": "卡号/病案号:105353990标本编号:150139071送检科室:血液透析门诊病房",
"chars": [
{
"location": {
"left": 218,
"top": 6,
"width": 18,
"height": 21
},
"char": "卡"
}
...
]
}
],
"words_result_num": 2
}
自定义模板文字识别
自定义模板文字识别,是针对百度官方没有推出相应的模板,但是当用户需要对某一类卡证/票据(如房产证、军官证、火车票等)进行结构化的提取内容时,可以使用该产品快速制作模板,进行识别。
from aip import AipOcr
APP_ID = ''
API_KEY = ''
SECRET_KEY = ''
client = AipOcr(APP_ID, API_KEY, SECRET_KEY)
# 读取图片
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('aa.jpg')
//额外的参数
options = {}
//key固定为templateSign 后面给页面提供的 模板ID(templateSign) 的值即可
options["templateSign"] = ""
# 调用自定义模板文字识别
result = client.custom(image, options);
print(result)
自定义模板文字识别 请求参数详情
参数名称 | 是否必选 | 类型 | 说明 |
---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 |
options | 是 | object | 用于传入额外参数,如templateSign、classifierId |
+ templateSign | 否 | string | 您在自定义文字识别平台制作的模板的ID |
+ classifierId | 否 | string | 分类器Id。这个参数和templateSign至少存在一个,优先使用templateSign。存在templateSign时,表示使用指定模板;如果没有templateSign而有classifierId,表示使用分类器去判断使用哪个模板 |
自定义模板文字识别 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
error_code | number | number | 0代表成功,如果有错误码返回可以参考下方错误码列表排查问题 |
error_msg | 是 | string | 具体的失败信息,可以参考下方错误码列表排查问题 |
data | jsonObject | 识别返回的结果 |
自定义模板文字识别 返回示例
{
"isStructured": true,
"ret": [
{
"charset": [
{
"rect": {
"top": 183,
"left": 72,
"width": 14,
"height": 28
},
"word": "5"
},
{
"rect": {
"top": 183,
"left": 90,
"width": 14,
"height": 28
},
"word": "4"
},
{
"rect": {
"top": 183,
"left": 103,
"width": 15,
"height": 28
},
"word": "."
},
{
"rect": {
"top": 183,
"left": 116,
"width": 14,
"height": 28
},
"word": "5"
},
{
"rect": {
"top": 183,
"left": 133,
"width": 19,
"height": 28
},
"word": "元"
}
],
"word_name": "票价",
"word": "54.5元"
},
{
"charset": [
{
"rect": {
"top": 144,
"left": 35,
"width": 14,
"height": 28
},
"word": "2"
},
{
"rect": {
"top": 144,
"left": 53,
"width": 14,
"height": 28
},
"word": "0"
},
{
"rect": {
"top": 144,
"left": 79,
"width": 14,
"height": 28
},
"word": "1"
},
{
"rect": {
"top": 144,
"left": 97,
"width": 14,
"height": 28
},
"word": "7"
}
]
]
}
表格文字识别同步接口
自动识别表格线及表格内容,结构化输出表头、表尾及每个单元格的文字内容。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用表格文字识别同步接口 """
client.form(image);
表格文字识别同步接口 请求参数详情
参数名称 | 是否必选 | 类型 | 说明 |
---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 |
表格文字识别同步接口 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
log_id | 是 | long | 唯一的log id,用于问题定位 |
forms_result_num | 是 | number | |
forms_result | 是 | array(object) | 识别结果 |
表格文字识别同步接口 返回示例
{
"log_id": 3445697108,
"forms_result_num": 1,
"forms_result": [
{
"body": [
{
"column": 0,
"probability": 0.99855202436447,
"row": 0,
"vertexes_location": [
{
"x": -2,
"y": 260
},
{
"x": 21,
"y": 244
},
{
"x": 35,
"y": 266
},
{
"x": 12,
"y": 282
}
],
"words": "目"
},
{
"column": 3,
"probability": 0.99960500001907,
"row": 5,
"vertexes_location": [
{
"x": 603,
"y": 52
},
{
"x": 634,
"y": 32
},
{
"x": 646,
"y": 50
},
{
"x": 615,
"y": 71
}
],
"words": "66"
},
{
"column": 3,
"probability": 0.99756097793579,
"row": 6,
"vertexes_location": [
{
"x": 634,
"y": 73
},
{
"x": 648,
"y": 63
},
{
"x": 657,
"y": 77
},
{
"x": 643,
"y": 86
}
],
"words": "4"
},
{
"column": 3,
"probability": 0.96489900350571,
"row": 10,
"vertexes_location": [
{
"x": 699,
"y": 178
},
{
"x": 717,
"y": 167
},
{
"x": 727,
"y": 183
},
{
"x": 710,
"y": 194
}
],
"words": "3,"
},
{
"column": 3,
"probability": 0.99809801578522,
"row": 14,
"vertexes_location": [
{
"x": 751,
"y": 296
},
{
"x": 786,
"y": 273
},
{
"x": 797,
"y": 289
},
{
"x": 761,
"y": 312
}
],
"words": "206"
}
],
"footer": [
{
"column": 0,
"probability": 0.99853301048279,
"row": 0,
"vertexes_location": [
{
"x": 605,
"y": 698
},
{
"x": 632,
"y": 680
},
{
"x": 643,
"y": 696
},
{
"x": 616,
"y": 714
}
],
"words": "22"
}
],
"header": [
{
"column": 0,
"probability": 0.94802802801132,
"row": 0,
"vertexes_location": [
{
"x": 183,
"y": 96
},
{
"x": 286,
"y": 29
},
{
"x": 301,
"y": 52
},
{
"x": 199,
"y": 120
}
],
"words": "29月"
}
],
"vertexes_location": [
{
"x": -154,
"y": 286
},
{
"x": 512,
"y": -153
},
{
"x": 953,
"y": 513
},
{
"x": 286,
"y": 953
}
]
}
]
}
表格文字识别
自动识别表格线及表格内容,结构化输出表头、表尾及每个单元格的文字内容。表格文字识别接口为异步接口,分为两个API:提交请求接口、获取结果接口。
""" 读取图片 """
def get_file_content(filePath):
with open(filePath, 'rb') as fp:
return fp.read()
image = get_file_content('example.jpg')
""" 调用表格文字识别 """
client.tableRecognitionAsync(image);
表格文字识别 请求参数详情
参数名称 | 是否必选 | 类型 | 说明 |
---|---|---|---|
image | 是 | string | 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式 |
表格文字识别 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
log_id | 是 | long | 唯一的log id,用于问题定位 |
result | 是 | list | 返回的结果列表 |
+request_id | 是 | string | 该请求生成的request_id,后续使用该request_id获取识别结果 |
表格文字识别 返回示例
{
"result" : [
{
"request_id" : "1234_6789"
}
],
"log_id":149689853984104
}
失败应答示例(详细的错误码说明见本文档底部):
{
"log_id": 149319909347709,
"error_code": 282000
"error_msg":"internal error"
}
表格识别结果
获取表格文字识别结果
requestId = "23454320-23255"
""" 调用表格识别结果 """
client.getTableRecognitionResult(requestId);
""" 如果有可选参数 """
options = {}
options["result_type"] = "json"
""" 带参数调用表格识别结果 """
client.getTableRecognitionResult(requestId, options)
表格识别结果 请求参数详情
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 |
---|---|---|---|---|---|
request_id | 是 | string | 发送表格文字识别请求时返回的request id | ||
result_type | 否 | string | json excel |
excel | 期望获取结果的类型,取值为“excel”时返回xls文件的地址,取值为“json”时返回json格式的字符串,默认为”excel” |
表格识别结果 返回数据参数详情
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
log_id | 是 | long | 唯一的log id,用于问题定位 |
result | 是 | object | 返回的结果 |
+result_data | 是 | string | 识别结果字符串,如果request_type是excel,则返回excel的文件下载地址,如果request_type是json,则返回json格式的字符串 |
+percent | 是 | int | 表格识别进度(百分比) |
+request_id | 是 | string | 该图片对应请求的request_id |
+ret_code | 是 | int | 识别状态,1:任务未开始,2:进行中,3:已完成 |
+ret_msg | 是 | string | 识别状态信息,任务未开始,进行中,已完成 |
表格识别结果 返回示例
成功应答示例:
{
"result" : {
"result_data" : "",
"persent":100,
"request_id": "149691317905102",
"ret_code": 3
"ret_msg": "已完成",
},
"log_id":149689853984104
}
当request_type为excel时,result_data格式样例为:
{
"file_url":"https://ai.baidu.com/file/xxxfffddd"
}
当request_type为json时,result_data格式样例为:
{
"form_num": 1,
"forms": [
{
"header": [
{
"row": [
1
],
"column": [
1,
2
],
"word": "表头信息1",
}
],
"footer": [
{
"row": [
1
],
"column": [
1,
2
],
"word": "表尾信息1",
}
],
"body": [
{
"row": [
1
],
"column": [
1,
2
],
"word": "单元格文字",
}
]
}
]
}
其中各个参数的说明(json方式返回结果时):
字段 | 是否必选 | 类型 | 说明 |
---|---|---|---|
form_num | 是 | int | 表格数量(可能一张图片中包含多个表格) |
forms | 是 | list | 表格内容信息的列表 |
+header | 是 | list | 每个表格中,表头数据的相关信息 |
+footer | 是 | list | 表尾的相关信息 |
+body | 是 | list | 表格主体部分的数据 |
++row | 是 | list | 该单元格占据的行号 |
++column | 是 | list | 该单元格占据的列号 |
++word | 是 | string | 该单元格中的文字信息 |
失败应答示例(详细的错误码说明见本文档底部):
{
"log_id": 149319909347709,
"error_code": 282000
"error_msg":"internal error"
}
表格识别接口
代码示例
调用表格识别请求,获取请求id之后轮询调用表格识别获取结果的接口
""" 同步获取表格识别 返回识别结果 """
client.tableRecognition(
get_file_content('table.jpg'),
{
'result_type': 'json',
},
)
请求参数
tableRecognition(image, option, timeout)
参数名称 | 是否必选 | 类型 | 可选值范围 | 默认值 | 说明 | ||
---|---|---|---|---|---|---|---|
image | 是 | string | 图片base64编码数据 | ||||
+result_type | 是 | string | json excel |
excel | 期望获取结果的类型,取值为“excel”时返回xls文件的地址,取值为“json”时返回json格式的字符串,默认为”excel” | ||
timeout | 是 | number | 10000 | 轮询tableGetresult接口获取数据的超时时间,单位毫秒 |
返回参数
与表格识别结果接口返回相同