0%

先简单介绍一下。
直接使用腾讯云或者百度云的接口的方法我就不过多赘述了,我觉得他们的开发文档写的蛮好,直接对着做就行了。我的工作主要就是将腾讯云的 api 接口进行了简单的封装,免去了环境配置和身份认证过程,只需要密钥和图片就能直接进行识别,甚至密钥也可以不用,大大方便了同学们的操作。
同时也在刘同学的帮助下实现了 paddlepaddle 模型的接口,后续还会再加上其他更多的预训练模型,提供更多的选择,同时后续我们还会将各个模型性能对比进行分析,为选择提供参考。
一些常用语言的 demo 在下方有具体实例,复制粘贴就能用了。

具体实例中是核心代码,在https://github.com/zhuzil/ocrDemo.git 中有各个语言的demo工程文件,clone下来就能用了,不过不是很推荐吧,我的具体实例中的核心代码已经写的比较清楚了,复制过去比较好,下载的demo我感觉可能环境版本什么的出问题在你们的电脑上不一定能跑通。

腾讯云 api 封装接口

URLhttps://www.7-an.com:5000/api/ocr
MethodPOST

请求参数

参数 类型 必填 说明
SecretID String
SecretKey String
ImageBase64 String 必填 暂时不支持 URL,后续会补充
IsCorrection Int 数字 1 或 0,1 使用校正,0 不使用,图片校准默认为 0
💡 注意,`SecretID` 和 `SecretKey` 字段为腾讯云文字识别服务的个人密钥,在这个接口中我把我的密钥做成了默认密钥,如果用户没有输入密钥的话则会使用默认密钥,因为腾讯云只有免费的1000次额度所以希望同学们谨慎使用,同时我也对接口使用做了一些限制,每个IP每10秒只能获取一次。希望同学们尽量使用自己的密钥。

密钥获取方式

IsCorrection 参数说明

感谢刘同学友情赞助的校正代码,github 地址https://github.com/evibhm/ImageCorrection,欢迎 fork 和 star
校正效果如下:
原图:

test.jpg

校正后:

test1_cor.jpg

请求示例

json 格式请求

1
2
3
4
5
6
{
"ImageBase64":ImageBase64Data,
"IsCorrection":1,
"SecretId":"xxxxx",
"SecretKey":"xxxxx"
}

成功响应

条件:请求参数合法,并且用户身份校验通过。
状态码:200 OK
响应示例:如果成功识别最会返回一个JSON格式的串,结果存在data值中:

