Indeed, why? (What is the thought that drove you to run this particular imagemagick command?) While it might help visually debugging something you're trying, the simplest path towards "black text on white background" is
1. converting any image to greyscale. (and see for yourself if that output is easily legible; if it's not, chances are the machine will have trouble too, so more preprocessing /before/ the greyscale transform is needed then) 2. use a 'threshold' (a.k.a. binarization) step to possibly help (though tesseract can oftentimes do a better job with greyscale instead of hard black & white as there's more 'detail' in the image pixels then. YMMV). You can do this many ways, using imagemagick is one, openCV another. For one-offs I use Krita / Photoshop filter layers (stacking the filters to get what I want). Anything really that gets you something that approaches 'crisp dark/black text on a clean, white background, text characters about 30px high' (dpi is irrelevant, though often mentioned elsewhere: tesseract does digital image pixels, not classical printer mindset dots-per-inch). Note that 'simplest path towards' does not mean 'always the best way'. Met vriendelijke groeten / Best regards, Ger Hobbelt -------------------------------------------------- web: http://www.hobbelt.com/ http://www.hebbut.net/ mail: [email protected] mobile: +31-6-11 120 978 -------------------------------------------------- On Fri, Oct 31, 2025 at 5:46 AM Rucha Patil <[email protected]> wrote: > Green? Why? I dont know if this might resolve the issue. Lmk the behavior > I’m curious. But you need an image that has white background and black > text. You can achieve this easily using cv2 functions. > > On Thu, Oct 30, 2025 at 1:26 PM Michael Schuh <[email protected]> wrote: > >> I am trying to extract the date and time from >> >> [image: time.png] >> >> I have successfully use tesseract to extract text from other images. >> tesseract does not find any text in the above image, >> >> michael@argon:~/michael/trunk/src/tides$ tesseract time.png out >> Estimating resolution as 142 >> >> michael@argon:~/michael/trunk/src/tides$ cat out.txt >> >> michael@argon:~/michael/trunk/src/tides$ ls -l out.txt >> -rw-r----- 1 michael michael 0 Oct 30 08:58 out.txt >> >> Any help you can give me would be appreciated. I attached the time.png >> file I used above. >> >> Thanks, >> Michael >> >> -- >> 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 [email protected]. >> To view this discussion visit >> https://groups.google.com/d/msgid/tesseract-ocr/77ac0d2b-7796-4f17-8bc6-0e70a9653adan%40googlegroups.com >> <https://groups.google.com/d/msgid/tesseract-ocr/77ac0d2b-7796-4f17-8bc6-0e70a9653adan%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 [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/tesseract-ocr/CADEFw17btz6nKqyhFKd-GXVCu7qtBQQ6gY5AV0pZJusXa4CpXg%40mail.gmail.com > <https://groups.google.com/d/msgid/tesseract-ocr/CADEFw17btz6nKqyhFKd-GXVCu7qtBQQ6gY5AV0pZJusXa4CpXg%40mail.gmail.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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/tesseract-ocr/CAFP60fpUCz1LFq_aqk0ea6W8GR7a7mrX5%3DPdZhv6%3Dn6t-1YVrg%40mail.gmail.com.

