title: How to clean an image's text before reading with tesseract?
body: <p>I am using tesseract to read text from an image. As my BinaryImage input would not be a simple text over a plain white background, I am getting only 50 % as a correct output.</p>
  
  <p>is there any way to preprocess an image so that I can get proper output from tesseract? I have already tried grey scaling and binarizing the image using <a href="https://bostjan-cigan.com/java-image-binarization-using-otsus-algorithm/" rel="nofollow noreferrer">Otsu's method</a>,  but there was no improvement.</p>
  
  <p>As I am doing all this using java, it would be helpful if someone can share details of any java lib or steps to get the better results from tesseract. </p>
  
  <p>I am not getting proper ImageMagick docs to use it in my Java code as well. Any help on this is appreciated.    </p>
  
  <p><a href="https://i.stack.imgur.com/iiYaZ.jpg" rel="nofollow noreferrer">sample image ( any wireless bill of AT &amp; T)</a></p>