Digital number recognition from LCD displays can be a challenge when it comes to recognizing seven-segment or dot-matrix displays. This is because the lines in the numbers do not actually connect when forming the number. When performing OCR on images that contain these fonts, you will need to do some image processing to increase the accuracy. This can easily be done with two functions from the LEADTOOLS Image Processing SDK that is included with LEADTOOLS Recognition and Document Imaging products.
After loading the image that you want to OCR, you will first need to perform the AutoBinarizeCommand
to apply binary segmentation to the image. Now that the image has been binarized, we will use the MinimumCommand
to dilate the dark object found in the image. For this example, I set the dimensions to 8.
When pairing these image processing functions together, it will combine the segments of the seven-segment and dot-matrix displays to form one solid number.
Before
new AutoBinarizeCommand().Run(image);
new MinimumCommand { Dimension = 8 }.Run(image);
After
Results
Try for free!
To test this for yourself, you can download the latest code for free straight from our site. This trial is good for 60 days and comes with unlimited chat and email support.
Support
Need help getting this sample up and going? Contact our support team for free technical support! For pricing or licensing questions, you can contact our sales team (sales@leadtools.com) or call us at 704-332-5532.