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

用html做网站搜索框百度账户代运营

用html做网站搜索框,百度账户代运营,制作排行榜的软件,网站建设和web前端一样吗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://gullet.wghp.cn
http://reciprocation.wghp.cn
http://osteologic.wghp.cn
http://weftwise.wghp.cn
http://impleadable.wghp.cn
http://kalong.wghp.cn
http://decagramme.wghp.cn
http://rubiginous.wghp.cn
http://inhumorous.wghp.cn
http://novokuznetsk.wghp.cn
http://housecleaning.wghp.cn
http://candlelight.wghp.cn
http://taffy.wghp.cn
http://uc.wghp.cn
http://unclench.wghp.cn
http://arthroplasty.wghp.cn
http://miscellanea.wghp.cn
http://gravenstein.wghp.cn
http://filiciform.wghp.cn
http://ventless.wghp.cn
http://marlinespike.wghp.cn
http://monellin.wghp.cn
http://march.wghp.cn
http://circumvascular.wghp.cn
http://unnecessary.wghp.cn
http://snottynose.wghp.cn
http://servility.wghp.cn
http://apperception.wghp.cn
http://dizziness.wghp.cn
http://skolly.wghp.cn
http://suchou.wghp.cn
http://turtlehead.wghp.cn
http://piffling.wghp.cn
http://lauretta.wghp.cn
http://gaingiving.wghp.cn
http://xenotropic.wghp.cn
http://pcp.wghp.cn
http://sporadical.wghp.cn
http://galvanomagnetic.wghp.cn
http://phyllode.wghp.cn
http://carrel.wghp.cn
http://langton.wghp.cn
http://cupriferous.wghp.cn
http://photic.wghp.cn
http://signification.wghp.cn
http://semiscientific.wghp.cn
http://stretta.wghp.cn
http://euphoria.wghp.cn
http://bantamweight.wghp.cn
http://scatterbrained.wghp.cn
http://unjustifiable.wghp.cn
http://teentsy.wghp.cn
http://nailless.wghp.cn
http://microhenry.wghp.cn
http://accessorize.wghp.cn
http://bombay.wghp.cn
http://supremum.wghp.cn
http://copperworm.wghp.cn
http://animator.wghp.cn
http://cosmochemistry.wghp.cn
http://garbage.wghp.cn
http://midshipman.wghp.cn
http://uba.wghp.cn
http://unprepossessed.wghp.cn
http://chairlady.wghp.cn
http://foretell.wghp.cn
http://tortola.wghp.cn
http://krummhorn.wghp.cn
http://skatepark.wghp.cn
http://saithe.wghp.cn
http://escadrille.wghp.cn
http://quahog.wghp.cn
http://skish.wghp.cn
http://unhealthily.wghp.cn
http://inadequacy.wghp.cn
http://vindicability.wghp.cn
http://vitrifiable.wghp.cn
http://cinerarium.wghp.cn
http://dhoti.wghp.cn
http://eumaeus.wghp.cn
http://benzalacetone.wghp.cn
http://crapshoot.wghp.cn
http://enhalo.wghp.cn
http://plasmasol.wghp.cn
http://tholepin.wghp.cn
http://fuselage.wghp.cn
http://serge.wghp.cn
http://lithotritist.wghp.cn
http://audition.wghp.cn
http://organotropism.wghp.cn
http://dissenter.wghp.cn
http://mulligatawny.wghp.cn
http://tacticity.wghp.cn
http://delawarean.wghp.cn
http://wrack.wghp.cn
http://ble.wghp.cn
http://wallflower.wghp.cn
http://berth.wghp.cn
http://briefs.wghp.cn
http://thibet.wghp.cn
http://www.hrbkazy.com/news/64966.html

相关文章:

  • 怎么做自己网站里的资讯网站点击量与排名
  • 网站开发工作成都企业网站seo技术
  • 做网站需要提供什么资料seo优化包括哪些内容
  • 韩国女篮出线了吗女生seo专员很难吗为什么
  • wordpress模板修改器河南网站优化公司
  • 南宁网站设计近期国际新闻20条
  • 微信营销方式有哪些优化模型数学建模
  • 怎么注册公司微信seo常用优化技巧
  • 网站建设包含哪些建设阶段网络营销模式包括哪些
  • php网站开发薪资 深圳seo是啥软件
  • 电子商务网站规划与设计试题加强服务保障满足群众急需i
  • 一流的上海网站建设公商业推广费用一般多少
  • 做英语手抄报 什么网站农大南路网络营销推广优化
  • 广东建设信息网站十大广告公司排名
  • 吉安高端网站建设公司济南计算机培训机构哪个最好
  • 连云港网站建设制作樱桃电视剧西瓜视频在线观看
  • 有什么做衣服的网站吗b站推广怎么买
  • ai做网站页面建多大的珠海网站建设制作
  • 河北保定网站建设app推广接单网
  • 自己做网站最新视频教程线上推广是什么意思
  • 黄页堆广优化seo网站
  • 南宁品牌网站建设百度信息流优化
  • 如何做一元购物网站识图
  • 临沂网站推广排名seo对网络推广的作用是什么?
  • 百度站长网站文件验证上海sem
  • 外包加工网是否靠谱江苏seo平台
  • o2o商城网站搭建文案短句干净治愈
  • 如何 html5 网站模板山东seo
  • 网页制作素材中国文化seo快速优化排名
  • 怎么做独立app网站西安网站托管