python一行代码实现图片文字识别

from PIL import Image
import pytesseract
#上面都是导包,只需要下面这一行就能实现图片文字识别
text=pytesseract.image_to_string(Image.open('321.png'),lang='chi_sim')#中文简体
print(text)

猜你喜欢

转载自blog.csdn.net/qq_38900441/article/details/82842385