OCR is not working for images with dark background and light letters

107 views
Skip to first unread message

two way

unread,
Apr 1, 2021, 9:59:59 AM4/1/21
to tesseract-ocr
I've found a serious problem while I am testing with two images like below.

img1.png
img2.png

It is working well with first image which has light background and dark letters.
As you can see, the second image is the inverted color of the first image.
So I expected the two images to produce the same result.
However, none of the letters were properly detect in the second image.

Thanks for reading my suggestion.
Regards.
XueQing

Zdenko Podobny

unread,
Apr 2, 2021, 3:53:12 AM4/2/21
to tesser...@googlegroups.com
Can you please first read documentation before posting to the forum?

Hint: you can have a look at leptonica pixAutoPhotoinvert()

št 1. 4. 2021 o 16:00 two way <twowa...@gmail.com> napísal(a):
--
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/73f9dbf2-751c-4b0e-9cbc-64889ae84d3bn%40googlegroups.com.

two way

unread,
Apr 2, 2021, 4:34:48 AM4/2/21
to tesseract-ocr
Thanks for your quick response.
The problem occurred while I am using textfairy which is distributed as mobile application, and there was image pre-processing step in my opinion.
Is there any other android project alternative to textfairy?

Zdenko Podobny

unread,
Apr 2, 2021, 4:40:06 AM4/2/21
to tesser...@googlegroups.com
if you have problem with textfairy, than report it to author:
He updates app regularly (last update was 28. 3. 2021).

Zdenko


pi 2. 4. 2021 o 10:34 two way <twowa...@gmail.com> napísal(a):
Reply all
Reply to author
Forward
0 new messages