Optical Character Recognition of Handwri PDF
Optical Character Recognition of Handwri PDF
ISSN 2229-5518
Abstract: In India, more than 300 million people use Devanagari script for documentation. There has been a significant improvement in the
research related to the recognition of printed as well as handwritten Devanagari text in the past few years. An attempt is made to address the
most important results reported so far and it is also tried to highlight the beneficial directions of the research till date. In this paper we propose an
efficient image retrieval technique which uses dominant color and texture features of an image. Though, Affine Moment invariant technique is
well experimented by many researchers, an attempt is made to enhance the existing results by extracting various supportive features
like moments invariant, vector Gradient, chain code(freeman chain code) image thinning, structuring the image in box format, noise removal, etc.
A performance of approximately 90% correct recognition is achieved.
IJSER
Keywords— Optical Hindi character recognition (OCR), Data set, Affine Moment invariants Rotation, neural network (NN) training of NN,
Recoganisation.
1. INTRODUCTION
Character recognition is the process to classify the input recognition of printed Marathi vowels and consonants is
character according to the predefine character class, with proposed. The OCR has been tested on samples from
increasing the interest of computer applications, modern various magazines and newspapers.
society needs the input text into computer readable form.
This research is a simple approach to implement that 2. LITERATURE SURVEY
dream as the initial step to convert the input text into The United States Postal Services has been using OCR
computer readable form. Some research for hand written machines to sort mail since 1965 based on technology
characters are already done by researchers with artificial devised primarily by the prolific inventor Jacob Rainbow.
neural networks. Digital document processing is gaining In 1965 it began planning an entire banking system,
popularity for application to office and library automation, National Giro, using OCR technology, a process that
revolutionized bill payment systems in the UK. Then in
bank and postal services, publishing houses and
1970’s efforts were initiated by Sinha at Indian Institute of
communication technology. English Character Recognition
Technology, Kanpur. A syntactic pattern analysis system
(CR) has been extensively studied in the last half century for Devanagari script recognition is presented in Sinha’s
and progressed to a level, sufficient to produce technology Ph.D. thesis. AnotherOCRsystem development of printed
driven applications. But same is not the case for Indian Devanagari is by Palit and Chaudhuri as well as Pal and
languages which are complicated in terms of structure and Chaudhuri. A team comprising Prof. B. B. Chaudhuri, U.
computations. In OCR domain, it is now widely accepted Pal, M. Mitra, and U. Garain of Indian Statistical Institute,
Kolkata, developed the first commercial level product for
that a single feature extraction method and single
printed Devanagari OCR. The same technology has been
classification algorithm can’t yields better performance
transferred to Center for Development for the Advance
rate. Neural networks and fuzzy logic are two Computing (CDAC) in 2001 for commercialization and is
complimentary technologies which are used in pattern marketed as “Chitrankan”. An approach based on the
recognition process. There are two type of neural network, detection of “shirorekha” is proposed by Chaudhuri and
feedback and feed forward.It is therefore, a compound Pal with the assumption that the skew of such header lines
feature extraction approach based on soft computing for show the skew of the whole document. Initially the
IJSER © 2013
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 4, Issue 10, October-2013 237
ISSN 2229-5518
IJSER
scripts, is based on phonetic principles that consider both the
manner and place of articulation of the consonants and vowels 3.2.1 MATLAB
they represent. This arrangement is usually referred to as the
varanmala "garland of letters". MATLAB (matrix laboratory) is a numerical
computing environment and fourth-generation programming
language. Allows matrix manipulations, plotting of functions
and data, implementation of algorithms, creation of user
interfaces, and interfacing with programs written in other
languages, including C, C++, Java, and Fortran. An additional
package, Simulink, adds graphical multi-domain simulation
and Model-Based Design for dynamic and embedded systems.
For my project I am using MATLAB 2010b version is used.
3.2.2 GUI
ii)Median Filtering :
Scanning process introduces irregularities such as
speckle noise and salt and pepper noise in the output image.
Noise reduction (also called smoothing or noise filtering) is
one of the most important processes in image processing.
Median Filter is used in this study due to its edge preserving
feature.
IJSER
signal processing for which the input is an image, such as a
i).Binary image ii).Top line removed
photograph or video frame; the output of image processing
may be either an image or a set of characteristics or
parameters related to the image. Most image-processing Fig. 3.7 Top line removed image
techniques involve treating the image as a two-dimensional
signal and applying standard signal-processing techniques to 3.4 Feature extraction:
it.
i) Converting Color image to gray scale to binary image: 3.4.1 Exact computation of geometric moments:
IJSER © 2013
http://www.ijser.org
International Journal of Scientific & Engineering Research, Volume 4, Issue 10, October-2013 239
ISSN 2229-5518
approximation of Eq. (1).The set of geometric moments can be 4)Homogeneity : Returns a value that measures the
computed exactly by closeness of the distribution of elements in the GLCM to the
M [x] =∑𝑀 𝑁
𝑖=1 ∑𝑗=1 𝐼𝑝(𝑖)𝐼𝑞(𝑗)𝑓(𝑥𝑖, 𝑦𝑗), (4) GLCM diagonal.
Where,
1 𝑝+1 𝑝+1
Ip(i)=𝑝+1[𝑈𝑖+1 − 𝑈𝑖 ], (5.1) Range = [0 1]. Homogeneity is 1 for a diagonal GLCM.
1 𝑝+1 𝑝+1
Iq(j)= 𝑞+1
[𝑉𝑖+1 − 𝑉𝑖 ], (5.2)
Now we will store all this feature in .mat file, to generate the
And database. This features are useful at the time of recognition of
𝛥 𝑥𝑖
U i+1 =x i + , (6.1) character.
2
𝛥 𝑥𝑖
U i =x i - 2
, (6.2)
𝛥 𝑦𝑖
3.6 Recognition algorithms :
Vj +1 =yj+ 2
, (6.3) 3.6.1 ANFIS ( Artificial neuro fuzzy interference system):
𝛥 𝑦𝑖
Vj=yj- 2
(6.4)
1)Neural Network
3.4.2 Affine moment invariants: Neural network is also known as Artificial Neural
Moments are one of the parameters that describe the Network (ANN), is an artificial intelligent system which is
image or object of interest. Moment invariants are moments based on biological neural network. Neural networks able to
which do not change under a group of transformations. Image be trained to perform a particular function by adjusting the
normalization means bringing the image to a position in which values of the connections (weight) between these elements.
the effect of transformation is eliminated. Affine
transformation is represented by the following matrix form:
𝑥′ 𝑎11 𝑎12� 𝑥 𝑏1
= � + (7)
𝑦 𝑎21 𝑎22 𝑦 𝑏2
IJSER
To achieve normalization, affine transformation decomposed
into a group of simple one-parameter transforms. This group
consists of translation, uniform scaling, first rotation,
stretching, and second rotation
x’=x–x0,y’=y–y0 (8.1) Fig. 3.10: Neural Network Block Diagram
x’=αx,y=αy, (8.2)
x’=xcosθ–ysinθ,y’=xsinθ+cosθ, (8.3) Neural network is adjusted and trained in order the particular
x’=δx,y’=1/δy, (8.4) input leads to a specific target output. Example at Figure 3.5
x’=xcosΦ–ysinΦ,y’=xsinΦ+ycosΦ (8.5) the network is adjusted, based on a comparison of the output
where (x0,y0) is the centroid; α , δ > 0; θ, Φ are the rotation and the target until the network output is matched the target.
angles. The image function is invariant under the group of Now a days, neural network can be trained to solve many
transformations (8) if and only if it is invariants under the
difficult problems faced by human being and computer.
general affine transformation (7).
4. PERFORMANCE ANALYSIS
3.5 GLCM ( gray level co-occurrence matrix):
4.1 Database of characters :
Character recognition is done by generating database of
Following properties are calculated by GLCM :
devnagri character, extracting feature of each character and
saving them for further recognition process. I have selected
1)Contrast : Returns a measure of the intensity contrast
characters of different font size and font face for generating
between a pixel and its neighbor over the whole image.
database. The following figure shows the data base used.
Fig 4.1 shows the image used to generate database.
Range = [0 (size(GLCM,1)-1)^2]. Contrast is 0 for a constant
• Used Font size is 14.
image.
• Used font face is kruti dev 014.
2)Correlation : Returns a measure of how correlated a pixel is
to its neighbor over the whole image.
Now each line is separated from complete figure as shown datafile.mat file. We took example of two characters there
in the following figure. Then each character is separately for, features of only two characters are shown here.
cropped from single line. And simultaneously, centroid of
Table 4.2 Value of contrast of
each character is find out which is denoted by red cross and
box around the character is represented by blue colour.
IJSER
Fig.4.3 Sample taken to generate database
4.2 Feature extraction of character :
Each <1×1> struct present in the table consist of values of
co-efficient of binary image, Area, centroid, eccentricity,
Graph 4.3 Extracted Feature of character
Output of NN :
Output of neural network can be represented by following
graph. As well as recognized output is also shown in
following figure. (a), (b).
Table 4.4 output of NN
Character recognition is one of the difficult task , because [7] Veena Bansal & R.M.K. Sinha, “Segmentation of
verity font size and font faces are present now a days. So Touching Characters in Devanagari”,
it’s a try to achieve maximum accuracy and reduce time http://www.iitk.ac.in/ime/veena/PAPERS/stwo.pdf
duration required in recognition of character. The
proposed method hopefully can inspire a new thinking and [8] M.Babu Rao, Dr.B.Prabhakara Rao, Dr.A.Govardhan,
new way to tackle the face recognition problem. Extensive “Content Based Image Retrieval using Dominant Color and
training and testing experiments are carried out in order to Texture features” (IJCSIS) International Journal of
demonstrate the effectiveness of the proposed method for Computer Science and Information Security,Vol. 9, No. 2,
devnagri character recognition. The performance of the February 2011
proposed method in terms of recognition accuracy is
[9] R. Jayadevan, Satish R. Kolhe, Pradeep M. Patil, and
obtained. Features used in character recognition i.e. GLCM,
Umapada Pal “Offline Recognition of Devanagari Script: A
Colour dominant, Histogram, Affine moment invariant,
Survey”, ieee transactions on systems, man, and
gives good results compare to others, and for recognition
cybernetics—part c: applications and reviews, vol. 41, no. 6,
process ANFIS (Artificial neuron fizzy interference system)
november 2011.
tech. is used which gives the best result compare to other
technique. [10] Mohanad Alata — Mohammad Al-Shabi,” TEXT
DETECTION AND CHARACTER RECOGNITION USING
Talking about single characters i.e. it gives 100% FUZZY IMAGE PROCESSING”, Journal of electrical
accuracy. But when talking about all devnagri character it engineering, VOL. 57, NO. 5, 2006, 258–267
shows mistake in recognising some character. Recognition
rate of all devnagari character is near about 95%. [11] R. O. Duda, P. E. Hart, and D. G. Stork, “Pattern
Classification”, Second Edition, John Wiley & Sons Inc,
6. REFERANCES
IJSER
New York, 2006, pp. 576- 579, 582.
[1] Kailash S. Sharma,A. R. Karwankar, Dr. [12] H.Ma and D. Doermann, “Adaptive Hindi OCR using
A.S.Bhalchandra,” Devnagari Character Recognition Using generalized Hausdorff
Self Organizing Maps” ICCCCT’10
image comparison,” ACM Trans. Asian Lang. Inf. Process.,
[2] http://www.heatonresearch.com/articles/series/1 vol. 2, no. 3, pp. 193–218, 2003.
[3] R.M.K. Sinha, and Veena Bansal, “On Automating [13] U. Bhattacharya and B. B. Chaudhuri, “Handwritten
trainer for construction of prototypes for Devnagari text numeral databases of Indian scripts and multistage
recognition”, Technical report TRCS-95-232, IIT Kanpur, recognition of mixed numerals,” IEEE Trans. Pattern Anal.
India 1995. Mach. Intell., vol. 31, no. 3, pp. 444–457, Mar. 2009.
IJSER © 2013
http://www.ijser.org