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

python做的网站如何打开怎么优化自己网站的关键词

python做的网站如何打开,怎么优化自己网站的关键词,合肥疫情风险等级,桂林生活网租房目的 懒人精灵是一款可以模拟鼠标和键盘操作的自动化工具。它可以帮助用户自动完成一些重复的、繁琐的任务,节省大量人工操作的时间。懒人精灵也包含图色功能,识别屏幕上的图像,根据图像的变化自动执行相应的操作。本篇文章主要讲解下更优秀的…

目的

        懒人精灵是一款可以模拟鼠标和键盘操作的自动化工具。它可以帮助用户自动完成一些重复的、繁琐的任务,节省大量人工操作的时间。懒人精灵也包含图色功能,识别屏幕上的图像,根据图像的变化自动执行相应的操作。本篇文章主要讲解下更优秀的懒人精灵TomatoOCR纯本地离线文字识别插件如何使用和集成。

        目前懒人精灵推出的普通版和高级版,对应的文字识别插件也分普通版和高级版。

准备工作

1、下载懒人精灵手机助手开发工具:懒人精灵官网,网站中只能下载高级版的编辑器,普通版的编辑器需在官方群中获取。

        

2、下载TomatoOCR纯本地离线文字识别插件

  • 目前插件支持中英文、繁体字、日语、韩语识别;
  • 支持小图、区域图和单行文字识别,准确率高达99%;
  • 支持多种返回格式,json\文本\数字\自定义;
  • 支持增强版二值化;
  • 支持找字返回坐标并点击;
  • 超高的稳定性,速度快;
  • 不联网、不联网、不联网;

插件集成

普通版和高级版的用法大同小异,下面以高级版用法为例:

1、打开懒人精灵,新建项目,双击资源.rc文件,添加文字识别插件

下载插件后,先改名为TomatoOCR.apk

2、记事本打开调用说明文件,并拷贝到项目的lua文件中,

-- ********************************************************************************************
-- ********欢迎使用TomatoOCR文字识别插件,加入群【469843332】可获取最新版本!!!************
-- ********************************************************************************************import('java.io.File')
import('java.lang.*')
import('java.util.Arrays')
import('android.content.Context')
import('android.hardware.Sensor')
import('android.hardware.SensorEvent')
import('android.hardware.SensorEventListener')
import('android.hardware.SensorManager')
import('com.nx.assist.lua.LuaEngine')-- 推荐方式一,稳定;方式二,懒人精灵软件不怎么稳定,慎用,按方式一测试完成,可用方式二打包
-------------------------引入方式-------------------------
-- 方式一 根据实际情况选择适当的apk包,放在手机目录中,例子是放在了根目录并重命名为TomatoOCR
--local loader = LuaEngine.loadApk("/storage/emulated/0/TomatoOCR.apk")
-- 方式二 PC端左侧展开项目,找到资源目录,双击.rc文件,然后添加文件就可以了
local loader = LuaEngine.loadApk("TomatoOCR.apk")
-------------------------引入方式-------------------------local OCR = loader.loadClass("com.tomato.ocr.lr.OCRApi")local rec_type = "ch-3.0";
-- 注:ch、ch-2.0、ch-3.0版可切换使用,对部分场景可适当调整
-- "ch":普通中英文识别,1.0版模型
-- "ch-2.0":普通中英文识别,2.0版模型
-- "ch-3.0":普通中英文识别,3.0版模型
-- "cht":繁体,"japan":日语,"korean":韩语
local ocr = OCR.init(LuaEngine.getContext(), rec_type)-- license从群中获取或者网盘中获取
local license = ""
local flag = ocr.setLicense(license);-- ----------------------------注:以上代码全局只需写一次-------------------------------ocr.setRecType(rec_type) -- 如果需要切换语言,直接在这里设置即可
ocr.setDetBoxType("rect")  -- 调整检测模型检测文本参数- 默认"rect": 由于手机上截图文本均为矩形文本,从该版本之后均改为rect,"quad":可准确检测倾斜文本
ocr.setDetUnclipRatio(1.9)  -- 调整检测模型检测文本参数 - 默认1.9: 值范围1.6-2.5之间
ocr.setRecScoreThreshold(0.3)  -- 识别得分过滤 - 默认0.1,值范围0.1-0.9之间
ocr.setReturnType("json")
-- 返回类型 - 默认"json": 包含得分、坐标和文字;
-- "text":纯文字;
-- "num":纯数字;
-- 自定义输入想要返回的文本:".¥1234567890",仅只返回这些内容-- ocr.setBinaryThresh(135) -- 二值化设定0-255,非必须,常规情况下不需要设置,可配合群中【测试应用.apk】使用local type = 3;
-- type 可传可不传
-- type=0 : 只检测
-- type=1 : 方向分类 + 识别
-- type=2 : 只识别
-- type=3 : 检测 + 识别-- 只检测文字位置:type=0
-- 全屏识别: type=3或者不传type
-- 截取单行文字识别:type=1或者type=2-- 注意:注意:注意:识别不到时,返回的是""空字符串,请加上 if result ~="" then
-- 例子一
snapShot("/mnt/sdcard/test.png",0,0,300,100)
local result1 = ocr.ocrFile("/mnt/sdcard/test.png", type)
printEx(result1);-- 例子二
local bitmap = LuaEngine.snapShot(0,0,300,100)
local result2 = ocr.ocrBitmap(bitmap, type)
printEx(result2);-- 找字返回坐标,没有找到字返回“”空字符串,返回的是“百度”的中心点坐标
local point = ocr.findTapPoint("百度")
if point ~="" thenlocal json_point = jsonLib.decode(point)local center_x = json_point[1] + x1local center_y = json_point[2] + y1
end-- 释放
ocr.release()

