Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python使用pytesseract识别简单图像中的数字_Python_Ocr_Tesseract_Python Tesseract - Fatal编程技术网

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

Python使用pytesseract识别简单图像中的数字,python,ocr,tesseract,python-tesseract,Python,Ocr,Tesseract,Python Tesseract,我正在尝试使用PyteseRact从图像中识别数字,如下所示: 我尝试了以下代码 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

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

我尝试了以下代码

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()
版本('4.0.0-beta.1')

任何帮助都将不胜感激,包括其他库。

这是一个已知的问题-

基本上白名单和黑名单都不起作用

一条评论指出

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

使用--oem 0或-oem 0可以正常工作

我没有办法测试这个自动取款机,但值得一试

4.1版本应对此进行修复