1
2
3
4
5
{
"code": 200,
"message": "Your SecretId or SecretKey is wrong, the default SecretId and SecretKey are already used",
"data": "{\"TableDetections\": [{\"Cells\": [{\"ColTl\": 0, \"RowTl\": 0, \"ColBr\": 9, \"RowBr\": 1, \"Text\": \"五(1) 班卫生值日表\", \"Type\": \"body\", \"Confidence\": 99.982088804245, \"Polygon\": [{\"X\": 26, \"Y\": 193}, {\"X\": 774, \"Y\": 193}, {\"X\": 774, \"Y\": 282}, {\"X\": 26, \"Y\": 282}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 25}]}, {\"ColTl\": 0, \"RowTl\": 1, \"ColBr\": 1, \"RowBr\": 2, \"Text\": \"星期一\", \"Type\": \"body\", \"Confidence\": 99.96871948242188, \"Polygon\": [{\"X\": 26, \"Y\": 282}, {\"X\": 107, \"Y\": 282}, {\"X\": 107, \"Y\": 326}, {\"X\": 26, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 1, \"RowTl\": 1, \"ColBr\": 2, \"RowBr\": 2, \"Text\": \"梅亚婷\", \"Type\": \"body\", \"Confidence\": 99.99997615814209, \"Polygon\": [{\"X\": 107, \"Y\": 282}, {\"X\": 191, \"Y\": 282}, {\"X\": 191, \"Y\": 326}, {\"X\": 107, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 2, \"RowTl\": 1, \"ColBr\": 3, \"RowBr\": 2, \"Text\": \"潘林峰\", \"Type\": \"body\", \"Confidence\": 99.99949336051941, \"Polygon\": [{\"X\": 191, \"Y\": 282}, {\"X\": 275, \"Y\": 282}, {\"X\": 275, \"Y\": 326}, {\"X\": 191, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 3, \"RowTl\": 1, \"ColBr\": 4, \"RowBr\": 2, \"Text\": \"余校凯\", \"Type\": \"body\", \"Confidence\": 99.98820424079895, \"Polygon\": [{\"X\": 275, \"Y\": 282}, {\"X\": 359, \"Y\": 282}, {\"X\": 359, \"Y\": 326}, {\"X\": 275, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 4, \"RowTl\": 1, \"ColBr\": 5, \"RowBr\": 2, \"Text\": \"郑江豪\", \"Type\": \"body\", \"Confidence\": 99.99780654907227, \"Polygon\": [{\"X\": 359, \"Y\": 282}, {\"X\": 442, \"Y\": 282}, {\"X\": 442, \"Y\": 326}, {\"X\": 359, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 5, \"RowTl\": 1, \"ColBr\": 6, \"RowBr\": 2, \"Text\": \"范立新\", \"Type\": \"body\", \"Confidence\": 100, \"Polygon\": [{\"X\": 442, \"Y\": 282}, {\"X\": 526, \"Y\": 282}, {\"X\": 526, \"Y\": 326}, {\"X\": 442, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 6, \"RowTl\": 1, \"ColBr\": 7, \"RowBr\": 2, \"Text\": \"柯志生\", \"Type\": \"body\", \"Confidence\": 99.99997019767761, \"Polygon\": [{\"X\": 526, \"Y\": 282}, {\"X\": 610, \"Y\": 282}, {\"X\": 610, \"Y\": 326}, {\"X\": 526, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 7, \"RowTl\": 1, \"ColBr\": 8, \"RowBr\": 2, \"Text\": \"周于\", \"Type\": \"body\", \"Confidence\": 99.9976396560669, \"Polygon\": [{\"X\": 610, \"Y\": 282}, {\"X\": 694, \"Y\": 282}, {\"X\": 694, \"Y\": 326}, {\"X\": 610, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 14}]}, {\"ColTl\": 8, \"RowTl\": 1, \"ColBr\": 9, \"RowBr\": 2, \"Text\": \"李慧得\", \"Type\": \"body\", \"Confidence\": 99.99997019767761, \"Polygon\": [{\"X\": 694, \"Y\": 282}, {\"X\": 774, \"Y\": 282}, {\"X\": 774, \"Y\": 326}, {\"X\": 694, \"Y\": 326}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 0, \"RowTl\": 2, \"ColBr\": 1, \"RowBr\": 3, \"Text\": \"星期二\", \"Type\": \"body\", \"Confidence\": 99.99971389770508, \"Polygon\": [{\"X\": 26, \"Y\": 326}, {\"X\": 107, \"Y\": 326}, {\"X\": 107, \"Y\": 373}, {\"X\": 26, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 14}]}, {\"ColTl\": 1, \"RowTl\": 2, \"ColBr\": 2, \"RowBr\": 3, \"Text\": \"郑江尧\", \"Type\": \"body\", \"Confidence\": 99.99954104423523, \"Polygon\": [{\"X\": 107, \"Y\": 326}, {\"X\": 191, \"Y\": 326}, {\"X\": 191, \"Y\": 373}, {\"X\": 107, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 14}]}, {\"ColTl\": 2, \"RowTl\": 2, \"ColBr\": 3, \"RowBr\": 3, \"Text\": \"郑锦证\", \"Type\": \"body\", \"Confidence\": 99.99963641166687, \"Polygon\": [{\"X\": 191, \"Y\": 326}, {\"X\": 275, \"Y\": 326}, {\"X\": 275, \"Y\": 373}, {\"X\": 191, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 14}]}, {\"ColTl\": 3, \"RowTl\": 2, \"ColBr\": 4, \"RowBr\": 3, \"Text\": \"虞志峰\", \"Type\": \"body\", \"Confidence\": 99.98536109924316, \"Polygon\": [{\"X\": 275, \"Y\": 326}, {\"X\": 359, \"Y\": 326}, {\"X\": 359, \"Y\": 373}, {\"X\": 275, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 4, \"RowTl\": 2, \"ColBr\": 5, \"RowBr\": 3, \"Text\": \"虞雨清\", \"Type\": \"body\", \"Confidence\": 98.66757988929749, \"Polygon\": [{\"X\": 359, \"Y\": 326}, {\"X\": 442, \"Y\": 326}, {\"X\": 442, \"Y\": 373}, {\"X\": 359, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 5, \"RowTl\": 2, \"ColBr\": 6, \"RowBr\": 3, \"Text\": \"郑小伟\", \"Type\": \"body\", \"Confidence\": 100, \"Polygon\": [{\"X\": 442, \"Y\": 326}, {\"X\": 526, \"Y\": 326}, {\"X\": 526, \"Y\": 373}, {\"X\": 442, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 6, \"RowTl\": 2, \"ColBr\": 7, \"RowBr\": 3, \"Text\": \"桂堂豪\", \"Type\": \"body\", \"Confidence\": 99.99939799308777, \"Polygon\": [{\"X\": 526, \"Y\": 326}, {\"X\": 610, \"Y\": 326}, {\"X\": 610, \"Y\": 373}, {\"X\": 526, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 7, \"RowTl\": 2, \"ColBr\": 8, \"RowBr\": 3, \"Text\": \"何志勇\", \"Type\": \"body\", \"Confidence\": 99.99999403953552, \"Polygon\": [{\"X\": 610, \"Y\": 326}, {\"X\": 694, \"Y\": 326}, {\"X\": 694, \"Y\": 373}, {\"X\": 610, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 14}]}, {\"ColTl\": 8, \"RowTl\": 2, \"ColBr\": 9, \"RowBr\": 3, \"Text\": \"张志霞\", \"Type\": \"body\", \"Confidence\": 99.99999403953552, \"Polygon\": [{\"X\": 694, \"Y\": 326}, {\"X\": 774, \"Y\": 326}, {\"X\": 774, \"Y\": 373}, {\"X\": 694, \"Y\": 373}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 14}]}, {\"ColTl\": 0, \"RowTl\": 3, \"ColBr\": 1, \"RowBr\": 4, \"Text\": \"星期三\", \"Type\": \"body\", \"Confidence\": 99.99997019767761, \"Polygon\": [{\"X\": 26, \"Y\": 373}, {\"X\": 107, \"Y\": 373}, {\"X\": 107, \"Y\": 418}, {\"X\": 26, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 1, \"RowTl\": 3, \"ColBr\": 2, \"RowBr\": 4, \"Text\": \"桂小敏\", \"Type\": \"body\", \"Confidence\": 99.99976754188538, \"Polygon\": [{\"X\": 107, \"Y\": 373}, {\"X\": 191, \"Y\": 373}, {\"X\": 191, \"Y\": 418}, {\"X\": 107, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 2, \"RowTl\": 3, \"ColBr\": 3, \"RowBr\": 4, \"Text\": \"雷玉婷\", \"Type\": \"body\", \"Confidence\": 99.99997019767761, \"Polygon\": [{\"X\": 191, \"Y\": 373}, {\"X\": 275, \"Y\": 373}, {\"X\": 275, \"Y\": 418}, {\"X\": 191, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 3, \"RowTl\": 3, \"ColBr\": 4, \"RowBr\": 4, \"Text\": \"李洁\", \"Type\": \"body\", \"Confidence\": 99.9998688697815, \"Polygon\": [{\"X\": 275, \"Y\": 373}, {\"X\": 359, \"Y\": 373}, {\"X\": 359, \"Y\": 418}, {\"X\": 275, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 4, \"RowTl\": 3, \"ColBr\": 5, \"RowBr\": 4, \"Text\": \"雷可丽\", \"Type\": \"body\", \"Confidence\": 99.99987483024597, \"Polygon\": [{\"X\": 359, \"Y\": 373}, {\"X\": 442, \"Y\": 373}, {\"X\": 442, \"Y\": 418}, {\"X\": 359, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 5, \"RowTl\": 3, \"ColBr\": 6, \"RowBr\": 4, \"Text\": \"李爱兰\", \"Type\": \"body\", \"Confidence\": 99.99998211860657, \"Polygon\": [{\"X\": 442, \"Y\": 373}, {\"X\": 526, \"Y\": 373}, {\"X\": 526, \"Y\": 418}, {\"X\": 442, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 6, \"RowTl\": 3, \"ColBr\": 7, \"RowBr\": 4, \"Text\": \"桂喻霞\", \"Type\": \"body\", \"Confidence\": 99.99707341194153, \"Polygon\": [{\"X\": 526, \"Y\": 373}, {\"X\": 610, \"Y\": 373}, {\"X\": 610, \"Y\": 418}, {\"X\": 526, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 7, \"RowTl\": 3, \"ColBr\": 8, \"RowBr\": 4, \"Text\": \"郭培润\", \"Type\": \"body\", \"Confidence\": 99.99442100524902, \"Polygon\": [{\"X\": 610, \"Y\": 373}, {\"X\": 694, \"Y\": 373}, {\"X\": 694, \"Y\": 418}, {\"X\": 610, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 8, \"RowTl\": 3, \"ColBr\": 9, \"RowBr\": 4, \"Text\": \"范亚妮\", \"Type\": \"body\", \"Confidence\": 99.99880194664001, \"Polygon\": [{\"X\": 694, \"Y\": 373}, {\"X\": 774, \"Y\": 373}, {\"X\": 774, \"Y\": 418}, {\"X\": 694, \"Y\": 418}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 0, \"RowTl\": 4, \"ColBr\": 1, \"RowBr\": 5, \"Text\": \"星期四\", \"Type\": \"body\", \"Confidence\": 99.99974370002747, \"Polygon\": [{\"X\": 26, \"Y\": 418}, {\"X\": 107, \"Y\": 418}, {\"X\": 107, \"Y\": 464}, {\"X\": 26, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 1, \"RowTl\": 4, \"ColBr\": 2, \"RowBr\": 5, \"Text\": \"桂宗宙\", \"Type\": \"body\", \"Confidence\": 99.99898076057434, \"Polygon\": [{\"X\": 107, \"Y\": 418}, {\"X\": 191, \"Y\": 418}, {\"X\": 191, \"Y\": 464}, {\"X\": 107, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 2, \"RowTl\": 4, \"ColBr\": 3, \"RowBr\": 5, \"Text\": \"李谓志\", \"Type\": \"body\", \"Confidence\": 99.9998390674591, \"Polygon\": [{\"X\": 191, \"Y\": 418}, {\"X\": 275, \"Y\": 418}, {\"X\": 275, \"Y\": 464}, {\"X\": 191, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 3, \"RowTl\": 4, \"ColBr\": 4, \"RowBr\": 5, \"Text\": \"雷彩霞\", \"Type\": \"body\", \"Confidence\": 99.99995231628418, \"Polygon\": [{\"X\": 275, \"Y\": 418}, {\"X\": 359, \"Y\": 418}, {\"X\": 359, \"Y\": 464}, {\"X\": 275, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 4, \"RowTl\": 4, \"ColBr\": 5, \"RowBr\": 5, \"Text\": \"郑佳勇\", \"Type\": \"body\", \"Confidence\": 99.99539256095886, \"Polygon\": [{\"X\": 359, \"Y\": 418}, {\"X\": 442, \"Y\": 418}, {\"X\": 442, \"Y\": 464}, {\"X\": 359, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 5, \"RowTl\": 4, \"ColBr\": 6, \"RowBr\": 5, \"Text\": \"马佳辉\", \"Type\": \"body\", \"Confidence\": 99.99973773956299, \"Polygon\": [{\"X\": 442, \"Y\": 418}, {\"X\": 526, \"Y\": 418}, {\"X\": 526, \"Y\": 464}, {\"X\": 442, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 6, \"RowTl\": 4, \"ColBr\": 7, \"RowBr\": 5, \"Text\": \"郭培建\", \"Type\": \"body\", \"Confidence\": 99.99993443489075, \"Polygon\": [{\"X\": 526, \"Y\": 418}, {\"X\": 610, \"Y\": 418}, {\"X\": 610, \"Y\": 464}, {\"X\": 526, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 7, \"RowTl\": 4, \"ColBr\": 8, \"RowBr\": 5, \"Text\": \"李智政\", \"Type\": \"body\", \"Confidence\": 99.99950528144836, \"Polygon\": [{\"X\": 610, \"Y\": 418}, {\"X\": 694, \"Y\": 418}, {\"X\": 694, \"Y\": 464}, {\"X\": 610, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 8, \"RowTl\": 4, \"ColBr\": 9, \"RowBr\": 5, \"Text\": \"范成龙\", \"Type\": \"body\", \"Confidence\": 100, \"Polygon\": [{\"X\": 694, \"Y\": 418}, {\"X\": 774, \"Y\": 418}, {\"X\": 774, \"Y\": 464}, {\"X\": 694, \"Y\": 464}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 14}]}, {\"ColTl\": 0, \"RowTl\": 5, \"ColBr\": 1, \"RowBr\": 6, \"Text\": \"星期五\", \"Type\": \"body\", \"Confidence\": 99.99926090240479, \"Polygon\": [{\"X\": 26, \"Y\": 464}, {\"X\": 107, \"Y\": 464}, {\"X\": 107, \"Y\": 510}, {\"X\": 26, \"Y\": 510}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 1, \"RowTl\": 5, \"ColBr\": 2, \"RowBr\": 6, \"Text\": \"朱凯鹏\", \"Type\": \"body\", \"Confidence\": 99.99980926513672, \"Polygon\": [{\"X\": 107, \"Y\": 464}, {\"X\": 191, \"Y\": 464}, {\"X\": 191, \"Y\": 510}, {\"X\": 107, \"Y\": 510}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 2, \"RowTl\": 5, \"ColBr\": 3, \"RowBr\": 6, \"Text\": \"虞校水\", \"Type\": \"body\", \"Confidence\": 99.98979568481445, \"Polygon\": [{\"X\": 191, \"Y\": 464}, {\"X\": 275, \"Y\": 464}, {\"X\": 275, \"Y\": 510}, {\"X\": 191, \"Y\": 510}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 3, \"RowTl\": 5, \"ColBr\": 4, \"RowBr\": 6, \"Text\": \"郑雯丽\", \"Type\": \"body\", \"Confidence\": 99.99974370002747, \"Polygon\": [{\"X\": 275, \"Y\": 464}, {\"X\": 359, \"Y\": 464}, {\"X\": 359, \"Y\": 510}, {\"X\": 275, \"Y\": 510}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 4, \"RowTl\": 5, \"ColBr\": 5, \"RowBr\": 6, \"Text\": \"郑琳\", \"Type\": \"body\", \"Confidence\": 100, \"Polygon\": [{\"X\": 359, \"Y\": 464}, {\"X\": 442, \"Y\": 464}, {\"X\": 442, \"Y\": 510}, {\"X\": 359, \"Y\": 510}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 14}]}, {\"ColTl\": 5, \"RowTl\": 5, \"ColBr\": 6, \"RowBr\": 6, \"Text\": \"范越\", \"Type\": \"body\", \"Confidence\": 99.99940991401672, \"Polygon\": [{\"X\": 442, \"Y\": 464}, {\"X\": 526, \"Y\": 464}, {\"X\": 526, \"Y\": 510}, {\"X\": 442, \"Y\": 510}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 6, \"RowTl\": 5, \"ColBr\": 7, \"RowBr\": 6, \"Text\": \"张鑫涛\", \"Type\": \"body\", \"Confidence\": 99.99998211860657, \"Polygon\": [{\"X\": 526, \"Y\": 464}, {\"X\": 610, \"Y\": 464}, {\"X\": 610, \"Y\": 510}, {\"X\": 526, \"Y\": 510}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 7, \"RowTl\": 5, \"ColBr\": 8, \"RowBr\": 6, \"Text\": \"雷万林\", \"Type\": \"body\", \"Confidence\": 99.99470114707947, \"Polygon\": [{\"X\": 610, \"Y\": 464}, {\"X\": 694, \"Y\": 464}, {\"X\": 694, \"Y\": 511}, {\"X\": 610, \"Y\": 510}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 8, \"RowTl\": 5, \"ColBr\": 9, \"RowBr\": 6, \"Text\": \"雷建国\", \"Type\": \"body\", \"Confidence\": 100, \"Polygon\": [{\"X\": 694, \"Y\": 464}, {\"X\": 774, \"Y\": 464}, {\"X\": 774, \"Y\": 510}, {\"X\": 694, \"Y\": 511}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 15}]}, {\"ColTl\": 0, \"RowTl\": 6, \"ColBr\": 9, \"RowBr\": 7, \"Text\": \"备注:李林涛、梅美雪、江瑶洁、郑佳杰、李建华负责黑板及窗台等区域卫生。\", \"Type\": \"body\", \"Confidence\": 99.58259463310242, \"Polygon\": [{\"X\": 26, \"Y\": 510}, {\"X\": 774, \"Y\": 510}, {\"X\": 774, \"Y\": 557}, {\"X\": 26, \"Y\": 557}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 17}]}, {\"ColTl\": 0, \"RowTl\": 7, \"ColBr\": 9, \"RowBr\": 8, \"Text\": \"我们在一起一直在努力!\", \"Type\": \"body\", \"Confidence\": 98.30002188682556, \"Polygon\": [{\"X\": 26, \"Y\": 557}, {\"X\": 774, \"Y\": 557}, {\"X\": 774, \"Y\": 604}, {\"X\": 26, \"Y\": 604}], \"AdvancedInfo\": \"\", \"Contents\": [{\"ParagNo\": 0, \"WordSize\": 22}]}], \"Titles\": null, \"Type\": 1, \"TableCoordPoint\": [{\"X\": 26, \"Y\": 193}, {\"X\": 774, \"Y\": 193}, {\"X\": 774, \"Y\": 604}, {\"X\": 26, \"Y\": 604}]}], \"Data\": \"UEsDBBQAAAAIAAAAAADO8yasOQEAAKsEAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbK2Uy27CMBBF93xFlG1FTLvoogI2bbctUvsDrj1JXPySZ6Dw952ERwUqBBQ2saLxveeOPfL4cx0Bs5WzHid5TRSfhEBVg5NYhAieK2VIThL/pkpEqeayAvEwGj0KFTyBpyE1Hvl0kGXjFyjlwlL2uuIKmuAn+XeEKs+eN3sb3CQ3rvFoC+KUjMFHKhmjNUoSl0VTPSlNYPGMdun1UWvDbVsFK9s9WJuId3+Q9yWkZDRkM5noTTp2FCsrsJYJ9Acl4ysszif+hxrK0ijQQS0cSwqMCaTGGoCcLQ68L4hCaws3z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9zaGVldDEueG1sUEsFBgAAAAALAAsAxQIAAEk0AAAAAA==\", \"PdfPageSize\": 0, \"Angle\": 0, \"RequestId\": \"b127722b-d3d6-45c6-b622-85332916a526\"}"
}

