Rough edged text after applying Otsu's threshold for text extraction

217 views Asked by At

I am trying to separate text from background by using Otsu's threshold mechanism. Even though the algorithm separates text from background, the resultant text has rough edges, which in turn decreases the accuracy of text recognition.

The input image and the output image after applying threshold are given below:

Text image Image after applying threshold

What can I do to remove just the background? I want to retain the text as it is in the original image with clear-cut edges and no breaks or thinning.

1

There are 1 answers

0
Piglet On BEST ANSWER

You would get better results using a local threshold operation instead of a global one like Otsu.

But you should not expect too much. Smooth looking edges are the result of gradient transitions between forground and background. You will most likely have pixels of the same value that you would consider foreground and others you would consider background in the same character...

If you want better results you should improve the quality of your input image.