The first step in the preprocessing stage is to convert an
image to binary images. In a binary image the value of the
pixels are either 0 or 1. The background contains white pixels
and the foreground contains the black elements. The proper
conversion largely depends on the conversion level. In order to
enhance the quality of the input image the image needs to be
cleaned. For further processing the image is passed through a
set of filters whose primary task is to clean the input image.
The text and non text regions are separated in the preprocessing
step. First the input image is filtered by a mean filter. In this
method the pixels are replaced by mean values of its
neighboring pixel values. The mean filter reduces the noises
but blurs the edges. The equation for a mean filter is given
below where, Let Sxv represent the set of coordinates in a
rectangular sub-image window of size m X n, centered at point
(x, y).The arithmetic mean filtering process computes the
average value of the corrupted image g(x, y) in the area defined
by Sxy.The value of the restored image at any point (x, y) is
simply the arithmetic mean computed using the pixels in the
region defined by S