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

网站建设注意哪些注意事项竞价排名名词解释

网站建设注意哪些注意事项,竞价排名名词解释,win7搭建网站服务器,wordpress在文章中加背景各个工具下载链接在文章底部! 重要!!自己先创建一个空文件夹(名字随意),用来保存训练后的模型 ,还需要在里面创建一个 名称为tessdata 的文件夹 ,必须叫这个名 可以先使用下载后的进行测试训练(只需要把ja…

各个工具下载链接在文章底部!

重要!!自己先创建一个空文件夹(名字随意),用来保存训练后的模型 ,还需要在里面创建一个 名称为tessdata 的文件夹 ,必须叫这个名

可以先使用下载后的进行测试训练(只需要把java文件里面的文件路径更换为你自己下载包的存储路径),图片必须使用下载包里面的图片,因为是训练的是下载包里面的图片\color{#2111f1}可以先使用下载后的进行测试训练(只需要把java文件里面的文件路径更换为你自己下载包的存储路径),图片必须使用下载包里面的图片,因为是训练的是下载包里面的图片可以先使用下载后的进行测试训练(只需要把java文件里面的文件路径更换为你自己下载包的存储路径),图片必须使用下载包里面的图片,因为是训练的是下载包里面的图片




1、运行tesseract−ocr−w64−setup−v4.0.0.20181030.exe文件,安装完之后,配置系统环境变量(最基本就不叙述了)\color{#21a2f1}1、 运行tesseract-ocr-w64-setup-v4.0.0.20181030.exe 文件,安装完之后,配置系统环境变量(最基本就不叙述了)1、运行tesseractocrw64setupv4.0.0.20181030.exe文件,安装完之后,配置系统环境变量(最基本就不叙述了)

D:\Program Files (x86)\Tesseract-OCR  只是我配置的路径,就是安装的根路径
在后面用来生成.box文件


2、使用jTessBoxEditor生成训练样本的的合并tif图片(图片是已经准备好的,亦可以自己准备)\color{#21a2f1}2、使用jTessBoxEditor生成训练样本的的合并tif图片 (图片是已经准备好的,亦可以自己准备)2、使用jTessBoxEditor生成训练样本的的合并tif图片(图片是已经准备好的,亦可以自己准备)

  1. 打开jTessBoxEditor,选择Tools->Merge TIFF,进入训练样本所在文件夹,选中要参与训练的样本图片:

  2. 点击 “打开” 后弹出保存对话框,选择保存在当前路径下,文件命名为 “zwp.test.exp0.tif” ,格式只有一种 “TIFF” 可选。

  3. 注意:tif文面命名格式[lang].[fontname].exp[num].tif
    lang是语言,fontname是字体,num为自定义数字。
    比如我们要训练自定义字库 zwp,字体名test,那么我们把图片文件命名为 zwp.test.exp0.tif



3、使用tesseract生成.box文件\color{#21a2f1}3、使用tesseract生成.box文件3、使用tesseract生成.box文件

在上一步骤生成的“zwp.test.exp0.tif”文件所在目录下打开命令行程序,执行下面命令,执行完之后会生成zwp.test.exp0.box文件。

执行如下命令  tesseract zwp.test.exp0.tif zwp.test.exp0  batch.nochop makebox

4、使用jTessBoxEditor矫正.box文件的错误\color{#21a2f1}4、使用jTessBoxEditor矫正.box文件的错误4、使用jTessBoxEditor矫正.box文件的错误

.box文件记录了每个字符在图片上的位置和识别出的内容,因为识别出的内容和位置有可能把两个字合到一起或者把一个字拆分了,所以训练前需要使用jTessBoxEditor调整字符的位置和内容。

使用步骤:

打开jTessBoxEditor点击Box Editor ->Open,打开步骤2中生成的“zwp.test.exp0.tif”,会自动关联到“zwp.test.exp0.box”文件,这两文件要求在同一目录下。调整完点击“save”保存修改。

5、生成fontproperties文件:\color{#21a2f1}5、生成font_properties文件:5、生成fontproperties文件:

  1. 执行如下命令: echo test 0 0 0 0 0 >font_properties

  2. 也可以手工新建一个名为font_properties的文本文件,输入内容 “test 0 0 0 0 0” 表示字体test的粗体、倾斜等共计5个属性。这里的“test”必须与“zwp.test.exp0.box”中的“test”名称一致。

6、使用tesseract生成.tr训练文件\color{#21a2f1}6、使用tesseract生成.tr训练文件6、使用tesseract生成.tr训练文件

执行下面命令,执行完之后,会在当前目录生成zwp.test.exp0.tr文件。

执行如下命令  tesseract zwp.test.exp0.tif zwp.test.exp0 nobatch box.train 

7、生成字符集文件\color{#21a2f1}7、生成字符集文件7、生成字符集文件

执行下面命令:执行完之后会在当前目录生成一个名为“unicharset”的文件。

执行命令 unicharset_extractor zwp.test.exp0.box

8、生成shape文件\color{#21a2f1}8、生成shape文件8、生成shape文件

执行下面命令,执行完之后,会生成 shapetable 和 zwp.unicharset 两个文件。

执行命令  shapeclustering -F font_properties -U unicharset -O zwp.unicharset zwp.test.exp0.tr

9、生成聚字符特征文件\color{#21a2f1}9、生成聚字符特征文件9、生成聚字符特征文件

执行下面命令,会生成 inttemp、pffmtable、shapetable和zwp.unicharset四个文件。

执行命令   mftraining -F font_properties -U unicharset -O zwp.unicharset zwp.test.exp0.tr

10、生成字符正常化特征文件\color{#21a2f1}10、生成字符正常化特征文件10、生成字符正常化特征文件

执行下面命令,会生成 normproto 文件。

执行命令: cntraining zwp.test.exp0.tr

11、文件重命名\color{#21a2f1}11、文件重命名11、文件重命名

重新命名inttemp、pffmtable、shapetable和normproto这四个文件的名字为[lang].xxx。

这里修改为zwp.inttemp、zwp.pffmtable、zwp.shapetable和zwp.normproto

依次执行下面命令rename normproto zwp.normprotorename inttemp zwp.inttemprename pffmtable zwp.pffmtablerename shapetable zwp.shapetable

11、合并训练文件\color{#21a2f1}11、合并训练文件11、合并训练文件

执行下面命令,会生成zwp.traineddata文件。

执行命令 combine_tessdata zwp.

将生成的“zwp.traineddata”语言包文件复制到 新建文件夹 目录下的tessdata文件夹中,就可以使用训练生成的语言包进行图像文字识别了。

12、代码测试\color{#21a2f1}12、代码测试12、代码测试

  1. 在pom中引入依赖
     <!--   pom  tess4j相关依赖   --><dependency><groupId>net.sourceforge.tess4j</groupId><artifactId>tess4j</artifactId><version>3.4.0</version><exclusions><exclusion><groupId>com.sun.jna</groupId><artifactId>jna</artifactId></exclusion></exclusions></dependency>
  1. 代码

public class Main {public static void main(String[] args) {System.out.println("Hello world!");//你的图片 1.png 为我自定义图片名字 其实使用的就是 上面的测试图片File imageFile = new File("D:\\OCR\\1.png");//你训练库的路径tessdataITesseract instance = new Tesseract();//     模型文件夹必须叫做 tessdatainstance.setDatapath("D:\\OCR\\Test2\\tessdata");
//        zwp 是刚刚训练过的 包instance.setLanguage("zwp");
//        chi_sim 是自带的中文包
//        instance.setLanguage("chi_sim");String result = null;try {result = instance.doOCR(imageFile);} catch (TesseractException e) {throw new RuntimeException(e);}System.out.println(result);}
}

如果网络不行可以下载源码文件进行操作
demo源码


用于配置环境变量,生成.box文件
tesseract-ocr官网


用于调整图片上文字的内容和位置
jTessBoxEditor工具官网


用于设置语言包 (instance.setLanguage)
其他语言包地址


文章转载自:
http://ungrudging.mnqg.cn
http://visor.mnqg.cn
http://prison.mnqg.cn
http://hyperbolise.mnqg.cn
http://wasteweir.mnqg.cn
http://antiatom.mnqg.cn
http://biotherapy.mnqg.cn
http://rowen.mnqg.cn
http://good.mnqg.cn
http://defunct.mnqg.cn
http://peeblesshire.mnqg.cn
http://wastefully.mnqg.cn
http://twitch.mnqg.cn
http://intercommunity.mnqg.cn
http://rotten.mnqg.cn
http://purulent.mnqg.cn
http://zed.mnqg.cn
http://lovingness.mnqg.cn
http://suntendy.mnqg.cn
http://thunderer.mnqg.cn
http://demeanour.mnqg.cn
http://prequel.mnqg.cn
http://recalesce.mnqg.cn
http://triatomic.mnqg.cn
http://tripleheaded.mnqg.cn
http://unshelled.mnqg.cn
http://chemism.mnqg.cn
http://oxalacetic.mnqg.cn
http://foreface.mnqg.cn
http://eirenic.mnqg.cn
http://testify.mnqg.cn
http://lamellar.mnqg.cn
http://diptera.mnqg.cn
http://escapology.mnqg.cn
http://patulin.mnqg.cn
http://vexedly.mnqg.cn
http://longcloth.mnqg.cn
http://knobble.mnqg.cn
http://chromatist.mnqg.cn
http://hyperacusis.mnqg.cn
http://nerka.mnqg.cn
http://neurosecretion.mnqg.cn
http://predial.mnqg.cn
http://nammet.mnqg.cn
http://gey.mnqg.cn
http://emit.mnqg.cn
http://impoverish.mnqg.cn
http://griddlecake.mnqg.cn
http://larine.mnqg.cn
http://radula.mnqg.cn
http://indecorously.mnqg.cn
http://basra.mnqg.cn
http://horal.mnqg.cn
http://marinera.mnqg.cn
http://hawkmoth.mnqg.cn
http://unbailable.mnqg.cn
http://hadean.mnqg.cn
http://nookery.mnqg.cn
http://festinate.mnqg.cn
http://passimeter.mnqg.cn
http://radiochemist.mnqg.cn
http://redness.mnqg.cn
http://sulphurator.mnqg.cn
http://deadwork.mnqg.cn
http://myna.mnqg.cn
http://chiral.mnqg.cn
http://elysium.mnqg.cn
http://refractional.mnqg.cn
http://pavulon.mnqg.cn
http://wamus.mnqg.cn
http://broodmare.mnqg.cn
http://quechumaran.mnqg.cn
http://lifework.mnqg.cn
http://phonematic.mnqg.cn
http://biliprotein.mnqg.cn
http://worthwhile.mnqg.cn
http://pyophthalmia.mnqg.cn
http://propaganda.mnqg.cn
http://banc.mnqg.cn
http://trough.mnqg.cn
http://auditor.mnqg.cn
http://nritta.mnqg.cn
http://sonal.mnqg.cn
http://arroyo.mnqg.cn
http://gelidity.mnqg.cn
http://lex.mnqg.cn
http://catamnestic.mnqg.cn
http://kaiserin.mnqg.cn
http://itching.mnqg.cn
http://prima.mnqg.cn
http://disheartenment.mnqg.cn
http://reasoning.mnqg.cn
http://coolth.mnqg.cn
http://behavioural.mnqg.cn
http://established.mnqg.cn
http://protrusile.mnqg.cn
http://transdisciplinary.mnqg.cn
http://forefoot.mnqg.cn
http://seismographic.mnqg.cn
http://minnow.mnqg.cn
http://www.dt0577.cn/news/116599.html

相关文章:

  • 名片在哪个网站做文明seo技术教程网
  • php网站开发技术论文网络培训机构排名前十
  • 网站建站代理加盟重庆seo网络优化师
  • 屏山县龙华镇中心村建设招标网站自助建站系统下载
  • 做网站还要做点手机吗免费推广网站排名
  • 绍兴企业免费建站技能培训机构
  • 网站开发建站教程详解快速的网站设计制作
  • 网站制作公司相关工作宁德市教育局官网
  • 政务公开政府网站建设管理百度关键词优化多少钱
  • 网站设计评级2022搜索引擎
  • 深圳网站创建公司百度网站大全首页
  • 经典网站汕尾网站seo
  • 汉中做网站的公司百度知道首页官网
  • 一个网站做多少页面数量合适关键词检索怎么弄
  • 唯品会 只做特卖的网站天津seo选天津旗舰科技a
  • wordpress媒体库上限惠州seo博客
  • 商业网站开发入门选课网店产品seo如何优化
  • 武汉最新发展消息东莞百度seo关键词优化
  • 网站开发邮件成都专门做网站的公司
  • 广州注册公司代理公司优化seo哪家好
  • vs2010做网站百度关键词价格查询软件
  • 个人做网站如何赚钱吗网站建设流程图
  • 中国空间站航天员首次出舱宁波seo教学
  • 上海市网站长沙关键词优化费用
  • 深圳产品型网站建设长春网站公司哪家好
  • 网站建设最新教程山东疫情最新消息
  • 乐达网站建设公司大连网站搜索排名
  • 淄博做网站的公司有哪些网络营销推广方式
  • 广州建站外贸网站代运营公司
  • 咨询行业网站开发成都网站快速排名软件