I have been working on extracting text from images, specifically focusing on seven-segment fonts, using .NET. Unfortunately, my attempts with popular libraries like Tesseract, IronOcr and many more have been unsuccessful, as they seem to excel with normal English fonts.
Here's a brief overview of my tries so far:
1. Tesseract (Limited to normal English fonts, unable to recognize seven-segment characters)
2. IronOcr (Similar limitations, not suitable for seven-segment fonts)
3. Leadtools
4. pretrained models
5. custom trained models
6. some matlab and python projects from internet
7. some free OCR Api providers
Despite these efforts, I'm facing challenges in accurately extracting text from images with seven-segment fonts.
Link to Image Dataset Folder
Additionally, I've experimented with image processing techniques, including:
Cropping and zooming to the text region.
Applying gray, black and white, and binarization filters.
Jayraj ChhayaPosted Jan 30, 2024, 2:21 PM
Extracting text from images with 7-segment fonts can be challenging, as most OCR libraries are designed to recognize standard English fonts. However, there are a few approaches you can try to improve the accuracy of text extraction from images with 7-segment fonts using .NET Core.
Train a Custom Model: One option is to train a custom OCR model specifically for 7-segment fonts. This involves collecting a dataset of images with 7-segment fonts and manually labeling the text in each image. You can then use this dataset to train a machine learning model, such as a convolutional neural network (CNN), to recognize the 7-segment characters. There are frameworks available in .NET Core, such as TensorFlow.NET or ML.NET, that can assist with training custom models.
Preprocessing Techniques: Apply image preprocessing techniques to enhance the visibility of the 7-segment characters before performing OCR. This can include cropping and zooming to the text region, applying grayscale, black and white, and binarization filters, and adjusting contrast and brightness levels. Experiment with different combinations of preprocessing techniques to find the optimal settings for your specific images.
Combining OCR Libraries: Instead of relying on a single OCR library, you can try combining the results from multiple libraries. For example, you can use Tesseract or IronOcr to extract text from the image and then apply additional post-processing techniques to improve the accuracy of the extracted text.
Explore Other OCR Libraries: While Tesseract and IronOcr may not be suitable for 7-segment fonts, there may be other OCR libraries or APIs specifically designed for recognizing specialized fonts. Research and experiment with different OCR libraries to find one that can handle 7-segment fonts effectively.
Remember that extracting text from images with 7-segment fonts can be a complex task, and achieving high accuracy may require a combination of different techniques and approaches.