You are on page 1of 4

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 04 Issue: 08 | Aug -2017 www.irjet.net p-ISSN: 2395-0072

Restoration of Old Documents That Suffer From Degradation


Tejashwini.A.G1, Smt G.Anitha2
1Tejashwini .A.G 4th Sem, MTech, Dept of Computer Science and Engineering, UBDTCE,
PJ Exteension, Davnagere, Karnataka, India.
2Smt. G.Anitha B.E.,M.E Associate Professor, Dept of Computer Science and Engineering, UBDTCE,
.
PJ Exteension, Davnagere, Karnataka, India.
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - Here I propose a new approach for data is carried out very quickly without any loss of
foreground/background separation to restore degraded information.
ancient documents suffering from recto/verso transparency.
This approach is used to process single-sided documents and Here it is targets the restoration of the degradations
proceeds in three steps: The first step aims to separate which includes scanning noise, aging effects, uneven
between the background and foreground of the image by a background or foreground, etc.
contrast enhancement using gamma correction and histogram
stretching. The second step consists in separating the final 2. ARCHITECTURE
foreground and the remaining noised pixels. Separation
between the initial resulting foreground and the remaining In the architecture diagram there are four main steps:
background regions by comparing RGB component with 1. Loading image document
original document, followed by its correction using ostus
method, the third step allows the reconstruction of the final 2. Background extraction
restored image using the obtained foreground and
background. The new approach presents the advantage of the
accuracy of its results.

Key Words: RGB, Ostus method, Contrast Stretching,


Gamma Correction.

1. INTRODUCTION

Ancient documents are a witness of past civilizations.


They represent a valuable cultural and scientific heritage.
This heritage allows the transmission of knowledge from one
generation to another, performing the human evaluation.
Therefore, safeguarding and preserving this heritage is of
paramount importance. Unfortunately, most of the
documents have incurred a progressive degradation and are
facing a real danger of disappearance. They suffer from
multiple physical degradations that may be biological, FIG 2.1
chemical or of human origin. Thus, several physical
3. Foreground extraction
restoration techniques have been used to address these
degradations. Indeed, these techniques can reinforce the 4. Image correction
document supports and slowdown its ageing. However,
these techniques represent temporary solutions, which All the steps are carried out one after the other and then the
require qualified competences and which can introduce, image is reconstructed with new background and
amongst others, side effects on the processed documents. foreground and then the results are compared with original
document.
To tackle this disadvantage, digitization has been the most
adequate solution allowing both the preservation of the 3. ALGORITHM DESIGN
patrimonial documents and their diffusion. Digitization
brings in these context large possibilities of image
processing for their analysis and dissemination for the Step1. Load data for restoration
general public on inexpensive supports. Moreover, it enables
the search for information in an easier and more effective Step 2.Extract background from the detoriated image
way compared to the methods used with the documents on a
Step 3.Extract foreground from the image
physical support. In the same way, the duplication of digital

2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 1994
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 04 Issue: 07 | July -2017 www.irjet.net p-ISSN: 2395-0072

Step 4.Perform Gama correction human perception of brightness, under common illumination
conditions (not pitch black nor blindingly bright), follows an
Step5. Perform Contrast stretching approximate power function (note: no relation to the Gamma
function), with greater sensitivity to relative differences
Step 6.Reconstruction of image by combining output between darker tones than between lighter ones, consistent
with the Stevens' power law for brightness perception. If
Step 7.Compare result i.e. to compare old document with
images are not gamma-encoded, they allocate too many bits
restored document
or too much bandwidth to highlights that humans cannot
Step 8.Exit from the menu differentiate, and too few bits or too little bandwidth to
shadow values that humans are sensitive to and would
3.1 Load data require more bits/bandwidth to maintain the same visual
quality. Gamma encoding of floating-point images is not
In load data module an image document is loaded required (and may be counterproductive), because the
for restoration. floating-point format already provides a piecewise linear
Image is loaded my interactive method by accessing approximation of a logarithmic curve.
only images from the directory
Once the loading of an image is completed then Although gamma encoding was developed originally to
Done loading image message is displayed on the compensate for the inputoutput characteristic of cathode
screen ray tube (CRT) displays, that is not its main purpose or
advantage in modern systems. In CRT displays, the light
3.2 Extract background intensity varies nonlinearly with the electron-gun voltage.
Altering the input signal by gamma compression can cancel
When the image is loaded then red component, this nonlinearity, such that the output picture has the
green component and blue component of the image intended luminance. However, the gamma characteristics of
are taken for both background and foreground. the display device do not play a factor in the gamma
To get only background for processing, background encoding of images and videothey need gamma encoding
is subtracted from foreground and all subtracted to maximize the visual quality of the signal, regardless of the
image are added. gamma characteristics of the display device. The similarity of
Now the process is to change background. Mean and CRT physics to the inverse of gamma encoding needed for
mode operation is performed and values are video transmission was a combination of luck and
extracted. engineering, which simplified the electronics in early
A new background is constructed using extracted television sets.
values, eliminating all uneven background colors.
3.5 Contrast stretching
3.3 Extract foreground
Contrast stretching is a common technique, and
When the image is loaded then red component, can be quite effective if utilized properly. In the field of
green component and blue component of the image medical imaging or scanned documents, an x-ray camera that
are taken for both background and foreground. consists of an array of x-ray detectors creates what are
To get only foreground for processing, background known as digital radiographs, or digital x-ray images. The
is subtracted from foreground. detectors accumulate charge (which manifests itself as a
larger pixel intensity) proportional to the amount of x-ray
Now the process is to get the normalized denoised
illumination they receive, which depends on the quality of
image. And the original image is binarized using
the x-ray beam and the object being imaged. A high-density
ostus method.
object means less x-rays pass through the object to
eventually reach the detectors (hence the beam is said to be
3.4 Gamma correction attenuated), which results in such higher density areas
appearing darker is a common technique, and can be quite
Gamma correction, or often simply gamma, is the effective if utilized properly. In the field of medical imaging,
name of a nonlinear operation used to encode and an x-ray camera that consists of an array of x-ray detectors
decode luminance or tristimulus values in video or still creates what are known as digital radiographs, or digital x-
image systems. Gamma correction is, in the simplest cases, ray images. The detectors accumulate charge (which
defined by the following power-law expression: manifests itself as a larger pixel intensity) proportional to
the amount of x-ray illumination they receive, which
depends on the quality of the x-ray beam and the object
..(i) being imaged. A high-density object means less x-rays pass
Gamma correction of images is used to optimize the usage of through the object to eventually reach the detectors (hence
bits when encoding an image, or bandwidth used to the beam is said to be attenuated), which results in such
transport an image, by taking advantage of the non-linear higher density areas appearing darker.
manner in which humans perceive light and color. The

