degraded documents recovering by using adaptive binarizations … · available online at...

10
Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196 © 2014, IJCSMC All Rights Reserved 187 Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology ISSN 2320–088X IJCSMC, Vol. 3, Issue. 2, February 2014, pg.187 – 196 RESEARCH ARTICLE Degraded Documents Recovering by Using Adaptive Binarizations and Convex Hull Concept Mahendar.R 1 , Navaneetha Krishnan.S 2 , Roshini Ravinayagam 3 , Prakash.P 4 1 M.E VLSI Design, Sri Eshwar College of engineering, Tamilnadu, India 2 M.E Applied Electronics, Sri Eshwar College of engineering, Tamilnadu, India 3 M.E VLSI Design, Sri Eshwar College of engineering, Tamilnadu, India 4 M.E Power Electronics and Drives, Easa college of engineering and technology, Tamilnadu, India 1 [email protected], 2 [email protected], 3 [email protected], 4 [email protected] Abstract— As a challenging task involved in recovering an original contents of the various degraded documents due to overlapping of both text and images, fatherly image of a damaged book page often suffers from the various scanning collapse known as scanning shading, dark borders noises and foreground problem. These collapses will degrade the qualities of the scanned documents and cause many problems in the subsequent process of document image analysis. In this paper, we have to propose the two concepts for recovering original quality contents of degraded documents. An adaptive binarizations technique that shows these issues reductions by using adaptive pixel per matching. The adaptive pixel matching is a combination of the local image contrast and the local image gradient that is tolerant to text and background variation caused by different types of document degradations. Convex hull algorithm method proves to be outstandingly effective for image shading correction and dark border noise removal. It can restore a desired blackness free document and meanwhile yield an illuminated surface of high quality. Keywords— adaptive binarization, convex Hull, combinational Hungarian algorithm, pixel per symbol matching I. INTRODUCTION Document recovering is one of the recent researching processes, from the proposed idea, adaptive binarization is performed in the Preprocessing stage for degraded document analysis and it direct at segment the foreground text from the document background. A fast and accurate document image binarization technique is important for the ensuing document image processing tasks such as optical character recognition (OCR). Though document image binarization has been studied for many years, the thresholding of degraded document images is still an unsolved problem due to the high inter/intra variation between the text stroke and the document background[2],[3]. Form researches document the problem by doing research on it and attempting to locate and resolve its root cause. In addition, the value of removing the problem from the environment should be greater than the effort and

Upload: others

Post on 10-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 187

Available Online at www.ijcsmc.com

International Journal of Computer Science and Mobile Computing

A Monthly Journal of Computer Science and Information Technology

ISSN 2320–088X

IJCSMC, Vol. 3, Issue. 2, February 2014, pg.187 – 196

RESEARCH ARTICLE

Degraded Documents Recovering by Using Adaptive Binarizations and Convex Hull Concept

Mahendar.R1, Navaneetha Krishnan.S2, Roshini Ravinayagam3, Prakash.P4

1M.E VLSI Design, Sri Eshwar College of engineering, Tamilnadu, India 2M.E Applied Electronics, Sri Eshwar College of engineering, Tamilnadu, India

3M.E VLSI Design, Sri Eshwar College of engineering, Tamilnadu, India 4 M.E Power Electronics and Drives, Easa college of engineering and technology, Tamilnadu, India

1 [email protected], 2 [email protected], 3 [email protected], 4 [email protected]

Abstract— As a challenging task involved in recovering an original contents of the various degraded documents due to overlapping of both text and images, fatherly image of a damaged book page often suffers from the various scanning collapse known as scanning shading, dark borders noises and foreground problem. These collapses will degrade the qualities of the scanned documents and cause many problems in the subsequent process of document image analysis. In this paper, we have to propose the two concepts for recovering original quality contents of degraded documents. An adaptive binarizations technique that shows these issues reductions by using adaptive pixel per matching. The adaptive pixel matching is a combination of the local image contrast and the local image gradient that is tolerant to text and background variation caused by different types of document degradations. Convex hull algorithm method proves to be outstandingly effective for image shading correction and dark border noise removal. It can restore a desired blackness free document and meanwhile yield an illuminated surface of high quality. Keywords— adaptive binarization, convex Hull, combinational Hungarian algorithm, pixel per symbol matching

I. INTRODUCTION Document recovering is one of the recent researching processes, from the proposed idea, adaptive binarization is performed