data 中的参数介绍

参数名称 类型 描述
TableDetections Array of TableDetectInfo 检测到的文本信息,具体内容请点击左侧链接。
Data String Base64 编码后的 Excel 数据。
PdfPageSize Integer 图片为 PDF 时,返回 PDF 的总页数,默认为 0
Angle Float 图片旋转角度(角度制),文本的水平方向为 0°,统一以逆时针方向旋转,逆时针为负,角度范围为-360° 至 0°。
RequestId String 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。

错误响应

条件:ImageBase64和ImageUrl都没有传入。
状态码500 BAD REQUEST

响应示例:

1
2
3
4
5
6
<!doctype html>
<html lang=en>
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or
there is an error in the application.</p>

密钥获取

  1. 开通文字识别服务:进入 文字识别控制台,注册腾讯云账号并通过实名认证,阅读《文字识别服务条款》后勾选同意并单击立即开通;
    image.png

  2. 获取个人密钥:单击 查看密钥,进入控制台的 API 密钥管理界面,可查看您的个人密钥,若是新用户可单击【新建密钥】按钮创建个人密钥
    image2.png

paddle 预训练模型接口

  • URLhttps://www.7-an.com:5000/api/paddle
  • MethodPOST

请求参数

参数 类型 必填 说明
ImageBase64 String 必填 暂时不支持 URL,后续会补充
IsCorrection Int 数字 1 或 0,1 使用校正,0 不使用,图片校准默认为 0

