I am trying to get text from a video game using PIL and pytesseract. Here is an example of what I am trying to recognize :
I used a basic function to get binary image and another to invert it, here is the function :
@staticmethod
def getBinaryImage(image, thresh):
fn = lambda x: 255 if x > thresh else 0
im = image.convert('L').point(fn, mode='1')
return im
With these filters i manage to get this :
The problem is that tesseract can't recognize this. I tried with differents threshold for the binary image but it doesn't help.
My question is, is there any other basic filters i can apply to my image to make it better quality and make tesseract recognize it?
EDIT :
Here is a new version of my image, which was resized. But tesseract still can't recognize it.