安装
github地址:https://github.com/tesseract-ocr/tesseract
由于测试是在win7环境下进行,我们选用Mannheim University包装过的版本
github地址:https://github.com/UB-Mannheim/tesseract/wiki
默认语言只支持英语,由于我们识别的是中文,我们需要下载中文模型包
github地址:https://github.com/tesseract-ocr/tessdata
找到并下载chi_sim.traineddata
运行
例如,要识别的图片为d:/test.png
打开命令行,切换到tesseract-ocr根目录,运行
tesseract d:/test.png test -l chi_sim+eng
生成的test.txt即为识别结果
测试
测试1:手机拍摄带角度图片
测试2:手机拍摄带阴影图片