I'm working on an image classification task, and I am using Tesseract OCR for digit classification.
My main problem is receiving really poor results from the OCR for single digits.
After reading a lot online about improving Tesseract's performance, I am pre-processing the image with OpenCV using the following general scheme:
- finding contours
- bounding boxes
- cropping to the boxes to get single digits
- thresholding to get binary image
- padding the image by adding white background
- blurring.
I am getting something I'm fairly pleased with, for example:
I am calling Tesseract in the following way, emphasizing that I am expecting a single digit:
tesseract input.jpg output.txt - psm 10 digits
I thought Tesseract would surely identify it correctly, but it returns ".".
Does anyone have ideas for further improvements? I'm guessing I could train Tesseract for this specific font, but since I would be dealing with different fonts I'm hoping for a better approach.