I am working on an OCR project whose goal is to read the stamped-in serial number off of a metal plate:
I am using OpenCV to prepare the image for OCR, and using Tesseract for the OCR itself. This is the ideal process:
- In a picture of the entire plate, crop to the general location of the serial number.
- Prepare the cropped image for OCR.
- Apply OCR.
My current process is this:
- Manually crop to serial number.
- Convert to grayscale.
- Sharpen.
- Use Canny edge detection.
- Run Tesseract OCR.
However, I am having very limited success. My main questions are:
- What sort of processing optimizes OCR? Is doing edge detection a good start?
- Can I perhaps use the stamped text's font to my advantage?
- Can I use the "color" of the text (as opposed to the gray of the metal or the black/white of the labels) to my advantage?