Warning: No shape table file present: shapetable

来源:互联网 发布:jdk1.7 windows 64 编辑:程序博客网 时间:2024/05/01 02:25

在用tesseract训练语言的中途

mftrainingd -F font_properties.txt -U unicharset ABC.Roman.exp0.tr

cmd报错:

Warning: No shape table file present: shapetable
Failed to load font_properties from font_properties

解决:

6.定义字体特征文件。Tesseract-OCR3.01以上的版本在训练之前需要创建一个名称为font_properties的字体特征文件。
font_properties不含有BOM头,文件内容格式如下:
<fontname> <italic> <bold> <fixed> <serif> <fraktur>
其中fontname为字体名称,必须与[lang].[fontname].exp[num].box中的名称保持一致。<italic> 、<bold> 、<fixed> 、<serif>、 <fraktur>的取值为1或0,表示字体是否具有这些属性。
这里在样本图片所在目录下创建一个名称为font_properties的文件,用记事本打开,输入以下下内容:
Roman 0 0 0 0 0
这里全取值为0,表示字体不是粗体、斜体等等。

参考:

http://www.84kf.com/html/22453.html

http://blog.csdn.net/fengbingchun/article/details/7022421

http://code.google.com/p/tesseract-ocr/issues/detail?id=465

原创粉丝点击