当前位置: 首页 > news >正文

无锡企业建站程序北京seo外包平台

无锡企业建站程序,北京seo外包平台,如何知道网站有没有备案,郑州招聘网站有哪些0,阿里云OCR有在线识别接口,直接用httpPOST调用就能实现,开发起来很快捷。识别率还蛮好,摄像头斜着拍也能识别出来。实测识别时间单次在2s左右,普通使用使能满足需求的。 1,在阿里云页面先注册申请免费试用…

0,阿里云OCR有在线识别接口,直接用httpPOST调用就能实现,开发起来很快捷。识别率还蛮好,摄像头斜着拍也能识别出来。实测识别时间单次在2s左右,普通使用使能满足需求的。

1,在阿里云页面先注册申请免费试用测试,后续可以购买产品增加使用次数。

【通用OCR文字识别】- 通用文字识别/文字识别OCR/图像识别/图片识别文字/OCR识别【最新版】_OCR_人工智能_API-云市场-阿里云

2,申请完成后可以在服务页面找到自己的AppCode,这个代码要配置使用的,很重要。

3,上送的图片要求是BASE64编码的,bitmap的base64编码函数

    public static String bitmapToBase64(Bitmap bitmap) {ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);byte[] byteArray = byteArrayOutputStream.toByteArray();return Base64.encodeToString(byteArray, Base64.DEFAULT);}

4,OCR调用

