安装相关软件
brew cask install xquartz
brew install --with-training-tools tesseract
使用jTessBoxEditor制作样本及标记纠正,传说中的AI体力活
合并素材并命名 $lang.$fontname.exp$num.tif
set T_LANG = "num";
tesseract num.font.exp0.tif -l eng num.font.exp0 batch.nochop makebox
tesseract num.font.exp0.tif num.font.exp0 nobatch box.train
echo 'normal 0 0 0 0 0' > font_properties
unicharset_extractor num.font.exp0.box
shapeclustering -F font_properties -U unicharset num.font.exp0.tr
mftraining -F font_properties -U unicharset -O num.unicharset num.font.exp0.tr
cntraining num.font.exp0.tr
mv normproto num.normproto
mv inttemp num.inttemp
mv pffmtable num.pffmtable
mv shapetable num.shapetable
combine_tessdata num.
#cp num.traineddata /path_to_your_tesseract_share_dir
cp ./num.traineddata /usr/local/Cellar/tesseract/3.05.02/share/tessdata/num.traineddata
#test
tesseract 1530846034.578825.png result -l num
cat result.txt