【问题标题】:Python recognize digits in simple image with pytesseractPython 使用 pytesseract 识别简单图像中的数字
【发布时间】:2019-12-23 16:10:24
【问题描述】:

我正在尝试使用 pytesseract 从图像中识别数字,如下所示:

我尝试了以下代码

text=pytesseract.image_to_string(img, lang='eng',
                config='--psm 13 --oem 3 -c tessedit_char_whitelist=0123456789')
print(text)

它给了我

"ae"

我试过 oem=1 还是一样。

供您参考,我的版本如下:

pytesseract.get_tesseract_version()

LooseVersion ('4.0.0-beta.1')

任何帮助都将不胜感激,包括替代库。

【问题讨论】:

    标签: python ocr tesseract python-tesseract


    【解决方案1】:

    这是一个已知问题 - Blacklist and whitelist unsupported with LSTM (4.0)

    基本上白名单和黑名单都不行

    一条评论状态

    ghost 于 2018 年 7 月 20 日发表评论

    使用 --oem 0 或 -oem 0 就可以了

    我无法测试这台 ATM,但值得一试

    4.1版本应该已经修复了

    【讨论】:

      猜你喜欢
      • 2021-11-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-05-18
      • 2020-01-21
      • 2016-10-11
      相关资源
      最近更新 更多