首页 > 解决方案 > pytesseract 无法识别图片中的数字。也许数字太接近了

问题描述

我正在尝试使用 pytesseract 从图像中识别数字: 在此处输入图像描述

以上均不返回数字。但是数字太接近可能无法识别。

关于如何让 tesseract 识别它,你有什么技巧吗?

from PIL import Image
import pytesseract
  
img = Image.open('123.jpg')
text = pytesseract.image_to_string(img, config='outputbase digits')
print(text)

标签: python-tesseract

解决方案


推荐阅读