0

So I've a captcha image that I'm trying to decode using pytesseract. I've done all the preprocessing using opencv then my current image is -

enter image description here

Now when I'm using pytesseract it is giving me an output:

print(pytesseract.image_to_string(image, config = '--psm 7'))

gTKYWS5

Is there a way to limit the no off characters detected as I know all my images would have 6 characters.

niel_99
  • 51
  • 4
  • On my computer, I get gTKYW5. Have you tried using a different psm ? Maybe you can find more details here : https://ai-facets.org/tesseract-ocr-best-practices/ – Mathieu Guyot Feb 19 '20 at 13:03
  • Try using `--psm 6` to tell Pytesseract to treat the image a single block of text – nathancy Feb 19 '20 at 21:36

0 Answers0