However i'm blocking on recognizing single uppercase letter, i tried many different configurations for preprocessing but i can't get to find the right one, even with PSM set to 10, i don't really know what i could try. Any help is appreciated.
import cv2
import os
import pytesseract
import numpy as np
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
for pic in ["e.png","d-.png","d.png"]:
img=cv2.imread(pic)
#Preprocessing
img = cv2.resize(img, (70, 90), interpolation=cv2.INTER_NEAREST)
norm_img = np.zeros((img.shape[0], img.shape[1]))
img = cv2.normalize(img, norm_img, 0, 255, cv2.NORM_MINMAX)
img = cv2.fastNlMeansDenoisingColored(img, None, 10, 10, 7, 15)
img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img = cv2.bitwise_not(img)
img = cv2.threshold(img,127,255,cv2.THRESH_BINARY) [1]
cv2.imwrite("processed-"+pic, img)
# Tesseract OCR
text = pytesseract.image_to_string(img, lang='eng', config='-c tessedit_char_whitelist=\\ ABCDEF+- tessedit_char_blacklist=\\=!,*%^$°:. --psm 10 -oem 3')
print(str(text).replace("\n", " "))