我目前面临pytesseract的一个问题,软件无法检测此图像中的数字:
出于某种原因,pytesseract不想识别图像中的数字。有什么建议吗?这是我的密码:
import pytesseract
from PIL import ImageEnhance, ImageFilter, Image
img = r'/content/inv_thresh.png'
str = pytesseract.image_to_string(Image.open(img), lang='eng', \
config='--psm 8 --oem 3 -c tessedit_char_whitelist=0123456789')
它返回一个字符串COTO
oem 3
(Default, based on what is available.
)我使用tesseract(4.1/5.0alpha)的TesserData\u最佳模式得到以下结果:
相关问题 更多 >
编程相关推荐