使用Python进行图片识别
1、安装Python3第三方模块pytesseract,Pillow,packaging
使用命令:pip3 install pytesseract
安装完后,我们可以直接输入命令:tesseract
2、使用Python进行文字识别
import pytesseract
from PIL import Image
img=Image.open('test.png')
code=pytesseract.image_to_string(img,lang='chi_sim+eng')
print(code)
保存退出,运行文件
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/6eceb667b9bba0e430e77fed955c183d.png)
即可正常输出识别的文字