Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Sixth Indian Conference on Computer Vision, Graphics & Image Processing

PALM LEAF MANUSCRIPT/COLOR DOCUMENT IMAGE ENHANCEMENT BY USING IMPROVED ADAPTIVE BINARIZATION METHOD
SRIDHAR CHERALA PRITI REGE College of Engineering, Pune ppr@extc.coep.org.in http://www.coep.org.in

Abstract
This paper presents a new color document image binarization that is suitable for palm leaf manuscripts and color document images. The proposed method consists of two steps: a pre-processing procedure using low-pass Wiener filter, and contrast adaptive binarization for segmentation of text from the background. Firstly, in the pre-processing stage, low-pass Wiener filter is used to eliminate noisy areas, smoothing of background texture as well as contrast enhancement between background and text areas. Finally, binarization is performed by using contrast adaptive binarization method in order to extract useful text information from low quality document images.The techniques are tested on a set of palm leaf manuscript images/color document images. The performance of the algorithm is demonstrated on by palm leaf manuscripts/color documents distorted with showthrough effects, uneven background color and localized spot. Keywords: binarization, pre-processing, contrast adaptive binarization, palm leaf manuscript/color document images.

1. Introduction
Text is a most important feature for information retrieval applications. For these applications, as the first step, text in the image should be recognized for its semantic meanings. But current optical character recognition (OCR) technologies are mostly restricted to recognize text against clean backgrounds. Thus binarization techniques are used to separate text from image background and obtain a clean representation. Document binarization is the first step in most document analysis systems. The goal of document binarization is to convert the given input grayscale or color document into a bilevel representation. This representation is particularly convenient because most of the documents that occur in practice have one color for text (e.g. black), and a different color (e.g. white) for background. These colors are typically chosen to be high-contrast so that the text is easily readable by humans. Therefore, most of the document analysis systems have been developed to work on binary images. The performance of subsequent steps in document analysis (page
978-0-7695-3476-3/08 $25.00 2008 IEEE DOI 10.1109/ICVGIP.2008.64 687

segmentation or optical character recognition) heavily depends on the result of binarization algorithm. Over the last three decades many different approaches have been proposed for binarizing a grayscale document. Color documents can either be converted to grayscale before binarization, or techniques specialized for binarizing colored documents directly can be used. In most cases, color documents can be converted to grayscale without losing much information as far as distinction between page foreground (text) and background is concerned. The binarization techniques for grayscale documents can be grouped into two broad categories: global binarization and local binarization. Global binarization methods like Otsus method try to find a single threshold value for the whole document. Then each pixel is assigned to page foreground or background based on its gray value. Global binarization methods are very fast and they give good results for good quality documents. However if the illumination over the document is not uniform, for instance in the case of scanned book pages or camera-captured documents, global binarization methods tend to produce marginal noise along the page borders. For color document image binarization, global thresholding methods are not sufficient since document images usually are degraded and have poor quality including shadows, non-uniform illumination, low contrast, large signaldependent noise, smear and strains. Another class of documents is historical documents in which image intensities can change significantly within a document. Local binarization methods try to overcome these problems by computing thresholds individually for each pixel using information from the local neighbourhood of the pixel. These methods are usually able to achieve good results even on severely degraded documents, but they are often slow since the computation of image features from the local neighbourhood is to be done for each image pixel.

2. Related work
Most existing binarization techniques are thresholding related. Basically, these techniques can be categorized into two categories: global thresholding and local or adaptive thresholding.

