-
请求示例
curl -i -XPOST -H 'Content-Type: application/json' \ -H 'Authorization: your authorization code here' \ -d'{"URL":"https://wx3.sinaimg.cn/orj480/007ZfxAWly8hjqdy75555j31hc0u0ac5.jpg"}' \ https://open.datastory.com.cn/api/thanos/newocr
- URL为图片的链接地址
- 响应示例
{"OCR":"{\"result\":\"天猫双1惊喜夜\\n-2023-\\n俱寂万额\\n直播\\n@天猫双11惊喜夜\",\"resultList\":\"[\\\"天猫双1惊喜夜\\\",\\\"-2023-\\\",\\\"俱寂万额\\\",\\\"直播\\\",\\\"@天猫双11惊喜夜\\\"]\",\"size\":\"[[153,32],[49,21],[130,39],[66,29],[310,38]]\",\"bbox\":\"[[[998,529],[1151,529],[1151,561],[998,561]],[[1049,553],[1098,553],[1098,574],[1049,574]],[[147,586],[277,586],[277,625],[147,625]],[[1041,589],[1107,589],[1107,618],[1041,618]],[[892,633],[1202,633],[1202,671],[892,671]]]\"}"}
- result:识别结果
- size:图片里每个文本框的大小,仅对JPG/PNG有效
- bbox:三维数组,每个文本框左上点,右上点,右下点和左下点的横坐标和纵坐标
- resultList:也是识别结果,跟size/bbox一一对应