[IEEE 2009 Second International Conference on Machine Vision - Dubai, UAE (2009.12.28-2009.12.30)]...

5
Adaptive Binarization of Ancient Documents A.Venkata Srinivasa Rao ECE Dept, SVEC, Tadepalligudem Tadepalligudem, Andhra Pradesh, India [email protected] Nenkkanti Venkata Rao ECE Dept, SVEC, Tadepalligudem Tadepalligudem, Andhra Pradesh, India [email protected] L.Pratap Reddy ECE Dept, JNTU, Hyderabad Hyderabad, Andhra Pradesh, India [email protected] Golla Sunil ECE Dept, SVEC, Tadepalligudem Tadepalligudem, Andhra Pradesh, India [email protected] T.S.Krishna Prabhu TCS, Hyderabad Hyderabad,, Andhra Pradesh, India [email protected] A.S.C.S.Sastry ECE Dept, SVEC, Tadepalligudem Tadepalligudem, Andhra Pradesh, India [email protected] AbstractIt is common for libraries to provide public access to historical and ancient document image collections. Such document images to require specialized processing in order to remove background noise and become more legible. In this paper the proposed approach is adapted from the kavallieratov’s algorithm for cleaning background noise from the ancient documents by iterative global thresholding and local thresholding technique. Finally the image quality is enhanced by using morphological technique and compared with other methods in the process of cleaning. Keywords- Binarization, Document image Processing, I. INTRODUCTION The life of every person is documented in some measure. Some documents have a legal origin (such as property deeds) and should be kept safely, while others are historically significant (such as plans, accounts, journals and some diaries and correspondence), but all documents can become archives. Collections of cultural heritage documents are most of the time digitized images. These precious documents are now available on the internet and need manual annotations to make their content accessible and exploitable. Most family documents are made of paper, although some (principally old property deeds) are made of parchment, which is a material made from the limed skins of sheep, goats or similar animals. These materials are at risk from damp, mould, insects, pollution, unsuitable packaging and frequent or careless handling. All documents are damaged by light, particularly ultraviolet light which is present in daylight. Having original documents at home or visiting a local archive or history centre gives you the opportunity to handle old materials and historical evidence, but there is a price to pay. Frequent handling results in the steady physical wear and tear of the original, possibly resulting in eventual loss of the document. In addition, the documents are vulnerable to damage caused by fluctuating environments and light. There is a need for establishing museums for preserving ancient documents and also creating awareness among the public on the importance of these documents. So Binarization plays an important role in the image document analysis for removing the background noise and improving the readability of the document. There are two Binarization techniques which are global threshold and local threshold. The Global threshold defines global value for all the pixels of the image in order to separate them as text or background [1]. This method is not able to remove noise that is not uniformly distributed in the image. On the other hand, local threshold provides an adaptive solution for the images with different background intensities, so that the threshold value varies according to the properties of all image area [5,7]. There are many general purpose Binarization methods capable of dealing with any document image which has complex backgrounds. These methods are completely based on the local or Adaptive threshold values. Bensons calculated local threshold using the neighbours[2], Niblack calculated the threshold at each pixel using local mean and Standard deviation[3], Sauvola applied two algorithms in order to calculate a different threshold for each pixel[6]. In this paper the proposed approach is found suitable for removing background noise from all types of old documents. The entire process is carried out by using 2009 Second International Conference on Machine Vision 978-0-7695-3944-7/10 $26.00 © 2010 Crown Copyright DOI 10.1109/ICMV.2009.8 22

Transcript of [IEEE 2009 Second International Conference on Machine Vision - Dubai, UAE (2009.12.28-2009.12.30)]...

Page 1: [IEEE 2009 Second International Conference on Machine Vision - Dubai, UAE (2009.12.28-2009.12.30)] 2009 Second International Conference on Machine Vision - Adaptive Binarization of

Adaptive Binarization of Ancient Documents A.Venkata Srinivasa Rao

ECE Dept, SVEC, Tadepalligudem Tadepalligudem, Andhra Pradesh, India

[email protected]

Nenkkanti Venkata Rao ECE Dept, SVEC, Tadepalligudem

Tadepalligudem, Andhra Pradesh, India [email protected]

L.Pratap Reddy ECE Dept, JNTU, Hyderabad

Hyderabad, Andhra Pradesh, India [email protected]

Golla Sunil ECE Dept, SVEC, Tadepalligudem

Tadepalligudem, Andhra Pradesh, India [email protected]

T.S.Krishna Prabhu TCS, Hyderabad

Hyderabad,, Andhra Pradesh, India [email protected]

A.S.C.S.Sastry ECE Dept, SVEC, Tadepalligudem

Tadepalligudem, Andhra Pradesh, India [email protected]

Abstract— It is common for libraries to provide public access to historical and ancient document image collections. Such document images to require specialized processing in order to remove background noise and become more legible. In this paper the proposed approach is adapted from the kavallieratov’s algorithm for cleaning background noise from the ancient documents by iterative global thresholding and local thresholding technique. Finally the image quality is enhanced by using morphological technique and compared with other methods in the process of cleaning.

