tesseract-ocr-setup-3.02.02
在Windows平台下调用“tesseract.exe”测试:
1)在google中下载tesseract-ocr-setup-3.01.exe和chi_sim.traineddata.gz中文字库。
2)安装完毕,将中文字库放入安装目录的tessdata中。
3)在命令行中操作,进入安装目录,在该目录中事先放入要测试的图片,比如:6.tif;
执行识别图像的命令格式为:
tesseract .exe [-l lang]
Imagename: 需要识别的图片文件名
outputname: 输出结果txt文件名,用来存放识别出来的文字结果
lang: 使用的文字字库,根据要识别的文字类型来选择。
例如:输入命令:tesseract.exe 6.tif 6 –l chi_sim
汉字图片识别方法:tesseract.exe 4.bmp out4 -l chi_sim -psm 7
英文数字图片识别方法: tesseract.exe 4.bmp out4 -l eng -psm 7