Tesseract-OCR训练笔记

0. 小弟训练笔记步骤在Tesseract-OCR.3.01测试成功,3.02测试失败。如果高手在3.02测试成功希望能否分享点经验。谢谢!另外建议用于训练的图片命名格式规则如test.*.jpg或tif..
1. Tesseract-OCR.3.01下载解压即可。建议放在非C盘,因为在windows7对C盘的写权限有要求。
a) 下载地址http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01-win32-portable.zip
2. jTessBoxEditor下载解压即可。这个工具用java开发,运行需要安装JRE。用来修改box文件,以便校对识别文字。
a) 下载地址http://sourceforge.net/projects/vietocr/files/jTessBoxEditor/
3. 制作Box文件,命令模式进入Tesseract-OCR.3.01目录执行,产生test.2.box,test.3.box。box文件与图片目录一致。
a) tesseract.exe test.2.jpg test.2 batch.nochop makebox
b) tesseract.exe test.3.jpg test.3 batch.nochop makebox
c) …
4. 运行jTessBoxEditor
a) 开启test.2.jpg校对识别文字,保存,自动保存到test.2.box。
b) 开启test.3.jpg校对识别文字,保存,自动保存到test.3.box。
5. 生成初始训练文件产生test.2.tr&test.2.txt , test.3.tr,test.3.txt
a) tesseract.exe test.2.jpg test.2 nobatch box.train
b) tesseract.exe test.3.jpg test.3 nobatch box.train
6. 执行unicharset_extractor.exe产生unicharset文件
a) unicharset_extractor.exe test.2.box test.3.box
7. 创建font_properties,并且输入以下文本代表使用普通字体
a) test.2 0 0 0 0 0
b) test.3 0 0 0 0 0
8. 执行mftraining.exe产生inttemp,mfunicharset,Microfeat,pffmtable
a) mftraining.exe -F font_properties -U unicharset test.2.tr test.3.tr
9. 执行cntraining.exe产生normproto
a) cntraining.exe test.2.tr test.3.tr
10. 文件改名
a) unicharset改名为test. unicharset
b) inttemp改名为test.inttemp
c) normproto改名为test. normproto
d) pffmtable改名为test. pffmtable
11. 生成最终训练文件test.traineddata
a) combine_tessdata.exe test.
12. 复制test.traineddata到tessdata下重新执行tesseract.exe test.2.jpg ocr_result -l test这时会将ocr结果产生在ocr_result.txt里。

 

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值