请求示例

json 格式请求

1
2
3
4
{
"ImageBase64":ImageBase64Data,
"IsCorrection":1,
}

响应的结果与使用腾讯云 api 封装的接口相同。

具体实例

Python 示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import base64
import requests
#image转base64
def encode_base64(file):
with open(file,'rb') as f:
img_data = f.read()
base64_data = base64.b64encode(img_data)
return base64_data
# 读取图片
file = "./test.jpg"
base64_data = encode_base64(file)
img_str = base64_data.decode() #img_str是字符串类型变量,decode()对字节类型变量进行解码,bytes->str
Data = {
"ImageBase64":img_str,
"IsCorrection":1,
"SecretId":"xxx",
"SecretKey":"xxx"
}
#访问服务
result = requests.post('http://www.7-an.com:5000/api/paddle',data=Data)
print(result.text)

Python 实现如上,主要是参数以及图片转 base64,对于其他语言来说也是一样,都是在代码中设置好参数之后,将读取的图片转为 base64 再用 POST 请求我们的接口,获得返回结果。

Java 示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Base64;
import com.alibaba.fastjson2.JSONObject;

public class demo {
public static String img2base64(String path) throws IOException {
File file = new File(path);
InputStream inputStream = new FileInputStream(file);
byte[] buffer = new byte[(int) file.length()];
inputStream.read(buffer);
inputStream.close();

// 将图片转换为 Base64 编码的字符串
String imageBase64 = Base64.getEncoder().encodeToString(buffer);
return imageBase64;
}
public static void main(String[] args) throws Exception {
// 创建 URL 对象
URL url = new URL("http://www.7-an.com:5000/api/paddle");

// 打开连接
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");

// 设置请求头信息
connection.setRequestProperty("Content-Type", "application/json");
connection.setRequestProperty("Accept", "application/json");

// 启用输出流,向服务器发送数据
connection.setDoOutput(true);

String imgPath = "test.jpg";
String base64Img = img2base64(imgPath);
// 创建 JSON 请求数据
JSONObject jsonObject = new JSONObject();
jsonObject.put("ImageBase64", base64Img);
jsonObject.put("IsCorrection", 1);

String requestBody = jsonObject.toJSONString();

// 发送请求数据
try(OutputStream os = connection.getOutputStream()) {
byte[] input = requestBody.getBytes("utf-8");
os.write(input, 0, input.length);
}

// 读取响应
try(BufferedReader br = new BufferedReader(
new InputStreamReader(connection.getInputStream(), "utf-8"))) {
StringBuilder response = new StringBuilder();
String responseLine = null;
while ((responseLine = br.readLine()) != null) {
response.append(responseLine.trim());
}
System.out.println(response.toString());
}
}
}