in the Preprocessing stage for degraded document analysis and it direct at segment the foreground text from the document background. A fast and accurate document image binarization technique is important for the ensuing document image processing tasks such as optical character recognition (OCR). Though document image binarization has been studied for many years, the thresholding of degraded document images is still an unsolved problem due to the high inter/intra variation between the text stroke and the document background[2],[3]. Form researches document the problem by doing research on it and attempting to locate and resolve its root cause. In addition, the value of removing the problem from the environment should be greater than the effort and

Page 2: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 188

cost to do so [3]. Relating methods usually employ local or adaptive binarization techniques to remove the non-uniform shading. The propose methods can produce very desirable outputs in textual regions that are favourable in degrade image documents too; the Hungarian algorithm is well suited for this process.

Figure 1: Degraded document image examples (a) overlap character (b) blackness document

Figure 1 shows the examples of overlap character formations and blackness formations of degraded documents, here adaptive binarizations technique used because of Hungarian method involved for this purpose, Hungarian is a combinatorial optimization algorithm that solves the assignment problem in polynomial time and which anticipated later primal-dual methods.. However, since the gray levels are greatly reduced after image binarization, the photographic regions might thus lose some meaningful greyscale details. Moreover, marginal noise another kind of document noise, may be introduced after image binarization here convex hull method have to be proposed.

The shading image is assumed to be a parametric surface, which only has several unknown parameters. These parameters are then estimated via Least Squares (LS) methods or Maximum Likelihood (ML) methods. However, since the scanning shading may be much different on the top and the bottom side of a page, depending on the forces applied to the book spine during the scanning process, the widely used cylindrical model will fail in this case. Actually, the variations of shading in a scanned book page are too complicated to be modelled into a few unknown parameters, particularly when dark border noises are also involved.[3],[8],[9]. In this paper, an efficient technique that targets are removed dark borders and correcting the non uniform shading in a scanned book page. Finally, we find the shading image of a scanned single page is a quasi-concave function. Fatherly the illumination surface can be easily reconstructed from its upper level sets via convex hulls.

II. Techniques of Image Normalizations

Image normalization is involving to correct the pose and illumination changes. Lot of approaches for image normalization,

to achieve invariance to data formations conditions and to allow biometrics to operate in uncontrolled settings, have been proposed and explored. We start to pose changes, which may induce greater variability in the appearance of a single individual than that holding among different individuals. Although such differences do not hinder the human ability to recognize a person, they can heavily degrade the performances of an automatic recognition system. The frontal image of a face in non frontal poses can be reconstructed from a single image, by exploiting affine transformations [6],[11],[12]. The limit of this method is the use of only three face vertical stripes, identified through eye centers, to compute the suitable transformation. This might not be sufficient for a satisfying result. A higher number of regions (patches) are exploited in, under the assumption that there exists a linear mapping between sub regions (patches) of non frontal and frontal images of the same subject.

Page 3: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 189

Figure 2: Image Normalizations Rules

In figure[6],Normalization is a term borrowed from the database domain and applies to rules in a similar way that it applies

to database and service functional context. Similarly, rules normalization defines that the amount of (functional) redundancy across rules is minimized. Similarly to service normalization, this pattern supports the separation of concerns. A comparison among many illumination normalization algorithms concludes that the Self - Quotient Image (SQI) and Local Binary Patterns (LBPs) represent the best solution, in terms of simplicity, speed, and authentication accuracy, when used with Eigen-space-based nearest-neighbour classifiers[10],[13]. We therefore chose SQI. Generative methods provide a 3-D alternative to the aforementioned approaches, which try to perform both kinds of normalization within the same algorithm[4].The derived 3-D model is then used to synthesize a wide set of false views in a different pose and illumination conditions. The core underlying hypothesis is that, for each fixed pose of the object/face, all such views form a convex cone in the image space. A metric estimating the confidence in an identification result, given the quality of a biometric acquisition, is, however, hard to design. Such metrics should also depend on the classification method used as different algorithms might be sensitive to specific problems/settings in the input while being quite robust to other challenges. In global thresholding, the same threshold value is applied to every pixel of the input image. In practice, because of non-uniformity of the background in the input image, the thresholding with global threshold provides poor result [2],[3],[7]. In this case, local thresholding with threshold adjusted to the local properties of the image should be applied to obtain a more reliable binary image. From below equations we have to analyze convex hull methodology