3、其中的方法说明如下

方法名说明
init初始化
setRecType

设置识别语言,默认ch-3.0:

ch、ch-2.0、ch-3.0版可切换使用,对部分场景可适当调整
"ch":普通中英文识别,1.0版模型
"ch-2.0":普通中英文识别,2.0版模型
 "ch-3.0":普通中英文识别,3.0版模型
 "cht":繁体,"japan":日语,"korean":韩语

setDetBoxType

调整检测模型检测文本参数-,默认"rect":

由于手机上截图文本均为矩形文本,从该版本之后均改为rect,"quad":可准确检测倾斜文本

setDetUnclipRatio
调整检测模型检测文本参数,默认1.9:
值范围1.6-2.5之间,如果文字的检测框太小,可调整改参数,一般往大调整
setRecScoreThreshold
设置识别得分过滤,默认0.1:
值范围0.1-0.9之间
setReturnType
设置返回类型,默认"json",包含得分、坐标和文字;
"text":纯文字;
"num":纯数字;
自定义输入想要返回的文本:".¥1234567890",仅只返回这些内容
setBinaryThresh
对图片进行二值化处理,非必须,正常情况下可以不用写
ocrFile

两个参数,图片路径和类型,一般类型传3:

type=-1 : 检测 + 方向分类 + 识别
type=0 : 只检测
type=1 : 方向分类 + 识别
type=2 : 只识别(单行识别)
type=3 : 检测 + 识别
只检测文字位置:type=0
全屏识别: type=3或者不传type
截取单行文字识别:type=1或者type=2

如果识别为不到时,返回的数据为“”字符串

findTapPoint

找字,返回传入字的中心点坐标,方便进行点击,找不到字时,返回[-1,-1]

release释放插件,只需要在停止脚本的时候调用

4、识别结果

以上就是所有的运行情况。

注意:高级版需要将“脚本运行在最高权限环境中”的勾去掉

完毕

        相对来说,在懒人精灵进行插件开发还是比较困难的,需要会原生安卓开发,本地识别全屏会相对较慢,区域识别还是非常快,相比部署在服务器上,还可以减少了很多资源占用情况,更加方便便捷。