Several thresholding methods had been developed and proposed to separate foreground text from background for gray scale document images. They are Otsu thresholding technique, Niblack method and Laplacian sign method. However, binarization methods proposed for gray-scale documents have not been well tested for color documents. Global thresholding methods compute threshold value for the entire image. Most of the basic global methods are based on the brightness histogram of images, which are called histogram-derived thresholds such as fixed point threshold, which is an alternative way in very high contrast images. Otsu thresholding was proposed in 1979 [6], as a selection method which was based on image histogram. The threshold operation is regarded as the partitioning of the pixels of an image into two classes such as objects and background at grey-level t, and an optimal threshold point can be determined by minimizing equations using within-class variance, between-class variance, and the total variance. In locally adaptive binarization methods, the threshold values are established pixel by pixel. These are computed on the basis of information contained in neighbourhood pixels. This method calculates a threshold surface over the entire image. If a pixel (x, y) in the input image has a higher gray level than the threshold surface evaluated at (x, y), then the pixel (x, y) is labeled as background, else as foreground. Niblack method [4] is based on the varying threshold over the image, based on the local mean and local standard deviation, where the threshold at pixel (x, y) is calculated by using sample and standard deviation values in a local neighbourhood of (x, y). However, determining optimum mask size is important factor and problem in Niblacks method to get well-classified images. Because small mask sizes adds additional noises, besides losing information by using large mask sizes. A new flexible technique of adaptive thresholding for document image binarization has been proposed by Sittisak Rodtook et al [3]. The threshold value is adjusted by applying Laplacian sign image. The Differential of Gaussian (DOG) is used to define the sign image. Operator based on the second direction derivative defines the sign image of document image. The basic idea behind this technique is to update the threshold value whenever the Laplacian sign of the input image changes along the raster scanned line. Normally, the regions, where the sign of pixel has changed, are the edge of components in the image, which presents a physical alteration of the image; proper threshold value should be adjusted in accordance with changeable component. These methods, proved their successes for text separation from gray scale document images. Thus Otsu, Niblack, Laplacian sign methods can be considered as the most efficient document image thresholding methods. These methods do not produce satisfactory results in processing of color document images since the contrast between the foreground and background is typically low and the color intensity of the background varies throughout the

image. Sauvola and Pietikainen [2] proposed a method that solves the problem of background noise by adding a hypothesis on the gray values of text and background pixels (text pixels have gray values near 0 and background pixels have gray values near 255) and compute local threshold value as

m (1  k (1 

s )) R

Where k is a constant set to 0.035 and R denotes the dynamic range of image gray-value standard deviation and is fixed to 128. But Sauvola method faces difficulties in dealing with images that do not agree well with the hypothesis when document images are captured at insufficient illumination, especially when the gray values of text and non-text pixels are close to each other. Meng-Ling Feng and Yap-Peng Tan [1] proposed an improved method (contrast adaptive binarization method or modified form of Christian method) for binarizing document images by adaptively exploiting the local image contrast. This method is used to determine local threshold value by computing local mean, local standard deviation, and minimum gray value in a primary local window and standard deviation in a larger/secondary local window. Shi and Govindaraju [10] have proposed an enhancement algorithm for palm leaf manuscripts. This method has four steps. In the first step, a transform based method is designed to wash out background colors of an image. At this stage, the text color level is still close to the bleached background. In the second step, to further enhance the contrast, histogram normalization algorithm is applied on the transformed image to elevate the text color away from the background. In the third step, to solve the uneven background problem, background normalization algorithm is applied which smoothes out the background. In the fourth step, isodata global thresholding method is applied for getting binary image. In this paper, a new method for segmentation of palm leaf manuscript images/color document images is presented. For robust and more efficient segmentation of color document images, low-pass wiener filter is used in pre-processing stage. It is used to eliminate noisy areas as well as smoothing of the document images. Binary image is obtained by using contrast adaptive thresholding method.The paper is organized as follows. Section 3 describes our proposed method in detail while in Section 4, our experimental results will be discussed. Finally, conclusions are drawn in Section 5.

3. Proposed method
The proposed method for elimination of noise in document images and binarization of low quality document images is described in this section. Method proposed by Shi et al [10] removes color background in the manuscript using four steps mentioned

688

above. This method gives good results on degraded document images. But, it fails when documents are suffered from uneven background and show-through effects. There is a need to develop an alternative method in order to improve these artifacts too. In this work, color document images are converted to grayscale images before giving input to the pre-processing. Grayscale image is obtained by using RGB2YIQ conversion and taking the luminance signal Y as grayscale output. The RGB2YIQ conversion is as follows. Y (0.299 R  0.587 G  0.1114 B) I (0.596 R  0.274 G  0.322 B )