Con(p,q) =fmax(p,q)-I(p,q)/fmax(p,q)+€ (1)

Where I (p, q) denotes the intensity of the pixel (p,q).fmax(p,q) refers to the maximum image intensities within a local neighbor window. The term is a positive, but infinitely small number, which is added in case the local maximum is equal to 0. And Con(p,q) denotes the contrast value of the estimating pixel (p,q).

P(q) = {foreground, con(q)/conf > conB/ con(q)││IF/IB :background ,otherwise (2)

Where P (q) denotes one uncertain pixel, Con(q); denote the corresponding contrast and intensity features, respectively. ConF; IF Refer to the mean contrast and intensity feature values of foreground pixels within a local neighborhood window, respectively. And ConB; IB refer to the mean contrast and intensity feature values of background pixels within a local neighborhood window, respectively.[3]

III. Locally Adaptive Binarization

Calculation of the local adaptive threshold is based on information collected in a window surrounding the pixel to be processed [9],[14]In our work, we considered the functions of binarization of degraded documentations and drawings under assumptions that quality is satisfactory and illumination over the image is smooth. The combinations of two binarizations technique are shown. The main attention was paid to the development of algorithms for binarization of large size images. The term “large size

Page 4: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 190

image” means that the size of the image exceeds the size of available computer memory. To achieve this goal, we, first apply locally adaptive thresholding technique, and then perform the binarization of large image in file-to-file manner without keeping the whole image in memory. The input image is sequentially loaded and processed in stripe-by-stripe way so that partition of the image for loading and processing does not depend on the part of the image for the analysis.

Figure 3: examples of combinations of Otsu’s binarization result and Sauvola’s binarization result

The designed scheme for locally adaptive binarization of large grayscale images has been tested with grayscale images acquired by scanner of projective type. The provided tests have shown high efficiency of the algorithm for grayscale images with quasi-linear, non-uniformity of background illumination [1]. The text is then extracted based on the local threshold that is estimated from the detected text edge pixels. Some post-processing is further applied to improve the document binarization quality.

IV. Image Reconstructions Principle

A) Distance-Transform Based Methods The method is to first calculate the Distance Transform (DT) of the binary image. Distance Transform is shown for an

object point at a distance from the pixel to the nearest background paint. At first Distance Transform is performed, and then skeletal points are detected on the DT using some rules. The choice of the distance metrics depends on the task to be solved. This analysis of methods, aims the thresholding based on the shape properties of the histogram under the text regions. Basically two major peaks and an intervening valley are investigated for using such tools as the convex hull of the histogram, or its curvature and zero crossings of the wavelet components.

B) Examples Of Hungarian Matching Algorithm

Hungarian algorithm, which is used to find out the both text and image segmentations from the degraded documents.

Function cnum = min_line_cover (Edge) (3)

for find the number in each column that are connected for foreground and background matching character extractions below command is used

num_y = sum(~isinf(Perf),1); (4)

Find the number in each row that is connected due to image extractions below commands used in Matlab

num_x = sum(~isinf(Perf),2); (5)

Page 5: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 191

Figure 4: Image Reconstructions Concept

V. Algorithm for the Post - Processing Procedure

Requirement: The Input Document Image Id, Initial Binary Result=Band Corresponding Binary Text Stroke Edge Imaged Ensure: The Final Binary Result Bf First: Find out all the connects components of the stroke edge pixels in Edg.(edg=blackness removal(conv(x,y)) 2: Remove those pixels that do not connect with other pixels. 3: for Each remaining edge pixels(i, j): do 4: Get its neighborhood pairs :(i −1, j) and (i +1, j); (i, j −1)and(i, j +1)[1] 5: if The pixels in the same pairs belong to the same class (both text or background)then 6: Assign the pixel with lower intensity to foreground class (text), and the other to background class. 7: end if 8:end for 9: Remove single-pixel artifacts along the text stroke boundaries after the document thresholding. 10: convert *.jpg +adjoin page-%d.pdf 11: Store the new binary result as pdf format

One pixel of the pixel pair is indicating to the other category if both of the two pixels belong to the same class. Finally, some single-pixel artifacts along the text stroke boundaries are filtered out by using several logical operators. Quasi-concave shading model applies to various types of scanning shading, including marginal shading and the shading caused by conical page bending, which generally happens when the forces for pressing a book page tightly onto the flatbed are distributed unevenly along the book spine. The shading model also applies to cases where dark border noises are presented [3],[15].

A) The EM Algorithm:

The EM algorithm is an image recovery based technique , Let the observed image or data in an image recovery problem be denoted by y. Suppose that y can be modeled as a collection of random variables defined over a latticeSwithyDfyi;i2Sg.For example, could be a square lattice of N2 sites. Suppose that the pdf of y is py.yj, where is a set of parameters. [4].

Page 6: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 192

Where E (u) is an energy function with

E(u) =.5∑ 푖 ∑ 휑(푢푖, 푢푗) (6)

X=(u,w) (7)

Y=H(u,y)=>y (8)

Figure 5: Probability Evaluations From Unconstrained Documents

The figure 5 shows[9], the computation of the conditional expectation in the E-step can still be a difficult problem due to the coupling of the ui and uj in E. Most of the work on restoration in the literature was done under the assumption that the blurring process (usually modeled as a linear space-invariant system (LSI) and specified by its point spread function (PSF)) is exactly known. From that proposal user interaction can be reduced. For linear imaging systems the effects of image noise on degraded recovering performance can be predicted for a variety of tasks. From [4] the image reconstruction the output scenario is shown in figure 5, which is calculating the probable error. In the particular case of image deblurring/deconvolution,the matrix representation of a convolution operator; if this convolution is periodic, B is then a (block) circulate matrix.

This type of observation model describes well several physical mechanisms, such as relative motion between the camera and the subject (motion blur), bad focusing (defocusing blur), or a number of other mechanisms which are well modeled by a convolution. In more general image reconstruction problems, B represents any linear direct operator, such as a set of tomography projections (Radon transform), a partially observed (e.g., Fourier) transform, or the loss of part of the image pixels.[5] for non linearity calculations the median filter operations are proposed.

