title: Improve quality of tesseract text recognition
body: <p>I try to build an iOS app that can scan the vin number from a car. I'm having some problems with the accuracy of the scan.</p>
  
  <p>I use opencv to find the contours/bounding boxes of the text and so far I have this result:</p>
  
  <p><img src="https://dl.dropboxusercontent.com/u/63179/ocr/IMG_0238.PNG" alt="ocr result"></p>
  
  <p>As you can see I have great result with finding the boxes of the text and I'm cropping the image according to the green frame before sending it to tesseract.</p>
  
  <p>Tesseract however does not give a good result. Sometimes I get the correct text and sometimes it give me something else.</p>
  
  <p>I use tesseract 3.03 from the following Pod: <a href="https://github.com/kevincon/Tesseract-OCR-iOS/tree/tesseract3.03" rel="nofollow">https://github.com/kevincon/Tesseract-OCR-iOS/tree/tesseract3.03</a></p>
  
  <p>I use the default english training dict and I setup Tesseract like:</p>
  
  <pre><code>tesseract = [[Tesseract alloc] initWithLanguage:@"eng"];
  [tesseract setVariableValue:@" 0123456789ABCDEFGHJKLMNPQRSTUVWXYZ" forKey:@"tessedit_char_whitelist"];
  [tesseract setVariableValue:@"language_model_penalty_non_freq_dict_word" forKey:@"0"];
  [tesseract setVariableValue:@"language_model_penalty_non_dict_word" forKey:@"0"];
  [tesseract setVariableValue:@"load_system_dawg" forKey:@"0"];
  [tesseract setVariableValue:@"load_freq_dawg" forKey:@"0"];
  </code></pre>
  
  <p>Any ideas on how I can improve the accuracy of this scan?</p>
  
  <p><strong>UPDATE 1:</strong>
  My next step will be to create traindata. I will try an use this image:
  <a href="https://dl.dropboxusercontent.com/u/63179/ocr/traindoc.jpg" rel="nofollow">https://dl.dropboxusercontent.com/u/63179/ocr/traindoc.jpg</a>
  I us the font helvetica neue regular since it looks quiet similar. I know that my text will only contain numbers and uppercase characters.</p>