I have the following number:
I am using tesseract as documented in this question.
The result I am getting is "\n", and not 7000 as expected.
Has anyone experienced this issue in the past when trying to parse a number?
I have tried the following:
>>> image = Image.open("C:/temp/download.png")
>>> image = image.convert('RGB')
>>> image = image.filter(ImageFilter.BLUR)
>>> print image_to_string(image)
>>>image.save("C:/temp/dl1.png")
Which gives me
A step in the right direction is the following:
from PIL import ImageFilter
import sys
from PIL import Image
import PIL.ImageOps
import pytesseract
import time
image=Image.open("C:/temp/download.png")
image.load()
background = Image.new("RGB", image.size, (255, 255, 255))
background.paste(image, mask=image.split()[3]) # 3 is the alpha channel
background.save('C:/temp/foo.jpg', 'JPEG', quality=80)
img =Image.open('C:/temp/foo.jpg')
img.load()
print img
print '-------------------'
i = pytesseract.image_to_string(img)
print i
But now I am here.