Py学习  »  Python

如何识别这个图像Python pytesseract?

Sam • 4 年前 • 405 次点击  

我想使用python来识别这个图像(它是一个网站中使用的验证码),但是它没有显示任何内容

我使用的代码如下:

from PIL import Image
import pytesseract
from pytesseract import image_to_string
pytesseract.pytesseract.tesseract_cmd=r"C:/Program Files/Tesseract-OCR/tesseract.exe"
img=Image.open('C:/Users/SAM/Desktop/b.gif')
text=image_to_string(img)
print(text)

enter image description here

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/53792
 
405 次点击