title: Text Extraction from Image with Single letter in it
body: <p>I have an image <a href="https://i.stack.imgur.com/n4clX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n4clX.jpg" alt="F"></a> not of much good quality with a single letter in it. I need to extract the value from this</p>
  
  <p>I tried doing this with open CV. the code works on good quality image but need help to extract from this image</p>
  
  <pre><code>from PIL import Image
  import pytesseract
  import argparse
  import os
  import cv2
  import numpy as np
  
  img = cv2.imread(r"/home/ubuntu/xyz/xyz.jpg")
  img = cv2.resize(img, None, fx=1.5, fy=1.5, interpolation=cv2.INTER_CUBIC)
  img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
  kernel = np.ones((1, 1), np.uint8)
  img = cv2.dilate(img, kernel, iterations=1)
  img = cv2.erode(img, kernel, iterations=1)
  img = cv2.GaussianBlur(img, (5, 5), 0)
  img = cv2.threshold(img, 0, 255, cv2.THRESH_BINARY + cv2.THRESH_OTSU)\[1\]  
  # Save the filtered image
  cv2.imwrite(r"/home/ubuntu/xyz/rr.jpg", img)
  # Read text with tesseract for python
  result = pytesseract.image_to_string(img, lang="eng")
  result
  </code></pre>