Думаю вы так хотели ?
Конечно не 100% результат, но вы с настройками можете поиграться
import cv2
import pytesseract
def text(img, size, chan):
pytesseract.pytesseract.tesseract_cmd = r'Tesseract-OCR\tesseract.exe'
scale_percent = int(size)# Процент от изначального размера
image = cv2.imread(img)
width = int(image.shape[1] * scale_percent / 100)
height = int(image.shape[0] * scale_percent / 100)
dim = (width, height)
resized = cv2.resize(image, dim, interpolation = cv2.INTER_AREA)
gray = cv2.cvtColor(resized, cv2.COLOR_BGR2GRAY) #
ret, threshold_image = cv2.threshold(gray, chan, 150, 1, cv2.THRESH_BINARY)
text = pytesseract.image_to_string(threshold_image, config='--psm 11')
# cv2.imshow("123", threshold_image)
# cv2.waitKey(0)
return text
text1 = text("1.png", 350, 150)
print(text1,"\n\n")
text2 = text("2.png", 350, 30)
print(text2,"\n\n")
text3 = text("3.png", 350, 160)
print(text3,"\n\n")