Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.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 PyteSeract不从图像输出文本_Python_Image Processing_Tesseract_Python Tesseract - Fatal编程技术网

Python PyteSeract不从图像输出文本

Python 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

也许有人能帮我!当我运行以下代码时

导入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

这是没有帮助的。我做错了什么?

听起来像是
we\u will
是空字符串。尝试打印
repr(我们将)
以更清楚地理解这个想法


IIRC,PyTesseract在无法识别图像中的文本时会执行此操作。对于单色背景的裁剪图像,您可以获得最佳效果。

请看、,谢谢,我曾试图使用Pyteseract来破解验证码,但这毫无意义!