Read uppercase messages

20 views
Skip to first unread message

Steven

unread,
Oct 11, 2021, 4:34:37 PM10/11/21
to tesseract-ocr
Hi everyone, I can't seem to get tesseract to print out an uppercase letter. It can read the letter perfectly but it's just lowercase. Would there be any way of getting it to print out an uppercase letter?

Zdenko Podobny

unread,
Oct 11, 2021, 4:37:11 PM10/11/21
to tesser...@googlegroups.com
Please send input image, info how you run tesseract, tesseract version a tessdata type

Dňa po 11. 10. 2021, 22:34 Steven <steven...@gmail.com> napísal(a):
Hi everyone, I can't seem to get tesseract to print out an uppercase letter. It can read the letter perfectly but it's just lowercase. Would there be any way of getting it to print out an uppercase letter?

--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/3fc3c2b5-7d71-4611-9a69-c072db2c2f9en%40googlegroups.com.

Steven

unread,
Oct 12, 2021, 6:31:41 AM10/12/21
to tesseract-ocr
Pytesseract version: 0.3.8
input image: inputImg.png
Output: "the quick brown fox jumps over the lazy dog."

My code:
def openCV():
    import numpy as np
    import cv2
    from pytesseract import pytesseract
    import pyautogui

    pytesseract.tesseract_cmd = "C:\\Users\\steve\\AppData\\Local\\Tesseract-OCR\\tesseract.exe"

    #Screenshot Region
    img = pyautogui.screenshot(region=(621,580, 670, 170))
    #RGB to BGR
    img = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)
    img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    #Image to string
    text = pytesseract.image_to_string(img)
   
    cv2.imshow('text', img)
   
    print(text)
   
    waitKey(0)
----------------------------------

Zdenko Podobny

unread,
Oct 12, 2021, 6:36:00 AM10/12/21
to tesser...@googlegroups.com
Please also provide the tesseract version a tessdata type. The pytesseract version is unimportant as it wraps tesseract executable.

Zdenko


ut 12. 10. 2021 o 12:31 Steven <steven...@gmail.com> napísal(a):
Reply all
Reply to author
Forward
0 new messages