I am applying OCR against subtitle in TV footage. (I am using Tesseact 3.x w/ C++) I am trying to split text and background part as a preprocessing of OCR.
Here's the original image:
And, preprocessed image:
The OCR result is: Sicemn clone
As the above preprocessed image shown, there're some "fog" remained around the letter which prevents OCR module to do their job properly.
Is there any way to recognize those "fog" programatically to remove, or do some image processing to remove/reduce it from the preprocessed image?
Since preprocessed logic is heavily optimized to handle different images, I rather want to find a way to "clean" the preprocessed image, than modifying preprocessed logic (since optimizing to this pics can affecting to other pics)
Any suggestion is very welcome.
Update
Apparently, sixela's answer is great, and will work with most of the case. The case it does not work is background also include similar color of text
Example of not working case:
Example of result:
Seemingly, Gaussian filter seems to cause a problem in this types of footage. This implies, different footage may requires different approach.