[Python] Extract text from image containing boxed numbers with pytesseract

Discussão em 'Python' iniciado por Stack, Maio 1, 2025.

  1. Stack

    Stack Membro Participativo

    I tried extract numbers from original image

    [​IMG]

    but with no luck.

    Output from pytesseract is: "[a ]:[4] G2):Go] [7 ):Ce J"

    My code:

    import pytesseract
    import cv2
    pytesseract.pytesseract.tesseract_cmd = 'folder /tesseract.exe'
    img = cv2.imread("folder /test_image.png")
    text = pytesseract.image_to_string(img)
    print(text)

    Continue reading...

Compartilhe esta Página