这是图像https://i.imgur.com/icuV1eQ.png,我要从中提取代码:“ G Z Q”。 这是我从谷歌合作的代码 https://colab.research.google.com/drive/1GQhc8ObS9oihF7fUy2BNE0-x1guxBjvF#scrollTo=rMaOeCSFWnyA
!sudo apt install tesseract-ocr
!pip install pytesseract
import pytesseract
import shutil
import os
import random
try:
from PIL import Image
except ImportError:
import Image
imageurl="icuV1eQ.png"
!wget https://i.imgur.com/icuV1eQ.png
extractedInformation = pytesseract.image_to_string(Image.open(imageurl))
print(extractedInformation)
给出错误的结果:“ G yA Q”而不是“ G Z Q” 我试过的:将png转换为jpg,以多种方式裁剪图像,因此仅显示代码。我还尝试了一些配置选项:--- psm 1,3,5,7,9-都给出了更差的结果。请帮助