Hacker News new | ask | show | jobs
by ad404b8a372f2b9 1752 days ago
Have you tried an off-the-shelf solution like Tesseract? It works quite well if you do the recommended preprocessing.
1 comments

The preprocessing suggestions I see are to crop out everything except for the numbers and I don’t know how to do that programmatically. There’s many kinds of displays: rollers, 7-segment, dot matrix, and LCD.

The preprocessing to increase DPI to 300 did not help when I tried Tesseract, unfortunately. It’s hard to achieve a good contrast between the numbers and the backdrop

There are a lot of other options and preprocessing methods you can use to get better results. It's hard to tell without seeing the picture but thresholding/binarization might help with the contrast. In order to isolate the text, the mode option also makes a lot of difference: https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html#...

If that doesn't work you'll have to add a text localization model to your pipeline.

Thank you for your guidance. I will investigate further