我已经在python和pytesseract(来自Pypi)中使用了tesseract 3.04,现在我想使用基于4.00.00alpha的新LSTM
我使用的是kali linux,所以我安装了libtesserct4(使用apt-get),它在tesseract-ocr中创建了名为4.00的文件夹,但当我尝试将它与pytesseract一起使用时,它无法识别--eom input
代码是:
pytesseract.image_to_string(Image.open(filename),lang="en",config='--eom 2')结果:
read_params_file: Can't open 1当我使用tesseract -h命令时,oem输入也不会出现。
它不识别文件夹tesseract-ocr/4.00/tessdata中的训练数据文件它只识别文件夹tesseract-ocr/tessdata中的训练数据
如果pytesseract有任何问题,您能告诉我如何为tesseract 4设置python包装器吗?
谢谢
发布于 2018-03-13 02:06:16
我建议使用tesserocr。它支持Tesseract 4,是C++应用程序接口的真正包装器,而pytesseract只调用tesseract CLI。培训是一个完全不同的故事,你应该遵循开发人员提供的指南。
发布于 2018-03-27 02:24:53
你可以在下面试试。它适用于带有Python 3.6的Tesseract 4.0.0a。
ocr = pytesseract.image_to_string(Image.open(filename), lang="eng",\
boxes=False, config="--psm 3 --oem 2")--psm 3是默认的页面分割模式。
希望这能有所帮助。
https://stackoverflow.com/questions/47977703
复制相似问题