java 需要装一个 com.alibaba.fastjson2.JSONObject 包。

Nodejs 示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const axios = require("axios");
const fs = require("fs");
// Base64编码
let img_raw = fs.readFileSync("../test.jpg");
let img_b64 = img_raw.toString("base64");

// 发送请求
axios
.post("http://www.7-an.com:5000/api/paddle", {
ImageBase64: img_b64,
IsCorrection: 1,
})
.then((res) => {
console.log(res.data);
});

.NET 示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System.Net.Http;

HttpClient client = new HttpClient();
byte[] imgBytes = File.ReadAllBytes("../test.jpg");
string imgBase64 = Convert.ToBase64String(imgBytes);
var values = new Dictionary<string, string>
{
{ "ImageBase64", imgBase64 },
{ "IsCorrection", "1" }
};

string url = "http://www.7-an.com:5000/api/paddle";

var data = new FormUrlEncodedContent(values);
var response = await client.PostAsync(url, data);
string responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseString);

在 visual studio 上或者其他地方创建一个 donet 框架的项目,把代码复制过去就能使用了。

Go 示例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package main

import (
"bytes"
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"unsafe"
)

func main() {
// 读取本地图片文件
fileData, err := ioutil.ReadFile("../test.jpg")
if err != nil {
panic(err)
}
// 将图片文件转换成base64编码
imageBase64 := base64.StdEncoding.EncodeToString(fileData)

//在这里编辑Json串
song := make(map[string]string)
song["ImageBase64"] = imageBase64
song["IsCorrection"] = "1"
bytesData, _ := json.Marshal(song)

res, err := http.Post("http://www.7-an.com:5000/api/paddle",
"application/json;charset=utf-8", bytes.NewBuffer([]byte(bytesData)))
if err != nil {
fmt.Println("Fatal error ", err.Error())
}

defer res.Body.Close()

content, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println("Fatal error ", err.Error())
}

