<p>The problem is that the Tesseract engine was not trained to read this kind of text topology.</p>

<p>You can:</p>

<ul>
<li>train your own model, and you'll need in particular to provide images with variations of topology (position of characters). You can actually use the same image, and shuffle the positions of the characters.</li>
<li>reorganize the image into clusters of text and use tesseract, in particular, I would consider the cents part and move it on the right of the coma, in that case you can use tesseract out of the box. Few relevant criterions would be the <strong>height of the clusters</strong> (to differenciate cents and integers), and the <strong>position of the clusters</strong> (read from the left to the right).</li>
</ul>

<p>In general computer vision algorithms (including CNNs) are giving you tool to have a higher representation of an image (features or descriptors), but they fail to create a logic or an algorithm to process intermediate results in a certain way.</p>

<p>In your case that would be:</p>

<ul>
<li>"if the height of those letters are smaller, it's cents",</li>
<li>"if the height, and vertical position is the same, it's about the
same number, either on left of coma, or on the right of coma".</li>
</ul>

<p>The thing is that it's difficult to reach that through training, and at the same time it's extremely simple to write this for a human as an algorithm. Sorry for not giving you an actual implementation, but my text <strong>is</strong> the pseudo code.</p>

<p><a href="https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract2" rel="noreferrer">TrainingTesseract2</a></p>

<p><a href="https://github.com/tesseract-ocr/tesseract/wiki/TrainingTesseract-4.00" rel="noreferrer">TrainingTesseract4</a></p>

<p><a href="https://arxiv.org/abs/1604.03628" rel="noreferrer">Joint Unsupervised Learning of Deep Representations and Image Clusters</a></p>
Tesseract OCR fails to detect varying font size and letters that are not horizontally aligned
<p>I am trying to detect these price labels text which is always clearly preprocessed. Although it can easily read the text written above it, it fails to detect price values. I am using python bindings <a href="https://github.com/madmaze/pytesseract/" rel="noreferrer">pytesseract</a> although it also fails to read from the CLI commands. Most of the time it tries to recognize the part where the price as one or two characters.</p>

<p><strong>Sample 1:</strong></p>

<p><img src="https://i.stack.imgur.com/dKC6k.png"></p>

<pre><code>tesseract D:\tesseract\tesseract_test_images\test.png output
</code></pre>

<p>And the output of the sample image is this.</p>

<blockquote>
  <p>je Beutel</p>
  
  <p>13</p>
</blockquote>

<p>However if I crop and stretch the price to look like they are seperated and are the same font size, output is just fine.</p>

<p><strong>Processed image(cropped and shrinked price):</strong></p>

<p><img src="https://i.stack.imgur.com/UNeT2.png"></p>

<blockquote>
  <p>je Beutel</p>
  
  <p>1,89</p>
</blockquote>

<p>How do get OCR tesseract to work as I intended, as I will be going over a lot of similar images?
<strong>Edit:</strong> Added more price tags:<br>
<img src="https://i.stack.imgur.com/8bPOH.jpg" alt="sample2"><img src="https://i.stack.imgur.com/K6krq.jpg" alt="sample3"><img src="https://i.stack.imgur.com/HTYux.jpg" alt="sample4"><a href="https://i.stack.imgur.com/rUt6x.jpg" rel="noreferrer">sample5</a> <a href="https://i.stack.imgur.com/Ar8cE.jpg" rel="noreferrer">sample6</a> <a href="https://i.stack.imgur.com/oCD2V.jpg" rel="noreferrer">sample7</a>  </p>