title: How to OCR low quality code picture with pytesseract
body: <p>I have a set of pictures (<a href="https://i.ibb.co/TTvdYCm/a.png" rel="nofollow noreferrer">sample</a>) of the same formatted code, I've tried every thing but nothing works well.
  I tried blurring, hsv, threshing, etc.
  can you help me out?</p>
  <pre><code>import pytesseract
  import cv2
  imgr = cv2.imread(&quot;a.png&quot;)
  img = cv2.resize(imgr, (int(imgr.shape[1] * 3), int(imgr.shape[0] * 3)), interpolation=cv2.INTER_AREA)
  img = cv2.blur(img, (7, 7))
  hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
  h, s, v = cv2.split(hsv)
  cv2.imshow(&quot;&quot;, v)
  cv2.waitKey(0)
  p = pytesseract.image_to_string(v)
  print(p)
  thresh = cv2.threshold(v, 170, 255, cv2.THRESH_BINARY)[1]
  cv2.imshow(&quot;&quot;, thresh)
  cv2.waitKey(0)
  print(pytesseract.image_to_string(thresh))
  </code></pre>
  <p></p>
  <pre><code>ation
  </code></pre>
  <p></p>