title: Python OCR : Converting Scanned Image Into Text For Processing
body: <p>I am trying to create an answer paper marking (multiple choice question) python application. The answer sheet will be scanned into image file (gif,png,jpg,whichever format is needed).</p>
  
  <p>My App has access to the database where all the answers are stored.</p>
  
  <p>So,all it need is some kind of data from scanned image so that it can compare the answer and calculate the marks.</p>
  
  <p>The answer sheet has fixed dimensions with the table format like this ( Answers will be marked by 'X' by the candidate to indicate their answers):</p>
  
  <p><img src="https://i.stack.imgur.com/njYQE.png" alt="enter image description here"> </p>
  
  <p>After searching through the internet, i found that there are a few OCR APIs available.</p>
  
  <p>First one is <code>Pytesser</code> . It is very easy to use and the results are quite okay. But it only work for the images with just pure texts. So, i think it is not suitable.</p>
  
  <p>The second one i found is <code>Ocropus</code>. It seems powerful but in it's documentation</p>
  
  <blockquote>
    <p>Windows</p>
    
    <p>OCRopus relies a lot on POSIX path names and file systems. 
    You may be able to install OCRopus on Windows using .  An easier way
    is to install VirtualBox and run OCRopus in Ubuntu under VirtualBox.</p>
  </blockquote>
  
  <p>So i think it is mostly for linux. I could not find a detail installation guide for window platform. ( I am a beginner, so i could be wrong)</p>
  
  <p>The third one i found is <code>python-tesseract</code> , a wrapper for <code>Tesseract OCR</code>. In their <a href="http://code.google.com/p/python-tesseract/" rel="noreferrer">page</a>, the installation guide was provided. Basically, i need,</p>
  
  <ol>
  <li>python-tesseract-win32.deb </li>
  <li>python-opencv</li>
  <li>numpy</li>
  </ol>
  
  <p>but i have no clue on how to install <code>.deb</code> files on window. I have the <code>opencv</code> and <code>nampy</code> already installed.</p>
  
  <p>So the following are my questions:</p>
  
  <p>(1) In which way can i convert the table image into processable data(is it even possible?)?</p>
  
  <p>(2) Is there any other useful OCR APIs that i have not mentioned here that could be helpful?</p>
  
  <p>(3) Finally, (my silly idea) Is it possible to split the image into small chucks(based on the size of the table cells - since the table dimensions are known) using <code>PIL</code> and then use <code>pytesser</code> to convert each small images into text, thereafter process the data accordingly?</p>
  
  <p>FYI: I only need it for Windows Platform, possibly for windows xp 32 bits. I am using python 2.7.5.</p>