I'm trying to get PyTesseract OCR to read digits from this simple and well cropped Image, but for some reason it's just not able to do this.
from PIL import Image
import pytesseract as p
def obtain_balance(a):
im = Image.open(a)
width,height = im.size
a = 300*5 - 120
# print(width,height)
left = 155+a
top = 5
right = 360+a
bottom = 120
m1 = im.crop((left, top, right, bottom))
text = p.image_to_string(m1,lang='eng',config='--psm 13 --oem 3 -c tessedit_char_whitelist=0123456789').split()
print(text)
m1.show()
return text
obtain_balance('cur.jpg')
Output :
[]