Keywords- Binarization, Document image Processing,

I. INTRODUCTION The life of every person is documented in some measure. Some documents have a legal origin (such as property deeds) and should be kept safely, while others are historically significant (such as plans, accounts, journals and some diaries and correspondence), but all documents can become archives. Collections of cultural heritage documents are most of the time digitized images. These precious documents are now available on the internet and need manual annotations to make their content accessible and exploitable. Most family documents are made of paper, although some (principally old property deeds) are made of parchment, which is a material made from the limed skins of sheep, goats or similar animals. These materials are at risk from damp, mould, insects, pollution, unsuitable packaging and frequent or careless handling. All documents are damaged by light, particularly ultraviolet light which is present in daylight. Having original documents at home or

visiting a local archive or history centre gives you the opportunity to handle old materials and historical evidence, but there is a price to pay. Frequent handling results in the steady physical wear and tear of the original, possibly resulting in eventual loss of the document. In addition, the documents are vulnerable to damage caused by fluctuating environments and light. There is a need for establishing museums for preserving ancient documents and also creating awareness among the public on the importance of these documents. So Binarization plays an important role in the image document analysis for removing the background noise and improving the readability of the document. There are two Binarization techniques which are global threshold and local threshold. The Global threshold defines global value for all the pixels of the image in order to separate them as text or background [1]. This method is not able to remove noise that is not uniformly distributed in the image. On the other hand, local threshold provides an adaptive solution for the images with different background intensities, so that the threshold value varies according to the properties of all image area [5,7]. There are many general purpose Binarization methods capable of dealing with any document image which has complex backgrounds. These methods are completely based on the local or Adaptive threshold values. Bensons calculated local threshold using the neighbours[2], Niblack calculated the threshold at each pixel using local mean and Standard deviation[3], Sauvola applied two algorithms in order to calculate a different threshold for each pixel[6]. In this paper the proposed approach is found suitable for removing background noise from all types of old documents. The entire process is carried out by using

2009 Second International Conference on Machine Vision

978-0-7695-3944-7/10 $26.00 © 2010 Crown Copyright

DOI 10.1109/ICMV.2009.8

22

Page 2: [IEEE 2009 Second International Conference on Machine Vision - Dubai, UAE (2009.12.28-2009.12.30)] 2009 Second International Conference on Machine Vision - Adaptive Binarization of

Iterative global thresholding and local threshold value of the image. [4]. This technique is applied to selected areas in the image where the noise is present.

II.ALGORITHM DESCRIPTION

Iterative Global Thresholding A recent method using Iterative Global Thresholding for

removing noise & enhancing historical document images is presented in [7].It selects a global threshold for a document image based on iterative procedure. In each iteratation the following steps are performed.

The transformation of greyscale images to black and

white is major problem from the past decades. Let us consider greyscale image is applied as input, where the tones of the foreground is out of range over the background. The input image is described by the equation

I ( x, y ) = r, r є s[0,1] ----------- (1)

Where x and y are the horizontal and vertical coordinates of the image I(x,y), and r can take any value between 0 and 1 where r=1 stands for white colour and r=0 stands for black colour. By using proposed algorithm the intermediate tones are shifted to either foreground or background. The algorithm is based on the fact that a document image includes very few pixels of useful information (foreground) compared to the size of the image (foreground+ background). The fact is that rarely the amount of black pixels exceeds the 10% of the total pixels in the document. Taking advantage of this fact, it is assumed that the average value of the pixel values of a document image is determined mainly by the background even if the document is quite clear. Using this fact our method consists of two procedures that are applied alternately. In the first part the average pixel value of the image is calculated and then subtracted from the image, while in the second part of the algorithm the histogram is stretched so that the remaining pixel are distributed in all the gray scale tones. After each iteration some amount of pixels are moved from foreground to background. The iterations stop based on the following criterion:

│Ti-Ti-1│< 0.001 This algorithm works well on historical document images given that foreground is darker than background. It does not require any complex calculations , takes less time and money. Mathematical Analysis:

Considering the equation (1) the calculation of the Tp threshold used for an MxN document image, is given by the formulae:

∑ ∑ , ------------- (2)

Equation (2) is used to find the mean value of the image I(x,y). Where Ip is the greyscale image. Keeping in mind that 1s stand for background and 0s stand for foreground, the equation (3) used for the subtraction and provides the image after subtraction which is denoted by Is ( x,y).

Is (x, y) = 255- Tp + Ip(x, y) ------------ (3) By using the equation (4) performing the image

equalization after subtraction , 1 , ------------- (4)

Where Is is given by the equation (3) and Ei is the minimum pixel value in the image Is during i-th repetition just before the histogram equalization

III. THE PROPOSED APPROACH

