Python PyteSeract不从图像输出文本
也许有人能帮我!当我运行以下代码时 导入pytesseract 从PyteSeract导入图像到字符串 从PIL导入图像 进口PILPython PyteSeract不从图像输出文本,python,image-processing,tesseract,python-tesseract,Python,Image Processing,Tesseract,Python Tesseract,也许有人能帮我!当我运行以下代码时 导入pytesseract 从PyteSeract导入图像到字符串 从PIL导入图像 进口PIL file = Image.open('/usr/local/Cellar/tesseract/4.1.0/share/tessdata/cap.png') we_will = pytesseract.image_to_string(file) print(we_will) 所有输出的内容都是: Process finished with exit code 0
file = Image.open('/usr/local/Cellar/tesseract/4.1.0/share/tessdata/cap.png')
we_will = pytesseract.image_to_string(file)
print(we_will)
所有输出的内容都是:
Process finished with exit code 0
这是没有帮助的。我做错了什么?听起来像是
we\u will
是空字符串。尝试打印repr(我们将)
以更清楚地理解这个想法
IIRC,PyTesseract在无法识别图像中的文本时会执行此操作。对于单色背景的裁剪图像,您可以获得最佳效果。请看、,谢谢,我曾试图使用Pyteseract来破解验证码,但这毫无意义!