title: OCR Character Segmentation
body: <p>I am doing penetration testing on my friend's website,<br>
   and I've spotted a captcha on the site which appeared to me an easy task to solve.<br>
  <a href="https://i.stack.imgur.com/hT7Pg.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hT7Pg.jpg" alt="enter image description here"></a></p>
  
  <p>After applying a a Gaussian blur, and then simple thresholds, I have ended up with the following:<br>
  <a href="https://i.stack.imgur.com/qaGky.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qaGky.png" alt="enter image description here"></a><br>
  After feeding this to tesseract-ocr, I got the following output:<br>
  <strong><em>CLBTJE</em></strong>  </p>
  
  <p>So OCR failed to recognize the last two characters in the text.<br>
  I would imagine the issue would be primarily that tesseract can't segment the 'T' and the 'X'.  </p>
  
  <p>My main question then becomes, is it possible to force tesseract to do the segmenting, or do I have to implement such myself?  </p>
  
  <p>Here is the C# code I'm using to perform OCR:</p>
  
  <pre><code>var image = new Bitmap(pictureBox1.Image);
  var ocr = new Tesseract();
  ocr.SetVariable("tessedit_char_whitelist", "QWERTYUIOPASDFGHJKLZXCVBNM" + "QWERTYUIOPASDFGHJKLZXCVBNM".ToLower()); 
  ocr.Init(@"tessdata", "eng", false);
  var result = ocr.DoOCR(image, new Rectangle());
  foreach (Word word in result)
      MessageBox.Show("Confindece : " + word.Confidence + ", Word : " + word.Text);
  </code></pre>