Image Processing Reference
Smart Contrast is proved to be very useful especially in edge cases, which occur actually very
often, such as when the color of the characters in a text image is close to the color of the back-
ground, but nevertheless would do a great work whenever a contrast increase is desired.
I recommend the usage of Highlight filter rather than other filters in situations when the im-
age contains areas of narrow text (but sure one can also successfully use it when the text in the
image is wide). After applying this filter in the situation mentioned above, the success rate of
OCR on the filtered image is considerably increased.
Probably, the most important thing to mention regarding Highlight image filter is that it
eliminates the noise in the image, more exactly, it focuses on eliminating the noise located all
around the edges of characters in the text image by covering the isolated noise pixels with a
uniform contrasting colored area around the contour of the characters that forms the shadow
of the text. Beside the actions (sharpen, contrast, highlight) of this filter, the diagonal gradient
direction also contributes to removing the noise from the filtered image. The image could be
also a bit blurred (not too much) and still, the OCR is improved.
In few words, Highlight filter determines outstanding OCR results on text images in which,
• Text is narrow.
• Noise is present (could be around characters).
• Any other situation (e.g., lack of contrast, too much blurring).
The effect of Highlight image filter is detecting the edges and once detected it sharpens
them. As well, this filter increases the contrast in a selective manner, more exactly especially in
the areas of the text image where this is the most needed (i.e., edges of the characters), saving
the time that would be spent with contrasting the rest of the image. Overall, it highlights the
The visual effect on characters that are present in the image would be sharpening them and
increasing their contrast, creating shadows (behind them) that contrast with their color and
obviously highlighting them by creating a slightly 3D effect
As a result, Highlight filter consists of an appropriate combination of the following visual
effects, which contribute together to increased performances to 98% of OCR (by first applying
the filter before passing the text image to the OCR engine):
• Selective contrast.
Image filtering has also made an improvement in important areas, such as medicine, as de-
scribed by Barber and Daft [ 9 ], but lately, improving OCR performance using filtering has be-
come and will be a great challenge. When developing Smart Contrast, which is a nonlinear
image filter, I had as a starting point the Contrast filter. Beside Smart Contrast's incontestable
performances in improving OCR, this filter was actually just the triggering point for my fol-
lowing creation, namely, Highlight image filter, as well nonlinear, which overcomes the chal-
lenge of performing OCR with a very high success rate on text images.
 Lindeberg T. Edge detection and ridge detection with automatic scale selection. Diva
Academic Archive Int J Comput Vis. 1998;30:117-154. htp://www.csc.kth.se/cvap/ab-
stracts/cvap191.html [Accessed: 1st March 2014].