title: Image cleaning before OCR application
body: <p>I have been experimenting with PyTesser for the past couple of hours and it is a really nice tool. Couple of things I noticed about the accuracy of PyTesser:</p>
  
  <ol>
  <li>File with icons, images and text - 5-10% accurate</li>
  <li>File with only text(images and icons erased) - 50-60% accurate</li>
  <li>File with stretching(And this is the best part) - Stretching file
  in 2) above on x or y axis increased the accuracy by 10-20%</li>
  </ol>
  
  <p>So apparently Pytesser does not take care of font dimension or image stretching. Although there is much theory to be read about image processing and OCR, are there any standard procedures of image cleanup(apart from erasing icons and images) that needs to be done before applying PyTesser or other libraries irrespective of the language?</p>
  
  <p>...........</p>
  
  <p>Wow, this post is quite old now. I started my research again on OCR these last couple of days. This time I chucked PyTesser and used the Tesseract Engine with ImageMagik instead. Coming straight to the point, this is what I found:</p>
  
  <pre><code>1) You can increase the resolution with ImageMagic(There are a bunch of simple shell commands you can use)
  2) After increasing the resolution, the accuracy went up by 80-90%.
  </code></pre>
  
  <p>So the Tesseract Engine is without doubt the best open source OCR engine in the market. No prior image cleaning was required here. The caveat is that it does not work on files with a lot of embedded images and I coudn't figure out a way to train Tesseract to ignore them. Also the text layout and formatting in the image makes a big difference. It works great with images with just text.  Hope this helped.</p>