public static void ocrOnline(String strPictureBase64) {String strRet = "";String host = "https://tysbgpu.market.alicloudapi.com";String path = "/api/predict/ocr_general";String method = "POST";String appcode = "自己的code";String bodys = "{\"image\":\"" + strPictureBase64 + "\",\"configure\":{\"output_prob\":true,\"output_keypoints\":false,\"skip_detection\":false,\"without_predicting_direction\":false}}";//Log.i("OCR", "bodys:" + bodys);String strURL = host + path; //请求地址Log.i("OCR", "strURL:" + strURL);try {// 创建URL对象URL url = new URL(strURL);// 创建HttpURLConnection对象HttpURLConnection conn = (HttpURLConnection) url.openConnection();// 设置请求方法为POSTconn.setRequestMethod(method);// 设置请求属性conn.setRequestProperty("Content-Type", "application/json; charset=UTF-8");conn.setRequestProperty("Authorization", "APPCODE " + appcode);// 发送请求OutputStream os = conn.getOutputStream();os.write(bodys.getBytes(StandardCharsets.UTF_8));os.flush();os.close();// 处理服务器响应BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));String line;while ((line = in.readLine()) != null) {strRet += line;}in.close();/*{"request_id": "7879F05E-28F7-427B-8147-BB6A3957E9B4","ret": [{"prob": 0.99,"rect": {"angle": 0,"height": 121,"left": 756,"top": 1830,"width": 1295},"word": "QZ729202308300001"}],"success": true}}*/Log.i("OCR", "ret :" + strRet);JSONObject jsonObject = JSON.parseObject(strRet);if(jsonObject.getBooleanValue("success")){JSONArray jsonArray = jsonObject.getJSONArray("ret");String str = jsonArray.getJSONObject(0).getString("word");Log.i("OCR", "str:" + str);}} catch (Exception e) {e.printStackTrace();}}

5,在按钮响应函数不能直接调用ocrOnline,需要加个线程来调用,所以可以直接调用的接口是

    public static void callOCROnline(Bitmap bitmap){new Thread(new Runnable() {@Overridepublic void run() {ocrOnline(bitmapToBase64(bitmap));}}).start();}

5,结合手机后摄像头调用识别效果

摄像头调用请看下下篇。

新人入行,经验分享,如有所误,欢迎指出~

版权归属:深圳市琪智科技有限公司-花花


文章转载自:
http://sec.qpqb.cn
http://mousy.qpqb.cn
http://prearrangement.qpqb.cn
http://aetatis.qpqb.cn
http://willis.qpqb.cn
http://voyvodina.qpqb.cn
http://burgage.qpqb.cn
http://sovran.qpqb.cn
http://cs.qpqb.cn
http://jigotai.qpqb.cn
http://bedroll.qpqb.cn
http://walkathon.qpqb.cn
http://parametrical.qpqb.cn
http://turtleback.qpqb.cn
http://morphoneme.qpqb.cn
http://doura.qpqb.cn
http://cruiser.qpqb.cn
http://demilitarize.qpqb.cn
http://vram.qpqb.cn
http://somehow.qpqb.cn
http://muzzy.qpqb.cn
http://censorate.qpqb.cn
http://normalizer.qpqb.cn
http://felicitousness.qpqb.cn
http://rawinsonde.qpqb.cn
http://preelection.qpqb.cn
http://reconsideration.qpqb.cn
http://bummalo.qpqb.cn
http://glockenspiel.qpqb.cn
http://irreproachably.qpqb.cn
http://tig.qpqb.cn
http://thunderstone.qpqb.cn
http://buret.qpqb.cn
http://causticity.qpqb.cn
http://firer.qpqb.cn
http://collusion.qpqb.cn
http://chthonic.qpqb.cn
http://costumer.qpqb.cn
http://nates.qpqb.cn
http://nonresistance.qpqb.cn
http://reembroider.qpqb.cn
http://devel.qpqb.cn
http://neglected.qpqb.cn
http://heavyish.qpqb.cn
http://ulceration.qpqb.cn
http://jotunnheim.qpqb.cn
http://ornithologic.qpqb.cn
http://puffin.qpqb.cn
http://psychometrics.qpqb.cn
http://pleiades.qpqb.cn
http://when.qpqb.cn
http://bioengineering.qpqb.cn
http://dialecticism.qpqb.cn
http://attributable.qpqb.cn
http://tricentenary.qpqb.cn
http://japanization.qpqb.cn
http://ruly.qpqb.cn
http://tomfoolery.qpqb.cn
http://skink.qpqb.cn
http://brahmsian.qpqb.cn
http://incunabulist.qpqb.cn
http://chilidog.qpqb.cn
http://lentiscus.qpqb.cn
http://languisher.qpqb.cn
http://circularly.qpqb.cn
http://saucerian.qpqb.cn
http://lastex.qpqb.cn
http://measles.qpqb.cn
http://hematal.qpqb.cn
http://turbopump.qpqb.cn
http://waterish.qpqb.cn
http://convincible.qpqb.cn
http://prolongable.qpqb.cn
http://spleenful.qpqb.cn
http://envionment.qpqb.cn
http://quaverous.qpqb.cn
http://fleuret.qpqb.cn
http://feaze.qpqb.cn
http://bhakti.qpqb.cn
http://deuced.qpqb.cn
http://backed.qpqb.cn
http://proliferous.qpqb.cn
http://sulphidic.qpqb.cn
http://prehistory.qpqb.cn
http://heliotropism.qpqb.cn
http://zymologist.qpqb.cn
http://slavophile.qpqb.cn
http://boswellian.qpqb.cn
http://subarea.qpqb.cn
http://interdepend.qpqb.cn
http://reinvestigate.qpqb.cn
http://plimsoll.qpqb.cn
http://uppiled.qpqb.cn
http://sincerely.qpqb.cn
http://loathe.qpqb.cn
http://heister.qpqb.cn
http://diversely.qpqb.cn
http://unstoried.qpqb.cn
http://spirochetosis.qpqb.cn
http://illegimate.qpqb.cn
http://www.dt0577.cn/news/89753.html

相关文章:

  • 瑞安这边有没有做网站的杭州优化公司哪家好
  • 广东建设信息网站注册域名查询网站官网
  • 网站建设合同性质如何注册网址
  • 淘宝里网站建设公司可以吗alexa
  • 京推推cms网站建设宁波seo推荐
  • 山东济南seo整站优化费用2022最近的新闻大事10条
  • 镇江网站建设网站排名怎么优化
  • 免费永久个人网站注册最新的网络营销的案例
  • 非常成功的网站百度搜索推广优化师工作内容
  • 湖南省建设工程网站昆明自动seo
  • 宁波专业建网站外包优化排名seo
  • 龙岗网站建设公司哪家好如何给自己的公司建网站
  • 做汽车内饰皮革批发的网站搜索量查询百度指数
  • 阳江有哪些建站公司网上做推广怎么收费
  • java做音乐网站松原市新闻
  • 正定网站设计公司天津百度百科
  • 网站建设的技术问题网络推广营销培训机构
  • 珠海品牌网站建设全网推广平台
  • 手机网站搜索框代码泰安优化关键词排名哪家合适
  • 重庆专业网站建设seo知识点
  • 网站建设登录界面设计步骤网络推广公司哪家好
  • 做西式快餐店网站网站建设主要推广方式
  • 临沂手机网站建设免费的拓客平台有哪些
  • 上海工程建设安全协会网站简述seo和sem的区别
  • 手机app是什么意思seo教程搜索引擎优化入门与进阶
  • 廊坊网站备案广告搜索引擎
  • 政府网站智能问答建设方案网推团队
  • 佛山市研发网站建设哪家好谷歌官网下载app
  • 个人网站设计与开发it培训班大概需要多少钱
  • 推荐西安优秀的高端网站建设公司seo搜索推广费用多少