I ( x, y )

(V  Vavg ) ( Is ( x , y )  mean ) V Repeat the above steps for all pixels in the image. mean 

3.2 Contrast Adaptive Binarization Method


Contrast adaptive thresholding method [1] is used to perform binarization based on image local gray value contrast in order to extract useful text information from low quality document images. The local threshold value is computed based on local mean, local standard deviation and minimum gray value in a primary local window and standard deviation in a larger local window (secondary local window). The procedure for calculating threshold value is given below. x Compute the mean value at each pixel from an average of the values in the local neighbourhood (e.g. 7x7 neighbourhood) of the pixel position in a primary local window.
mean

Q (0.211 R  0.523 G  0.312 B)

This avoids exhaustive computations needed in [10] for bleaching background and normalization. Noise removal and smoothing of an image is achieved in single stage using Wiener filter.

3.1 Pre-processing
Most document images contain noises that are introduced during the document generation or scanning phase. In order to make the analysis algorithms more robust to this noise, preprocessing stage is used before binarization of document images. For degraded and poor quality documents, a preprocessing stage of the grayscale source image is essential for the elimination of noisy areas, smoothing of background texture as well as contrast enhancement between background and text areas. Our pre-processing module involves an adaptive Wiener method based on statistics estimated from a local neighborhood around each pixel. The Wiener filter is commonly used in filtering theory for image restoration. The pre-processing stage consists of several steps for removing noise in document images, which has given below. x At each pixel position, compute the mean value from an average of the values in the local neighbourhood (e.g. 3x3 neighbourhood) of the pixel position.
mean

I
1

Where N is the total number of pixels and Ii is the pixel value at position of i. x Compute standard deviation (say s) in a primary local window by using the equation

s x x x
T

(1 / N ) ( I i  mean ) 2
i 1

Calculate the minimum grey level value M in a primary local window. Calculate the dynamic range of gray value standard deviation Rs in a larger local window (secondary local window). Compute threshold value T by using equation below
(1  a1) mean  k1 ( s 3 s ) ( mean  M )  k 2 ( ) 2 M Rs Rs

I
1

x x

Where 0.15 d a1 d 0.25 , 0 .05 d k1 d 0 .15 and 0.01 d k 2 d 0.05 If the pixel value in the image is greater than threshold then replace the pixel value by 255 otherwise replace by 0. Repeat the above steps for all pixels in the image.

Where N is the total number of pixels and Ii is the pixel value at position of i. x Compute variance at 3x3 neighbourhood V by using equation below.
V (1 / N )

4. Experimental results
The proposed approach for thresholding palm leaf manuscript/color document images have been carried out on different types of documents. These images contain variety of intensity of characters and backgrounds, affected by showthrough effects and varying intensity thought the background.

( I i  mean ) 2

i 1

x x

Calculate the average of all estimated variances for each pixel in the neighbourhood Vavg. Transform the gray scale source image Is(x, y) into filtered gray scale image I(x, y) by using low-pass wiener filter which has the formula given below.

689

(a)

(b)

(c)

(d)

(e)

Figure 1 Binarization of palm leaf manuscript image: (a) Original image (b) Shi and Govindaraju method (c) Sauvola method (d) Contrast adaptive method (e) Proposed method

690

(a)

(b)

(c)

(d) (e) Figure 2 Binarization of color document image: (a) Original image (b) Shi and Govindaraju method (c) Sauvola method (d) Contrast adaptive method (e) Proposed method

691

