tesserocr icon indicating copy to clipboard operation
tesserocr copied to clipboard

Why can't recognize the numbers in the attached picture?

Open xiandongbiequ opened this issue 4 years ago • 1 comments

333

xiandongbiequ avatar May 17 '21 23:05 xiandongbiequ

Please read the docs https://github.com/tesseract-ocr/tessdoc/blob/main/ImproveQuality.md:

image_filename = "i255.png"
img = Image.open(image_filename)
with tesserocr.PyTessBaseAPI(path=tessdata_path, psm=tesserocr.PSM.SINGLE_LINE) as api:
    api.SetImage(img)    
    print(api.GetUTF8Text())

Which produce:

¥3.33

zdenop avatar Sep 15 '21 13:09 zdenop