Reputation: 11
I am beginner at pytesseract.
I try to get the letters from those captcha images:
import pytesseract
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
pytesseract.image_to_string(Image.open('C:/Users/user/Desktop/download (2).png'))
But it gives me "" as output.
Upvotes: 0
Views: 814
Reputation: 3187
You probably want to escape space and / characters. I suspect that this might be causing the issue.
pytesseract.pytesseract.tesseract_cmd = r'C:\Program\ Files\Tesseract-OCR\tesseract.exe'
pytesseract.image_to_string(Image.open('C:\/Users\/user\/Desktop\/download\ (2).png'))
Upvotes: 2