str := (*string)(unsafe.Pointer(&content)) //转化为string,优化内存
fmt.Println(*str)

}

本地配置好环境之后,代码复制过去之后,命令行运行:

1
go run demo.go

Cpp 示例

需要引入库的 HTTP 函数

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <fstream>
#include <malloc.h>
#include "HTTPRequest.hpp"

using namespace std;


static const std::string base64_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/";

static inline bool is_base64(unsigned char c) {
return (isalnum(c) || (c == '+') || (c == '/'));
}

std::string base64_encode(const char* bytes_to_encode, unsigned int in_len)
{
std::string ret;
int i = 0;
int j = 0;
unsigned char char_array_3[3];
unsigned char char_array_4[4];

while (in_len--)
{
char_array_3[i++] = *(bytes_to_encode++);
if (i == 3)
{
char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
char_array_4[3] = char_array_3[2] & 0x3f;
for (i = 0; (i < 4); i++)
{
ret += base64_chars[char_array_4[i]];
}
i = 0;
}
}
if (i)
{
for (j = i; j < 3; j++)
{
char_array_3[j] = '\0';
}

char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
char_array_4[3] = char_array_3[2] & 0x3f;

for (j = 0; (j < i + 1); j++)
{
ret += base64_chars[char_array_4[j]];
}

while ((i++ < 3))
{
ret += '=';
}

}
return ret;
}



int main() {
fstream f;
f.open("test.jpg", ios::in | ios::binary);
f.seekg(0, std::ios_base::end); //设置偏移量至文件结尾
std::streampos sp = f.tellg(); //获取文件大小
int size = sp;

char* buffer = (char*)malloc(sizeof(char) * size);
f.seekg(0, std::ios_base::beg); //设置偏移量至文件开头
f.read(buffer, size); //将文件内容读入buffer
cout << "file size:" << size << endl;

string imgBase64 = base64_encode(buffer, size); //编码
cout << "img base64 encode size:" << imgBase64.size() << endl;

try
{
http::Request request{ "http://www.7-an.com:5000/api/paddle" };
// c++的Json比较复杂,没有使用网上的Json相关库,而是用的字符串拼接,用起来比较麻烦。
const std::string body = "{\"IsCorrection\": 1, \"ImageBase64\": \"" + imgBase64 + "\"}";
const auto response = request.send("POST", body, {
{"Content-Type", "application/json"}
});
std::cout << std::string{ response.body.begin(), response.body.end() } << '\n'; // print the result
}
catch (const std::exception& e)
{
std::cerr << "Request failed, error: " << e.what() << '\n';
}

return 0;
}

本站总访问量