Reputation: 15
For one of the projects I am working on, I am trying to detect digits on a food tray image using OCR. I used Tesseract 4 in python for this purpose. But it fails to correctly detect the numbers for most of the images I have. I tried various image preprocessing such as blurring, threshold, sharpening, erosion and dilation using OpenCV to improve the accuracy. But nothing seems to work. I am newbie to computer vision, so any suggestions or alternate solutions for this would be of great help. I have attached the images in the link below. thanks in advance.
Upvotes: 1
Views: 1464
Reputation: 1032
You need a stronger text detection which will crop the text-candidate region for you.
The processing will be a little more complicated as follow:
Inside OpenCV's DNN modules have the great text detection script called : text_detection.py which is used EAST text detection. Using your sample images, i can extract the following text-candidate region in green rectangle. So the next steps is the above step 2 and 3.
For sure, EAST is not trained for your scenario so 100% accuracy is impossible. You could try to gather data and train EAST for your scenario. But i think, the default one will give you more than 90% in accuracy.
Hope this help.
Upvotes: 2