The proposed hybrid approach includes both global and local thresholding techniques to deal with noisy historical documents. First IGT (Iterative Global Thresholding) is applied to whole document. Then, identify the areas which still contain noise and re-apply IGT to those noise areas . The proposed approach contains the following steps. i) applying IGT to whole document ii) detecting the areas which still contains noise iii) re-applying IGT to the detected noisy areas. Detecting the areas still containing noise is based on the fact that such areas contain more black pixels on averge in comparison with other areas. The image is divided into fixed size of nxn . In each segment, frequency of black pixels is calculated. The segments which satisfy the following criterion are selected as noisy areas. f(S) > m+ks Where f(S) is the frequency of black pixels in the segment S,’ m’ and’ s’ are the mean and standard deviation of the black pixel in the entire image. The selected segments form areas by using the row by row labelling algorithm. The detected noisy areas are re-processed separately by applying IGT to each area. The iterations stop when the number of iterations exceeds the number of iterations required for the IGT on entire image or the following criterion is satisfied.

23

Page 3: [IEEE 2009 Second International Conference on Machine Vision - Dubai, UAE (2009.12.28-2009.12.30)] 2009 Second International Conference on Machine Vision - Adaptive Binarization of

│Ti-Ti-1│< 0.001 Ti is the threshold used in ith iteration. The parameter ‘k’ determines the sensitivity of detection method. If k is large, then less number of areas will be selected. Then the areas which still need improvement will not be selected. If k is small, then more number of areas will be selected. Then the areas still need improvement will be selected together with the areas in which noise has already been removed. If we re-apply IGT to those noiseless areas , then the computational time and cost of applying IGT will be increased. An important factor for successful re-application of IGT in the selected areas is the size of the segments nxn. Small segment size means more areas but small areas. Then it is possible to adapt the area which contains noise in more detail. But these resulting small areas will not provide enough information for successfully re-applying the IGT algorithm. For large segment sizes, bigger areas are selected. These bigger areas cannot be easily adapted to a part of image that still contains the noise. As a result , the final image may contain neighboring areas that have dissimilar amount of back ground noise.

IV. EXPERIMENTAL RESULTS

This algorithm is tested on certificates that are 20 years old. Some part of the noise is removed by IGT and the rest of the noise is removed by selecting local value. The quality of the image after applying IGT and Adaptive technique is improved by using morphological technique which means the resultant image is Dilate with structural element. The processing of an image after applying IGT & Adaptive Threshold is shown in Fig.1. It fails to clean the images of even backgrounds. So it is effectively working on the images with un-even backgrounds.

a) Original image

(b) Image after IGT

(c) Image After Adaptive Threshold

(d) Image after Dilation

Fig.1. Clean ages after applying the IGT & Adaptive

algorithm On noisy images from Top to Bottom

Gray scale image

Image after IGT

24

Page 4: [IEEE 2009 Second International Conference on Machine Vision - Dubai, UAE (2009.12.28-2009.12.30)] 2009 Second International Conference on Machine Vision - Adaptive Binarization of

This algorithm is tested on 30 images of even background but it fails to clean the noise from the background and the clarity of the original is somewhat missing. It is shown in Fig2.Comparisons of different algorithms on one sample image is sown in Fig3.

(a) Grayscale image

(b) Image after IGT

(c) Image after Adaptive Threshold

Fig.2. Clean images after applying the IGT & Adaptive algorithm On noisy images from Top to Bottom

RFERENCES

[1] N.Otsu, “A threshold selection method from a gray level histograms”, IEEE Trans.Systems, Man, Cybernet., 9(1),1979, pp. 62- 66

[2] J.Berson, “ Dynamic thresholding of gray-level images,” 8 th Int. Conf. on pattern recognition, 1986, pp. 1251-1255

[3] W. Niblack “ An Introduction to Digital Image Processing”, Prentice Hall, 1986, pp. 115-116

[4] George D.C. Cavalcanti, Edducardo F. A. Silva “A Heuristic Binarization Algorithm for Documents with Complex Background”,1-4244-0481, 2006 IEEE

[5] B.Gatos, I. Pratikakis, and S.J.Perantoni, “ Adaptive degraded document image binarization,” Pattern recognition, vol.39,pp.317- 327,2006

[6] J.Sauvola, M.Pietikainen, “ Adaptive Document Image Binarization ,” Pattern Recognition, 33, 2000,pp.225-236

[7] E.Kavallieratou, “ ABinarization Algorithm Specialized on document images and photos,” 8th Int. Conf. on Document Analysis and Recognition, 2005, pp. 463-467.

25

Page 5: [IEEE 2009 Second International Conference on Machine Vision - Dubai, UAE (2009.12.28-2009.12.30)] 2009 Second International Conference on Machine Vision - Adaptive Binarization of

(a) Otu’s Method

(b) Calvacanti (T1 & T2) Method

(c) Proposed Method

Fig.3. Comparison of different algorithms with proposed algorithm

Otos

Image after AND operation

Image after Adaptive

26