Python用pytesseract识别简单图像中的数字

问题描述 投票:0回答:1

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

img

我尝试了以下代码

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个回答
© www.soinside.com 2019 - 2024. All rights reserved.