Pytesseract: UnicodeDecodeError: 'charmap' codec can't decode byte

后端 未结 2 1484
一整个雨季
一整个雨季 2020-12-21 02:25

I\'m running a large number of OCRs on screenshots with Pytesseract. This is working well in most cases, but a small number is causing this error:

pytesserac         


        
2条回答
  •  暖寄归人
    2020-12-21 02:43

    Use Unidecode

    from unidecode import unidecode
    import pytesseract
    
    strs = pytesseract.image_to_string(Image.open('binarized_image.png'))
    strs = unidecode(strs)
    print (strs)
    

提交回复
热议问题