tesseract num.font.exp0.tif num.font.exp0 batch.nochop makeboxhtml
【语法】:tesseract [lang].[fontname].exp[num].tif [lang].[fontname].exp[num] batch.nochop makebox 【语法】:lang为语言名称,fontname为字体名称,num为序号;在tesseract中,必定要注意格式
在文件夹文件夹内,新建一个文本文件,名为font_properties,删掉.txt,用记事本打开,写入内容为:java
font 0 0 0 0 0oracle
【语法】:<fontname> <italic> <bold> <fixed> <serif> <fraktur> 【语法】:fontname为字体名称,italic为斜体,bold为黑体字, fixed为默认字体,serif为衬线字体,fraktur德文黑字体, 1和0表明有和无,精细区分时可以使用
echo Run Tesseract for Training.. tesseract.exe num.font.exp0.tif num.font.exp0 nobatch box.train echo Compute the Character Set.. unicharset_extractor.exe num.font.exp0.box mftraining -F font_properties -U unicharset -O num.unicharset num.font.exp0.tr echo Clustering.. cntraining.exe num.font.exp0.tr echo Rename Files.. rename normproto num.normproto rename inttemp num.inttemp rename pffmtable num.pffmtable rename shapetable num.shapetable echo Create Tessdata.. combine_tessdata.exe num. echo. & pause
tesseract num1.jpg num01 -l num工具
运行结果:
学习
咱们能够看到新生成的文件 num01 的内容为 762408,内容彻底正确。细心的人会发现,最后一句指令,咱们使用了指令[-l num]而不是[-l eng]。这说明,最后一次转换咱们使用的是新生成的num语言的匹配库而不是默认的 eng 语言匹配库测试
本篇完善了不少细节,初学者也能够看懂,奉上 原文连接,拜拜字体