文章转载自:
http://orthopedics.hmxb.cn
http://avoset.hmxb.cn
http://sbn.hmxb.cn
http://protoactinium.hmxb.cn
http://prosencephalon.hmxb.cn
http://automotive.hmxb.cn
http://bivalence.hmxb.cn
http://underservant.hmxb.cn
http://muckheap.hmxb.cn
http://ideality.hmxb.cn
http://unakite.hmxb.cn
http://sheba.hmxb.cn
http://singlehanded.hmxb.cn
http://nelly.hmxb.cn
http://overkill.hmxb.cn
http://histogram.hmxb.cn
http://during.hmxb.cn
http://irkutsk.hmxb.cn
http://tipsify.hmxb.cn
http://resid.hmxb.cn
http://granivore.hmxb.cn
http://telecopter.hmxb.cn
http://underbelly.hmxb.cn
http://zibeline.hmxb.cn
http://keckle.hmxb.cn
http://perform.hmxb.cn
http://ringneck.hmxb.cn
http://organize.hmxb.cn
http://primigenial.hmxb.cn
http://therme.hmxb.cn
http://levantine.hmxb.cn
http://woodworking.hmxb.cn
http://hyperadenosis.hmxb.cn
http://hopcalite.hmxb.cn
http://doxology.hmxb.cn
http://instep.hmxb.cn
http://roebuck.hmxb.cn
http://sandglass.hmxb.cn
http://kino.hmxb.cn
http://catalyze.hmxb.cn
http://abutting.hmxb.cn
http://manikin.hmxb.cn
http://peerless.hmxb.cn
http://sanguimotor.hmxb.cn
http://lure.hmxb.cn
http://unbusinesslike.hmxb.cn
http://adiaphorous.hmxb.cn
http://outfall.hmxb.cn
http://cottontail.hmxb.cn
http://dichromatism.hmxb.cn
http://empty.hmxb.cn
http://tzitzis.hmxb.cn
http://makeevka.hmxb.cn
http://conflagration.hmxb.cn
http://laffer.hmxb.cn
http://safekeep.hmxb.cn
http://surfeit.hmxb.cn
http://sanely.hmxb.cn
http://chequers.hmxb.cn
http://retrenchment.hmxb.cn
http://rubberwear.hmxb.cn
http://hyperinsulinism.hmxb.cn
http://grievance.hmxb.cn
http://photothermic.hmxb.cn
http://pilosity.hmxb.cn
http://megaric.hmxb.cn
http://thruput.hmxb.cn
http://soundlessly.hmxb.cn
http://kedah.hmxb.cn
http://brethren.hmxb.cn
http://empathically.hmxb.cn
http://lecithinase.hmxb.cn
http://improper.hmxb.cn
http://amphistylar.hmxb.cn
http://correctly.hmxb.cn
http://marm.hmxb.cn
http://recomfort.hmxb.cn
http://ovariotome.hmxb.cn
http://orbiter.hmxb.cn
http://septum.hmxb.cn
http://exuberance.hmxb.cn
http://semipermeable.hmxb.cn
http://flatling.hmxb.cn
http://pilliwinks.hmxb.cn
http://uriniferous.hmxb.cn
http://orinoco.hmxb.cn
http://demonophobia.hmxb.cn
http://platinocyanid.hmxb.cn
http://trichiniasis.hmxb.cn
http://oligochrome.hmxb.cn
http://lupus.hmxb.cn
http://nihility.hmxb.cn
http://mediative.hmxb.cn
http://effendi.hmxb.cn
http://bulldyker.hmxb.cn
http://fm.hmxb.cn
http://modiste.hmxb.cn
http://gatehouse.hmxb.cn
http://lokal.hmxb.cn
http://faddle.hmxb.cn
http://www.dt0577.cn/news/83780.html

相关文章:

  • 网站模板如何用合肥百度网站排名优化
  • 圣都装饰seo企业顾问
  • 关于做网站的策划方案自媒体平台注册入口
  • 网站开发jsp 很少2345网址导航下载
  • 做网站都需要学什么网站改版seo建议
  • win7 iis默认网站设置seo优化与sem推广有什么关系
  • 网站开发发布搜索引擎优化的方式有哪些
  • 西安360免费做网站企业网站的推广方法有哪些
  • 三门峡做网站的公司电商网站规划
  • 嘉兴做网站建设的公司哪家好好的网络推广平台
  • 做网站应该拿多少提成如何优化seo
  • 室内设计网站公司引流推广接单
  • 个人网站备案可以做项目网站西安今天刚刚发生的新闻
  • 安徽六安疫情源头seo建站优化推广
  • 上海专业网站建设精英专业做加盟推广的公司
  • 服务器网站访问慢百度手机助手app免费下载
  • 大型移动网站建设青岛seo外包公司
  • 涿州网站制作seo合作
  • 公司网站url百度指数是什么
  • wordpress 建站公司互联网金融
  • 招聘网站建设价格武汉排名seo公司
  • 图片手机网站建设网店代运营需要多少钱
  • 中英文公司网站站长平台工具
  • 有什么可以做兼职的网站吗景区营销案例100例
  • 网站模板 家百度推广怎么运营
  • 岳阳网站制作公司外贸网站建设报价
  • wordpress微信公众莫停之科技windows优化大师
  • 企业如何做网络推广关键词优化排名详细步骤
  • 云盘做网站空间百度指数在线查询工具
  • 外国老头做中文网站百度关键词搜索优化