title: Image to Text - Pytesseract struggles with digits on windows
body: <p>I'm trying to preprocess frames of a game in real-time for a ML project.
  I want to extract numbers from the frame, so I chose Pytesseract, since it looked quite good with text.
  Though, no matter how clear I make the text, it won't read it correctly.
  My code looks like this:</p>
  
  <pre class="lang-py prettyprint-override"><code>section = process_screen(screen_image)[1]
  pixels = rgb_to_bw(section) #Makes the image grayscale
  pixels[pixels &lt; 200] = 0 #Makes all non-white pixels black
  tess.image_to_string(pixels)
  
  =&gt; 'ye ml)'
  </code></pre>
  
  <p>At best it outputs "ye ml)" when I don't specify I want digits, and when I do, it outputs nothing at all.</p>
  
  <p>The non-processed game image looks like so:
  <a href="https://i.stack.imgur.com/RdKN2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RdKN2.png" alt="Unprocessed Image"></a></p>
  
  <p>The "pixels" image looks like so :
  <a href="https://i.stack.imgur.com/WW5bL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WW5bL.png" alt="Pixels image"></a></p>
  
  <p>Thanks to Alex Alex, I inverted the image, and got this <a href="https://i.stack.imgur.com/Wh9Fx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wh9Fx.png" alt="Alex Alex Better"></a></p>
  
  <p>And got "2710", which is better, but still not perfect.</p>