Figure 1 shows binarization of palm leaf manuscript image. Shi and Govindaraju method with threshold value is selected as 240 is shown in Figure 1(b), Sauvola method with k=0.2 is shown in Figure 1(c) and contrast adaptive thresholding method with a1=0.25, k1=0.15, k2=0.01 is shown in Figure 1(d). Finally, our proposed method is shown in Figure 1(e) with a1=0.15, k1=0.1 and k2=0.05. Figure 2 shows binarization of color document image. Shi and Govindaraju method with threshold value is selected as 210 is shown in Figure 2(b), Sauvola method with k=0.1 is shown in Figure 2(c) and contrast adaptive thresholding method with a1=0.25, k1=0.15, k2=0.01 is shown in Figure 2(d). Finally, our proposed method is shown in Figure 2(e) with a1=0.18, k1=0.1 and k2=0.05. In Figure 1(d) and 2(d), the characters are broken whereas in Figure 1(e) and 2(e), the continuity of characters is maintained, as shown in the enlarged areas. In this paper, the performance of our scheme is compared with Shi and Govindaraju method, sauvola local thresholding method and contrast adaptive thresholding method. x In Shi and Govindaraju approach, the segmentation of text from background is well separated, but some of the text areas are not properly extracted and background noise is not removed. x The approach of Sauvola et al. solves the background noise problem that appears in Niblacks approach but in many cases characters become extremely thinned and broken. x In Contrast adaptive thresholding method, text is well separated from the background and text is easily readable even the documents distorted with showthrough effects and uneven background, but, in the background, some noise is still present. x The proposed method has good performance compared with all other methods and performs well even when the documents are very noisy, uneven background and affected by show-through effects. x In Meng-Ling Feng and Yap-Peng Tan method [1], the background noise is not completely removed and most of the characters (text) are broken whereas in our proposed method, background is cleaned and continuity of characters is maintained. The input images are having different backgrounds (darker and lighter backgrounds in Fig. 2(a)), different text contrasts (in Fig. 1(a)) in the paper. Text extraction in darker background is very difficult (If background is eliminated, text is not visible properly vice-versa). So, standard segmentation technique doesnt give good results on the source (input) images in the paper.

Compared with other local thresholding methods, our proposed method performs better for color document images, even those documents distorted with show-through effects, uneven background, and low contrast and localized spot. This technique is based on two steps: a pre-processing procedure using low-pass wiener filter, and contrast adaptive binarization for segmentation of text from the background.

References
[1]
Meng-Ling Feng and YapPeng Tan, Adaptive Binarization Method for Document Image Analysis, School of Electrical and Electronic Engineering Nanyang Technological University, Singapore, 2004. Sauvola,J., Pietikainen, M, Adaptive Document Image Binarization, Pattern Recognition, pp. 225-236, 33, 2000. Sititsak. Rodtook, Yuttapong Rangsanseri, Adaptive Thresholding of Document images based on Laplacian sign, Information Technology: Coding and Computing, Proceedings, International Conference, pages 501 505, 2001. Niblack W, An Introduction to Digital Image Processing, Prentice-Hall, Englewood Cliffs, NJ, pp. 115116, 1986. Mukesh C. Motwani, Mukesh C. Gadiya, and Rakhi C. Motwani, Survey of Image Denoising Techniques,Image Process Technology, Inc. University of Pune, India. N.Otsu, A threshold selection method from gray level histogram. IEEE Transactions in Systems, Man, and Cybernetics, 9:6266, 1979. Y.Liu and S.N.Srihari, Document image binarization based on texture features, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol.19, nr5, 540544, 1997. P.K.Sahoo, S.Soltani, A.K.C.Wong, A survey of thresholding technique, CVGIP, 41, 233260, 1988. C. M. Tsai and H. J. Lee, Binarization of color document images via luminance and saturation color features, IEEE Trans. on Image Processing 11, pp. 434451, April 2002. Shi Z, Srirangaraj S and Govindaraju V, Digital Enhancement of Palm Leaf Manuscript Images using Normalization Techniques, Center of Excellence for Document Analysis and Recognition (CEDAR,), State University of New York at Buffalo, Amherst, USA, 2004. Shi Z and Govindaraju V, Historical document image enhancement using background light intensity normalization, 17th International Conference on Pattern Recognition, Cambridge, UnitedKingdon, 23-26, August, 2004.

[2] [3]

[4] [5]

[6]

[7]

[8]

[9]

[10]

[11]

5. Conclusion
In this paper, a new adaptive method for binarization of palm leaf manuscript/color document images is proposed.

692

You might also like