iT邦幫忙

0

為什麼同樣大小的png檔,有時候pytesseract會看不到?

為什麼這個圖檔的數字,pytesseract 會漏字(第5個數字,44)?
https://ithelp.ithome.com.tw/upload/images/20210506/20137066lXsov6xSGR.png
import PIL
from PIL import Image
import pytesseract
image = Image.open('OCRs/pft_post_001.png')
display(image)
print('image size: {}X{}'.format(image.width, image.height))
txt = pytesseract.image_to_string(image)
print(txt)
https://ithelp.ithome.com.tw/upload/images/20210506/20137066cpF7Ip3GdW.png
請問我要如何解決這個問題呢?謝謝

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

0
海綿寶寶
iT邦大神 1 級 ‧ 2021-05-07 09:00:41

把 psm 設為 7, 11 或 13 試試看
參考資料來源

我要發表回答

立即登入回答