2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 1995
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 04 Issue: 07 | July -2017 www.irjet.net p-ISSN: 2395-0072

3.6 Reconstruction For bi-level thresholding, Otsu verified that the optimal
threshold t* is chosen so that the between-class variance B is
Processed background and foreground image is maximized; that is,
taken,
Then both of them are clubbed together to form a
reconstructed or restored image.

3.7 Compare Performance (with respect to our experiments): Otsu works


well with some images and performs badly with some. The
Previously loaded image and output image re put majority of the results from Otsu have too much of noise in
side by side to compare. the form of the background being detected as foreground.
Difference can be seen from old degraded image to Otsu can be used for thresholding if the noise removal and
restored image. character recognition implementations are really good. The
main advantage is the simplicity of calculation of the
3.8 Exit
threshold. Since it is a global algorithm it is well suited only
for the images with equal intensities. This might not give a
Exits from the menu bar.
good result for the images with lots of variation in the
If exit is not done properly then loop will not be
intensities of pixels.
terminated.
5. Results
4. Methodologies
4.1 Ostus Method Following are the results showing the outcome at each step
and the final result can be compared which is obtained after
Method: This type of thresholding is global thresholding. It completion of all actions
stores the intensities of the pixels in an array. The threshold
is calculated by using total mean and variance. Based on this 5.1.1 Background extraction:
threshold value each pixel is set to either 0 or 1. i.e.
background or foreground. Thus here the change of image
takes place only once.

The following formulas are used to calculate the total mean


and variance.

The pixels are divided into 2 classes, C1 with gray levels [1,
...,t] and C2 with gray levels [t+1, ... ,L].The probability
distribution for the two classes is:

(a) (b)

5.1.2 Foreground separation

Also, the means for the two classes are

(a) (b)
Using Discriminate Analysis, Otsu defined the between-class
variance of the thresholded image as

2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 1996
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 04 Issue: 07 | July -2017 www.irjet.net p-ISSN: 2395-0072

5.1.3 Gama correction and contrast stretching [4] J. Wang and C. L. Tan, Non-rigid registration and
restoration of double-sided historical manuscripts, 11th
International Conference On Document Analysis and
Recognition, pp. 1374 1378, Beijing, 2011.

[5] R. Rowley-Brooke, A. Kokaram , Degraded document


bleed-through removal, Irish, Machine Vision and Image
Processing Conference, pp.70-75, Dublin, 2011.

[6] Rabeux, Evaluation of the quality of old scanned


documents, PhD Thesis, LaBRI, University of Bordeaux I,
Bordeaux, 2013.
5.1.4 Final result and comparison
[7] Y. Huang, M. Brown, and D. Xu, A framework for
reducing ink-bleed In old documents, Computer Vision and
Pattern Recognition, CVPR, pp. 1-7, Anchorage, AK , 2008.

BIOGRAPHIES

Tejashwini A G received the


degrees in computer science
from VTU University at
Government Engineering College
Karwar in 2015 and currently
studying MTECH IV in Computer
6. Conclusion Science and Engineering at
UBDTCE
In this system, we have put forward a hybrid approach for
restoring images of ancient documents, with irregular
background and some transparency degradation. This
approach occurs in three stages: a first separation between
the foreground and the background based on, gamma
correction and histogram stretching, a second separation
between the initial resulting foreground and the remaining
background regions by comparing RGB component with
original document, followed by its correction using ostus
method and the reconstruction of the final restored image.
The different tests and experimentations have shown that
the results are satisfactory and encouraging. The developed
tool can be improved to meet other needs in dealing with
other problems.

REFERENCES

[1] A. Kricha, N. Essoukri Ben Amara, Contribution to the


pre processing and characterization of ancient documents:
Application to the segmentation, PhD Thesis, SAGE,
University of Manar, Tunis, 2013.

[2] M.A.Charrada, N. Essoukri Ben Amara, Development of a


database with ground truth for old documents analysis,
Systems, Signals & Devices, 10th International Multi
Conference, pp 1-6, Hammamet, 2013.

[3] M. A. Charrada, N. Essoukri Ben Amara, Database design


of ancient bleed-through document images with ground-
truth, 1rst Internatioanl Image Processing Applications and
Systems Conference, pp.124-128, Hammamet, 2014.

2017, IRJET | Impact Factor value: 5.181 | ISO 9001:2008 Certified Journal | Page 1997

You might also like