Detecting white text on a bright background with tesseract

I'm having issues reading white text on a bright background, it finds the text itself but it cannot really translate it correctly.

The image:
enter image description here

The result I keep getting is LanEerus which is not that far off, to be honest.

What I'm wondering is what image pre-processing could fix this? I'm using photoshop to manually pre-process it before I try to do it with code, to find what should work first.

I've tried making it a bitmap, but that makes the borders of the text pretty bad, resulting in tesseract just translating it to random characters.

Inverting colors and/or grayscaling doesn't seem to do the trick, either.

Anyone have any ideas? I know it's a pretty bad background for the text for this case. Trust me, I wish that the background was different!



Read more here: https://stackoverflow.com/questions/67386714/detecting-white-text-on-a-bright-background-with-tesseract

Content Attribution

This content was originally published by Jonathan Öhrström at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: