帖子
帖子
用户
博客
课程
显示全部楼层
67
帖子
0
勋章
974
Y币

hanvonCloudTableReader 模块试用分享(文本识别)

[复制链接]
发表于 2018-3-27 20:05:45
hanvonCloudTableReader模块封装了汉王云文本商务版识别的sdk,可通过选择相册中的文本(包含表格)读取文本信息
https://docs.apicloud.com/Client ... vonCloudTableReader

说一下使用中需要注意的地方:
1. config.xml文件的配置:
生成Android key
时需要生成证书的MD5指纹,使用下面的命令:keytool -list -v -keystore mystore.keystore
  1. <feature name="hanvonCloudTableReader">
  2. <param name="androidkey" value="163114c8-31b5-4424-bb85-617f81cf54d9" />
  3. <param name="ioskey" value="ffa49301-d271-4ecc-8a3c-5a165eb5768d"/>
  4. </feature>
复制代码
2. http://developer**.**/api/toAPIList.do?category=
在这个页面申请云文本商务版。我申请的是免费试用版。免费试用版,每天只能调20次接口。


如下图,分别开通增强版json,json, 文本 这三个子类的服务
http://developer**.**/api/toApplyAuth.do?serviceTypeId=12


3.  下面看代码:
  1. <!DOCTYPE html>
  2. <html>

  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
  6.     <title>title</title>
  7.     <link rel="stylesheet" type="text/css" href="../css/api.css" />
  8.     <style>
  9.         body {}
  10.     </style>
  11. </head>

  12. <body>

  13. </body>
  14. <script type="text/javascript" src="../script/api.js"></script>
  15. <script type="text/javascript">
  16.     apiready = function() {
  17.         var recTable = api.require('hanvonCloudTableReader');
  18.         api.download({
  19.             url: "http://**.**1.z0.glb**.**/apicloud/88846664915e31233ac13114f62bc9ab.jpg",
  20.             savePath: 'fs://repic.jpg',
  21.             report: true,
  22.             cache: true,
  23.             allowResume: true
  24.         }, function(ret, err) {
  25.             if (ret) {
  26.                 console.log(ret.savePath);
  27.                 recTable.recognitionTable({
  28.                     androidkey: "086cdebc-736c-4a48-a7cc-112f732xxxx",
  29.                     ioskey: "cd043325-3c2d-4818-864d-19362e5bxxxx",
  30.                     uid: "192.168.13.101",
  31.                     type: "superjson",
  32.                     picpath: ret.savePath
  33.                 }, function(ret, err) {
  34.                     if (ret.status) {
  35.                         console.log(JSON.stringify(ret));
  36.                     } else {
  37.                         alert(JSON.stringify(err));
  38.                     }
  39.                 });
  40.             } else {
  41.                 alert(JSON.stringify(err));
  42.             }
  43.         });
  44.     };
  45. </script>

  46. </html>
复制代码






本帖子中包含更多资源,您需要 登录 才可以下载或查看,没有帐号?立即注册

X
4
帖子
0
勋章
2750
Y币
感谢分享  
177
帖子
0
勋章
1万+
Y币
感谢分享。
57
帖子
0
勋章
76
Y币
感谢分享。
95
帖子
0
勋章
128
Y币
        
keytool 错误: java.lang.Exception: 密钥库文件不存在: mystore.keystore
武汉怡享科技有限公司 发表于 2018-10-31 17:57
keytool 错误: java.lang.Exception: 密钥库文件不存在: mystore.keystore

为毛会这样
15
帖子
0
勋章
79
Y币
我的返回{"status":true,"result":"{\"code\":\"432\",\"result\":\"fingerprint illegal\"}"}
指纹是非法的什么意思?
1
帖子
0
勋章
1948
Y币
感谢分享。
157
帖子
0
勋章
502
Y币
为什么不能打开手机摄像头拍照后识别呢?
您需要登录后才可以回帖 登录

本版积分规则