深色模式
在线试用
示例图片:

{>...0}
接口文档
调用示例
sh
POST https://open.apihub.net/api/ocr-general
apihub-token: {{ apihub_token }}
{
"url": "https://dl.apihub.net/ocr/demo_img/001.png"
}
参数说明
参数 | 位置 | 类型 | 必传 | 说明 |
---|---|---|---|---|
url | JsonBody | str | 是 | 图片 url 地址,需要能被 apihub 服务器访问 |
返回值说明
字段 | 类型 | 说明 |
---|---|---|
fetch_img_cost | int | apihub 服务器访问参数中的 url 地址,下载图片的耗时。单位毫秒。 |
texts | list[str] | 识别到的文字内容 |
boxes | list[list[int]] | texts 中的每个元素会有一个对应的文字位置框。格式:(x1, y1, x2, y2) 表示矩形框对角线上的两个顶点 |
angle | int | 图片旋转角度(0、90、180、270), angle=90 时,表示原图片顺时针旋转了90°,要摆正图片需要逆时针旋转90°。boxes 中的位置框是图片摆正后的数据。 |