I'm trying to extract digits from an image using Tesseract/PaddleOCR to recognize text from cropped images. I'm using OpenCV to preprocess the image for better recognition. I tried applying a Gaussian blur and a Threshold method for binarization, but the result is pretty bad.
Here is the code for reading an image and converting to grayscale, which is better but its still poor and cannot extract text from this image:
def display(img,cmap='gray'):
fig = plt.figure(figsize=(12,10))
ax = fig.add_subplot(111)
ax.imshow(img,cmap='gray')
img = cv2.imread("/content/PXL_20211019_171419721.MP.jpg")
plt.imshow(img)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
display(gray)
Here is the image I am using cropped image