title: How to remove all lines and borders in an image while keeping text programmatically?
body: <p>I'm trying to extract text from an image using Tesseract OCR.
  Currently, with this original input image, the output has very poor quality (about 50%). But when I try to remove all lines and borders using photoshop, the output improves a lot (~90%). Is there any way to remove all lines and borders in an image (keeping text) programmatically using OpenCV, Imagemagick,.. or some other technique?</p>
  <p>Original Image:
  <img src="https://i.stack.imgur.com/G1uQx.png" alt="Original Image" /></p>
  <p>Expected Image:
  <img src="https://i.stack.imgur.com/www3j.jpg" alt="Expect Image" /></p>