Median {f1 + f2} (median {f1} + median {f2}. (9)

However,

Median {CF} = c median {f}, (10)

Page 7: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 193

median{ c + f } = c + median{ f }. (11)

Because of using median filter, selects a sample of the window, does not average, Edges are better preserved than with liners, filters and its Best suited for “salt and pepper” noise. The basic idea is to give higher weight to some samples; according to their position with respect to the center of the window .Each sample is given a weight according to its special position in the window. And Weights are defined by a weighting mask the Weighted samples are ordered as usually weighted median is the sample in the ordered array such that neither all smaller samples nor all higher samples can cumulate more than 50% of weights. If weights are integers, they specify how many times a sample is replicated in the ordered array.

VI. Experimental Result Used By Using both Adaptive Binarizations And Convex Hull Concept

Figure 6: Result of Image Evaluation of the Objective Function Over Time

Result of image evaluations of the objective function in over time is shown in figure 6, which is used to calculate the total probability taken from account for calculating mismatching contents affected by various degrades from old documents. the figure 7 shows some old documents problem, it’s recovering output is explained in figure 8.

Figure 7: Examples of Old Documents

Page 8: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 194

To test the sensitivity of the proposed method to differentiate documents conditions, we have also done an experiment based on images that are scanned from the old documents shown in figure 7, page in different settings of brightness and contrast. We designed different combinations of scanning brightness and contrast in total, which increase from(-22 to 22: -40 to 40 . The scanned document images and the correction results illustrate by convex Hull algorithm.

Figure 8: Some Example Screen Shot Output Of The Degrade Documents Recovering Principle.

Figure 9: Screenshot for Combinations of Convex Hull And Adaptive Binarizations Technique

The figure 8 and 9 describes the degrade documents, recovering principle done by both combinations of adaptive pixel matching concept and convex Hull algorithm. From spine and dark border, noise removal radon transform and median filter has to be used for salt and pepper noise removal respectively. The proposed method is implemented on the old documents for shading correction. We also computed the peak signal to noise ratio (PSNR) for each corrected document to measure and reproduced.

VII. CONCLUSIONS We have proposed an effective method in this paper for recovering the nearby original contents of the documents from the

various degrades, such as character overlapping, blackness removal, spine line reductions, damaged old scanned documents and character mismatching. These kind of mortify has to be checked and compared through various filters and etching concepts were also done for getting pixel matching from color to gray conversions. From the analysis, we have to know the combinational concepts of adaptive binarizations and Convex Hull algorithm are provided good throughput to getting content of the documents from badly degraded documents. The more degrades of scanned documents are also solved at a time of scanning by using median filter and related transform functions at restoration time.

REFERENCES [1] Bolan Su, Shijian Lu, and Chew Lim Tan, Senior Member, IEEE. “Robust Document Image Binarization Technique

for Degraded Document Images”. IEEE Transactions On Image Processing, April 2013.

Page 9: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 195

[2] Bolan Su, Shijian Lu and Chew Lim Tan, Department of Computer Science, School of Computing, National University

of Singapore. “Combination of Document Image Binarization Techniques”.

[3] Gaofeng Meng, Member, IEEE, Shiming Xiang, Member, IEEE, Nanning Zheng, Fellow, IEEE, and Chunhong Pan.

“Nonparametric Illumination Correction for Scanned Document Images via Convex Hulls”. IEEE TRANSACTIONS ON

PATTERN ANALYSIS AND MACHINE INTELLIGENC, JULY 2013.

[4] Manya V. Afonso, Jos´ e M. Bioucas-Dias, Member, IEEE, M ´ ario A. T. Figueiredo, Fellow, IEEE. “Fast Image

Recovery Using Variable Splitting and Constrained Optimization”. IEEE Transactions On Image Processing, 2010

[5] Siddharth, R.C.Tripathi. “Separation Of Overlapped Chromosome Images From Single Chromosome Images And

Detecting Possibility Of Various Diseases By Karyotype”. International conference on Communication and Signal

Processing, April 3-5, 2013, India.

[6] M. Cheriet, J. N. Said, and C. Y. Suen, “A recursive thresholding technique for image segmentation,” inProc. IEEE

Trans. Image Process.,Jun. 1998, pp. 918–921.

[7] J. Parker, C. Jennings, and A. Salkauskas, “Thresholding is using an illumination model,” inProc. Int. Conf. Doc. Anal.

Recognit., Oct. 1993,pp. 270–273.

[8] E. Saund, J. Lin, and P. Sarkar, “Pixlabeler: User interface for pixel-level labeling of elements in document images,” in

Proc. Int. Conf. Document And. Recognition. Jul. 2009, pp. 646–650

[9] S. Kumar, R. Gupta, N. Khanna, S. Chaudhury, and S. D. Joshi, “Iterative multimodel subimage binarization for

handwritten character segmentation,” IEEE Trans. Image Process., vol. 13, no. 9,pp. 1223–1230, Sep. 2004.

[10] Y. Chen and G. Leedham, “Decompose algorithm for thresholding degraded historical document images,” IEEE Proc.

Vis., Image Signal Process., vol. 152, no. 6, pp. 702–714, Dec. 2005.

[11] T. Lindeberg, “Edge detection and ridge detection with automatic scale selection,” Int. J. Comput. Vis., vol. 30, no. 2,

pp. 117–156, 1998.

[12] T. Lelore and F. Bouchara, “Super-resolved binarization of text based on the fair algorithm,” inProc. Int. Conf.

Document Anal. Recognit., Sep. 2011.

[13] F. Shafait, D. Keysers, and T.M. Breuel, “Response to ‘Projection Methods Require Black Border Removal’,”IEEE

Trans. Pattern Analysis and Machine Intelligence,vol. 31, no. 4, pp. 763-764, Apr.2009.

[14] T. Kanungo, R.M. Haralick, and I. Phillips, “Global and Local Document Degradation Models,”Proc. Second

Int’Conf. Document Analysis and Recognition,pp. 730-734, 1993.

[15] J.S. Lee, C.H. Chen, and C.C. Chang, “A Novel Illumination Balance Technique for Improving the Quality of

Degraded TextPhoto Images,” IEEE Trans. Circuits and Systems for Video Technology,vol. 19, no. 6, pp. 900-905, June

2009.

Page 10: Degraded Documents Recovering by Using Adaptive Binarizations … · Available Online at International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer

Mahendar.R et al, International Journal of Computer Science and Mobile Computing, Vol.3 Issue.2, February- 2014, pg. 187-196

© 2014, IJCSMC All Rights Reserved 196

AUTHOR PROFILE Mahendar.R received the B.E degree in Electronics and communications from Dr.Navalar Nedunchezhiyan College of Engineering, Anna University, Chennai, in 2011, pursuing the M.E degree in Sri Eshwar College of engineering, Coimbatore. From 2011(may) to 2012(September), he was a Project Developer in matlab and embedded design domain with the Nanotronics Scientific Solutions, Coimbatore. His research interests include pattern recognition and image processing. He is a Student member of the IEEE.