我遇到了 tesseract 无法破译硬币图像的问题。在线网站已经能够以我无法达到的合理准确度告诉我代币所说的内容。
我的代码:
import pytesseract
from PIL import Image
image_file = Image.open("coinClear.jpg")
pytesseract.pytesseract.tesseract_cmd = r'C:/Program Files/Tesseract-OCR/tesseract.exe'
data = pytesseract.image_to_string(image_file, lang='eng')
print(data)
image_file.show()