我正在嘗試從這些影像中獲取文本。當我運行下面的代碼時,在第一張圖片中識別“Legendary x”,但第二張圖片不識別任何東西。我不明白出了什么問題
def get_text(image, coord):
im = Image.open(image)
image_cropped = crop_text(im, coord)
text = pytesseract.image_to_string(image_cropped, config='--psm 6')
return text.replace('\n', '').replace('\f', '')
第一張圖 第二張圖
uj5u.com熱心網友回復:
請閱讀 tesseract 檔案: https ://github.com/tesseract-ocr/tessdoc/blob/main/ImproveQuality.md
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/475582.html
標籤:Python 图片 文本 正方体 python-正方体
上一篇:JS更改存盤在變數中的影像的游標
