Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Preprocessing before doing OCR (tesseract, OpenCV)

To get some better results with the OCR library tesseract I would do some preprocessing, but haven't got the right idea what steps could help me.

enter image description here enter image description here

I have tried to resize the image with the factor 15 and applied an adapted threshold (see images) but this results in "wavy" characters, which can't be detected with the tesseract OCR library. At the bottom you can find my Link to the images via Dropbox. The original image size is 115x18px, with an character height of 10px.

I would like to extract the characters from the background. What steps could lead to a better result? Should I use another OCR library instead of tesseract for the OCR part? What experiences in general have you made when using tesseract for text detection? Or can you prefer another library, or a commercial one?

Dropbox Link to example image

Update 19.6.15:

Original Image OTSU Thresholded image

OTSU threshold delivers better results as adaptive threshold. Will give an update about the other answers in the next days!

Update 01.07.2015 Have another example image, where the serialnumber should be recognized with using tesseract. Since the font size is very small the recognition result is not very good. Any ideas what kind of methods could help here?

Another example image

Answer*

Cancel