Maybe use a different segmentation mode? Try changing the line: text = pytesseract.image_to_string(cropped_image, lang='eng').strip()
to: text = pytesseract.image_to_string(cropped_image, lang='eng', config='--psm 6').strip() That should help. art From: tesseract-ocr@googlegroups.com <tesseract-ocr@googlegroups.com> On Behalf Of Paulus Present Sent: Sunday, October 29, 2023 4:21 PM To: tesseract-ocr <tesseract-ocr@googlegroups.com> Subject: [tesseract-ocr] Poor results of Tesseract performing a play card evaluation You don't often get email from present.pau...@gmail.com<mailto:present.pau...@gmail.com>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification> Dear forum members I used Tesseract to get 10 Regions Of Interest from a Lorcana play card, but it didn' succeed very well. It did not succeed in figuring out the numbers nor the name of the character. I presume this is because of the image preprocessing as the fonts are not really anything special. Could you help me figuring out how I could bring Tesseract to better perform on the PNG? I add 1 sample card and the py code used to deploy Tesseract as well as the resulting Excel table and the extraced Region Of Interest TIFFs. I will be happy with any help anyone can provide. Thanks in advance! Paulus -- 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-ocr+unsubscr...@googlegroups.com<mailto:tesseract-ocr+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/9c2e162e-dce2-4a81-8138-5268b4e16423n%40googlegroups.com<https://groups.google.com/d/msgid/tesseract-ocr/9c2e162e-dce2-4a81-8138-5268b4e16423n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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-ocr+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/YT2PR01MB98893FE7A148A46C8BC59F91DCA1A%40YT2PR01MB9889.CANPRD01.PROD.OUTLOOK.COM.