Classification Of Gradient Change Features Using MLP For Handwritten Character Recognition
Sandhya Arora, Latesh Malik, Debotosh Bhattacharjee, Mita Nasipuri
Classification Of Gradient Change Features Using MLP For
Handwritten Character Recognition
Sandhya Arora , Latesh Malik , Debotosh Bhattacharjee , Mita Nasipuri Deptt. Of Comp. Sc. & En gg., Meghnad Saha Institute of Technology, Kolkata, [email protected]
Deptt. Of Comp. Sc. & Engg., G.H. Raisoni College of Engineering, Nagpur,University Of Calcutta, Kolkata, [email protected] , [email protected] m Deptartment Of Compter Science & Engineering,Jadavpur University,Kolkata, [email protected]
Abstract: -
A novel, generic scheme for off-line handwritten English alphabets character images is proposed. The advantage of the technique is that it can be applied in a generic manner to different applications and is expected to perform better in uncertain and noisy environments. The recognition scheme is using a multilayer perceptron(MLP) neural networks. The system was trained and tested on a database of 300 samples of handwritten characters. For improved generalization and to avoid overtraining, the whole available dataset has been divided into two subsets: training set and test set. We achieved 99.10% and 94.15% correct recognition rates on training and test sets respectively. The purposed scheme is robust with respect to various writing styles and size as well as presence of considerable noise.
I. Introduction bottommost, topmost black pixel positions of theOptical Character Recognition (OCR) is a character. Then the character is kept in a new process of automatic computer recognition of image with the height and width found in the characters in optically scanned and digitized above step. pages of text. OCR is one of the most
B Preprocessing fascinating and challenging areas of pattern
As preprocessing, we considered only sizerecognition with various practical application normalization. The 16 level gray scale imagepotentials. It can contribute immensely o the obtained is initially converted into binary image advancement of an automation process and can by assigning every pixel value equal or greater improve the interface between man and machine than the threshold value, by value 1 and all otherin many applications. Some practical application a value 0. This binary image is scaled and potentials of OCR system are: 1) reading aid for thinned to 100 X 100 image. No furtherthe blind 2) automatic text entry into the preprocessing like tilt correction, smoothing etccomputer for desktop publication, library are considered. The threshold value we arecataloging, ledgering etc 3) automatic reading considering here an integer value 7000000for sorting of postal mail, bank cheques and which is representing the gray level intensity other documents 4) document data compression: value of a pixel.from document image to ASCII format 5)
C Scaling of extracted image language processing 6) multi-media system
We are using Affine Transformation to performdesign etc. a linear mapping from 2D coordinates to other
Intensive research has been done on optical
2D coordinates that preserves the “straightness”character recognition (OCR) and many and ‘parallelness” of lines. Affine commercial OCR systems are now available in transformation can be constructed using the market but most of these system work for sequences of translations, scales, flips, rotations
Roman, Chinese, Japanese, and Arabic and shears. Image is scaled in 100x100 pixelcharacters. There is no sufficient work on Indian resolution. [x'] [m00 m01 m02][x]language character recognition although there are 12 major scripts in India. [y']=[m10 m11 m12][y] [1 ] [ 0 0 1 ][1]Numerous techniques for offline handwritten recognition have been investigated based on direct matching, relaxation matching,
Discriminant Analysis for Arabic characters[,
Hidden Markov Models for English words,
Hough transform technique for Chinese character, Bayesian classifier for printed characters, Support vector machines , prototype matching for multifont characters, and local
Fig 1
Input character Image and scaled Ima ge
Affine transform for handwritten numerals etc.
D Thinning of scaled image
The thinning algorithm transforms an object to a
II. The Approach set of simple digital arcs. The structure obtained
The overall approach is described as below. is not influenced by small contour inflections
Initially the character image is extracted from that may be present on the initial contour. The background and converted to binary format. basic approach is to delete from object’s border
Then some preprocessing is performed and points that have more than one neighbour in the character image is divided into different object and whose deletions does not locallysegments. Feature vector is constructed from disconnect the object. Here a connected region isthese segments and fed as an input to the Neural one in which any two points in the region can be
Network for recognition. connected by a curve that lies entirely in the
A Extraction of Character from image region. In this way, end points of thin arcs are
The character image is extracted from the whole not deleted.image by taking leftmost, rightmost,
Let ZO(P1) count be the number of zeros to the components in the vector were same fornonzero transitions in the ordered set completely different shapes.. The patterns
P2,P3,P4,P5,P6,P7,P8,P9,P2. Let Nzcount(P1) obtained were used as inputs to the Neural be the number of non zero neighbours of P1.
Network for recognizing different characters.P3 P2 P9
P4 P1 P8
P5 P6 P7
Then P1 is deleted if
Step 1: 2<=Nzcount<=6
Step 2: and ZO(P1)=1
Step 3: and P2.P4.P8=0 or ZO(P2) != 1
Fig 3 gc ComputationStep 4: and P2.P4.P6=0 or ZO(P4) != 1
III. Neural Network Architecture
Use of ANN in handwritten recognition task has
The procedure[7], all above said steps are repeated until no further changes occur in the become very popular because of ANN tools(say
MLP classifiers) perform efficiently when input image. The corner positions are the special cases data are often affected by noise and distortions. to be considered and taken care for more perfection in the thinning procedure
Also, the parallel architecture of a connectionist network model and its adaptive learning capability are added advantages. In out approach, we feed the feature vector of length9,16,25 to MLP classifier.During simulation we considered MLP’s with one hidden Layer. For feature vector of size say
Fig 2.
Input Scaled Image and Thinned Ima ge
9 we have used 9x9x10 architecture, altogether
E Gradient change of thinned image edge & there are 28 neurons. The training was therefore
Analysis fast. The network was trained with the
Then the source image is skeletonized and normalized data using conjugate-gradient( CG)divided into different segments(9,16,25 method of training. This method was preferred segments). For each segment perform the to the gradient descent method, since CG takes following steps[1,4]:- into account the non-linearity of the surface. TheStep 1: Consider two successive rows at a time.
CG procedure does not ask user to specify any the whole process should be performed parameters such as learning rate. in horizontal manner.
The basic back propagation algorithm adjustsStep 2: Let B be the first black pixel found in the weights in the steepest descent direction i row i (negative of the gradient). This is the direction in Step 3: Calculate the distance between B which the performance function is decreasing i and B +1 most rapidly. It turns out that, although the i Step 4: Sum up the distances(gc’s) for function decreases most rapidly along thewhole segment negative of the gradient, this does not
These gc’s values may be zero, negative, necessarily produce the fastest convergence. In positive (Fig 3). It may contribute zero for the conjugate gradient algorithms a search ishorizontal or vertical segements (symmetrical performed along conjugate directions, whicharound the x or y axis), may contribute positive produces generally faster convergence thanfor convex shapes, negative for concave shapes. steepest descent directions.
The features(gc values) were extracted for each
All of the conjugate gradient algorithms start out segment and the complete image was described by searching in the steepest descent direction with a component vector V=(gc1,gc2…..gc9) or (negative of the gradient) on the first iteration.
V=(gc1,gc2….gc16) or V=(gc1,gc2….gc25). p = -g ------------------ (1) The idea is that , in practice although for two A line search is then performed to determine the different images, a few of the segments may optimal distance to move along the currentyield identical gc values , it would be rare if all search direction: several simulation runs varying the x = x + a p (2) k +1 k k k -- --- --- --- --- --- --- --- --- -- Then the next search direction is determined so normalization factor and we have observed that recognition accuracy on test set of samples canthat it is conjugate to previous search directions. be improved by taking optimal segment size andThe general procedure for determining the new search direction is to combine the new steepest it can also be slightly improved using proper normalization factor. In table 3 we present thesedescent direction with the previous search recognition results on both the training set and direction: test set. p = - g + ß p (3) k k k k -1 -- --- --- --- --- --- --- --- --- --- --- where x is a vector of current weights and Input Feature Vector Size: 9 k Recognition Accuracy biases, g is the current gradient, and a is the Normalization
Training
Test Set k k learning rate. Factor
Set
IV. Experimental Results
Input Feature Vector Size: 16
Different classifiers have been used for
Recognition Accuracy handwritten digit recognition, such as
Normalization
Training
Test Set
Factor
Set statistical[3], structural and neural networks[5],
Input Feature Vector Size: 25 handwritten digits using multiple features &
Recognition Accuracy multiple neural networks[2] but for characters
Normalization
Training
Test Set
Factor
Set
We can say that handwritten character recognition is still an open problem.
Table 3
Recognition Result
We have simulated the present recognition
V REFERENCES schema on 10 characters database of handwritten generic algorithms 7 International workshop on set for training set, 50 sample set for testing. A
Frontiers in Handwriting Recognition , 103-112few samples are shown in Table 2. Ideal samples
Sorting and recognizing cheques and finacial documents. In S.W. Lee Y. Nakano(Eds.) ,
Document Analysis System, Theory and
Table 1
Ideal samples of alphabet
Practice, Springer, Belin 173-187 the fourteenth International conference onPattern Recognition. 1859-18616.L. Koerich(2002). Large vocabulary off-Line
Table 2
A typical sample data subsets of handwritten word recognition. PhD thesis,handwritten characters
Ecolede Technologie superieme Canada, AugustWe divided character image into different size
Thinning algorithms for Arabic OCR. IEEE Pacgradient changes. These gradient values are
Rim 1993. 248-251normalized for training and testing of Neural
Network. For different size segment (input vector to Neural Network), we have made +(35/70) 98.25 93.39 +(40/80) 97.28 90.15 +(30/60) 99.10 94.15 +(40/80) 98.75 93.89 +(25/50) 90.34 89.42 +(30/60) 90.10 86.10+(30/60) 90.10 86.10