title: Text extraction from image with background noise
body: <p>I am working on text extraction from images using tesseract. I have applied grayscaling and thresholding as preprocessing steps. This is my input image.</p>
  <p><a href="https://i.stack.imgur.com/4VUQI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4VUQI.png" alt="enter image description here" /></a></p>
  <p>following is my implementation on python</p>
  <pre><code>gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
  ret, thresh = cv2.threshold(gray, 5, 255, cv2.THRESH_TOZERO)
  conf = '-l eng --oem 3 --psm 11'
  data_str = image_to_data(image, config=conf)
  </code></pre>
  <p>The main problem is that it couldn't extract all texts from the image because of noise in the image. Output of image_to_data() is follows.</p>
  <p><a href="https://i.stack.imgur.com/EiWaX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EiWaX.png" alt="enter image description here" /></a></p>
  <p>How to preprocess this type of image to extract text from image completely. Thank you!</p>