You are on page 1of 7

JOURNAL OF COMPUTER SCIENCE AND ENGINEERING, VOLUME 15, ISSUE 2, OCTOBER 2012 63

Reliable Approach for Arabic Hand-Written Characters recognition in Middle of the Word Characters Case
Farah Hanna Zawaideh, Computer Information System Department, Irbid National University
Abstract In the rise field of research - hand written recognition the interesting area of current artificial intelligence and advanced computing, many issues and stages have to be implemented and taken in place in such researches. This paper did a completion of work that published in [1]. The complexity of the language controls the ability and the challenge of recognition its characters, whereas this complexity and uncertainty becomes multiplied. In [1] I implemented cascading approach to recognize Arabic characters when these characters are separated. This paper implements approach to recognize the Arabic character when locating in the middle of the words segment, this means that the character is connected with two other characters, one at the front and another from the rear. This paper takes in place the work [1] and developing a modified approach to effectively handle more complex case of Arabic hand written characters. By increasing the number of cascaded neural networks, its structure has been minimized, that ensures more benefits including more time realization hence the computational power is significantly decreased. The testing program of the suggested approach ensures that, this algorithm is faster than that developed in [1], in addition to its dealing with more complex characters case, with very good accuracy. This implementation assumes that, the Arabic hand written character is segmented and ready to deal with recognition phase. Index Terms Hand written; connected characters; Arabic; character recognition; Neural Networks; LVQ; Wavelet Transform.

1 INTRODUCTION

He rise of hand written recognition researches in modern image processing and character recognition techniques, the complex languages are taking place. Current researches are being interested in nonLatin languages, especially old eastern languages. Unlike Latin languages; Arabic language writing structure is very complex and varies depending on different conditions. The Arabic language has very complex writing structure, starts from the old eastern line drawing format of the character, including the dot marking of most characters, where two, three, or four characters could be discriminated by marking dots only. Also, the Arabic writing is continues / separated writing of characters, where most of characters is being connected to each other in the word, but some characters in some cases are not connectable, so, the world is consisting of continues segments where each segment is almost consist of continues characters. Figure-1 shows the discrimination of four characters using dots. Where figure 1-a is being pronounced as ba, figure 1-b is being pronounced as ta, figure 1-c is being pronounced as tha, and figure 1-d is being

pronounced as in. This figure illustrates the complexity of distinguishing the characters in Arabic by computational algorithms. Most characters has similar spline shape to another characters, the main discriminator is dots. While some characters have little line curvature shapes differences. Figure-2 demonstrates the writing the word of a word that pronounced Alhai, in Arabic language. The word is assembled from four different characters. But the shape of the character inside the word is not the same like the separated one. The separated characters are drawn in Figure 2-a, while figure2-b draws the realistic meaningful word. Its clear from figure, the word Alhai in Arabic forms two segments; the first segment is a single character where the second is a connection of three characters together. Keeping in that, the shape of any character in Arabic language is complex and differs according to the location of the character in the word; also, the same location of character can has different shapes in different words. Figure-3 shows a sample character of different shapes depending on its location on the world; start of the word, middle, and end of the word, where the last one is separated and not connected to any other character. In [1] the algorithm deals with single characters assuming that, the character is not connected to another one in the word. That represents the simplest way of recognition and segmentation. But in this paper, the recognition of characters those written in the middle of the word is taken place.

F.A. Author is with the National Institute of Standards and Technology, Boulder, CO 80305. S.B. Author Jr. is with the Department of Physics, Colorado State University, Fort Collins, CO 80523. T.C. Author is with the Electrical Engineering Department, University of Colorado, Boulder, CO 80309. On leave from the National Research Institute for Metals, Tsukuba, Japan.

64

Figure-1: Draw of Arabic characters and using dot discriminator.

Figure-3: different drawing of sample Arabic character, depending on its location on the word. Another issue increase the complexity of recognition Arabic writing is the complex writing style which is named in Arabic al-Khat regards to line-style. The writing language has many different line-styles. Each line-style can roughly or significantly differ from specific other one. Figure-4 shows the same character Printed in 3 different line-styles, the first is named Kofi line-style, the second is Nasikh line-style, and the last is Roqa line-style. Here, the fact that will be faced that represents significant problem in automatic recognition; the Arabic normal writers doesnt underlay to one line-style writing type during writing the same documents. They always, use different styles not in the same document only, but may be in the same paragraph.

Figure-2: Separated Arabic characters (a), connected to represent a meaningful word (b). While (c) represents the segmentation of that word in separated characters Figure-4: Arabic character named Seen and pronounced as SSS hand written in three different linestyles.

65

As figure 4, its clear that, the font style of Arabic writing difference is definitely un-negligible and should have a main place in the current researches. As proposed in [1], logical proposed procedure to to perform Arabic hand written recognition is that designing a separate algorithm for each writing style type, thus, this will be easier than building a single algorithm to deal with all that complexity. Actually, designing one recognition algorithm to deal with all that complexity seems to be impossible. As completion of [1], this paper presents an efficient recognition hybrid algorithm of Arabic characters extracted from a paragraph, while those characters are located in the middle of the word that means the character is connected to two another characters one from the beginning and another from the end. Thus, this algorithm considers the different / undetermined font style as the study style, whereas, the writer can write as he can, and designs the second step system of recognition. The proposed algorithm is advanced design and structure for Arabic hand written middle of the word characters recognition, where the current assumption is that the character is single and already segmented, the segmentation algorithm is not matter of this paper.

size in addition to that there is no clear feature in the image data. Extracting features will determine the effected and recognizable data in the image in clear expression. For the size, the image segment size is 48x32, so that, its size in gray will be 1536 input. The large number of pixels is not effectively recognizable in neural network system. The previous work in [1], implements statistical feature extraction of the image. While, this paper developed more efficient approach than statistical data, which uses wavelet transformation with some mathematical statistic. The first step of feature extraction is to divide the character image into 6 by 4 spatial segments. Hence, the character image size is 48x32, so, the spatial segment size is 8x8 pixels. Figure 5 shows this spatial cutting of the image.

2. ARABIC CHARACTER AND FEATURE EXTRACTION


The segmented characters images can be enhanced and analyzed to get thousands of features from each. The key point of that is to extracting the minimum appropriate and meaning full features, where those are required to distinguish each character from the other in faster time and most efficiency. Commonly in recognition systems design, feature extraction is a key process and controls the most proposed models. This paper considers the recognizer(s) to be artificial Linear Vector Quantizing Neural Networks. Thus, the features should be suitable not to human recognition of numbers and curves, but for artificially intelligent recognition system. The previous work in [1], implements Multi-Layer Perceptron Neural Network. Neural networks design makes the system easier to build and more reliable, especially in minimizing the uncertainties of the bulk input data. However, the neural net implementation needs an accurate selection of features those should be extracted in order to be passed to the neural network input. The image of the character cannot be passed completely as input of neural network because its large

Figure-5: Spatial segmentation of sample image, 6 by 4 segments. In [1], each segment was subjected to extract five features separately and a 120 features were gotten from the overall character segment. Even though those features represent uniqueness of the hand written character feature set, but is faces some inertia and disability to recognize all interesting features in some cases such this chase of character in middle of the world. This paper contributes that: Converting every 8X8 segment of the characters image into one-dimensional array. Applying one dimensional wavelet transform (debauches Level three) to the array that gotten from last step. Computing the variance of the farthest two vertical pixels divided into the variance of the farthest

66

two horizontal pixels. This is calculated as equations-4 and equation (see equation-1and equation-2). Calculating the ration between the two farthest pixels with respect to diagonal of the 8X8 segment of the image (see equation-3). Structuring the input array which is a one column array consist of: o 1-D wavelet transformed data of all segments o The calculated variance of all segments concatenated after the wavelets in the previous step. o The computed rations that gotten last of all segments are being concatenated in the last of input array.

Starting from first debauches level of discrete wavelet (hence the image segment was transformed to 1-D) the testing of effect of the wavelet level depth is studied. The high frequencies that depend on transient and un-normal conditions in writing will be canceled. Otherwise, the low frequencies represent the writer stability and the draw lines format of the character. Figure-6 shows the hierarchal wavelet decomposition. The studying of wavelet levels from level one to level ten derived to decide that, level three is the best level in Arabic hand written recognition. It contains the enough features that can represent the character features. In addition, the most dominant features is seems to be hold in that level.

(1)

(2)

(3)

Where u is defined in equation-2, rs and cs are the characters segment number of row and number of columns respectively, I (i,j) is a pixel of the image. jor, jor, iol, and jol, are the coordinations of the farthest pixels of the character object in the image.

3 MULTI-LEVEL WAVELET DECOMPOSITION


By studying the response of wavelet ransformation, multi-level wavelet decomposition is being studied to determine the best level that will be helpful in recognition. That level holds the most dominant features that discriminates the hand written character. The wavelet basis is shown in equation-4. Figure-6: multi-levels wavelet decomposition

4 LINEAR VECTOR QUANTIZER NEURAL NETWOR


As an adaptive neural network, Learning vector quantizer classifies vector into target classes by using a competitive layer to find subclasses of input vector and combining them into target classes (linear layer), the network weight is being represented as W=(w(i), .,w(n)) which initially should be initialized randomly. It weights of networks changed during training to classify the data correctly. For each data point, the neuron that is closest to it is determined called winner neuron. The weights of the connection to this neuron are then adapted. The architecture of the proposed LVQ neural network consists of three layers; the input layer structured of X

(4)

To span our data domain at different resolutions, the analyzing wavelet is used in a scaling equation (5).

(5)

67

nodes, where X is the number of input features. The hidden layer is structured from K nodes, the most distinguishing prototype in LVQ neural network is the use of a hidden layer the policy used for choose the proper number of nodes in the hidden layer it is starting form small number of nodes. The number of hidden nodes is design changeable. The output layer consists of Y nodes. Y is number of outputs which designed in this paper to be 22 output; Arabic characters is 28, but 6 of them couldnt be written middle of the word, so, those 6 were excluded form this research.

While Figure-8 displays the main assumed structure of this research.


The proposed algorithm normally as all neural network based applications works in two modes of operation; training and running. In training, the historical data of 22 hypothesized separated Arabic characters are being preprocessed to be input to LVQ neural network. In this phase, the structure of the neural network will be built. Running phase most commonly known as neural network simulation mode- comprises that the system is ready to read an offline Arabic character and generate an intelligently estimated result f that characters image. Wavelet transformation and two statistical functions are computed for each 8X8 block and concatenated in one column array as described in section2; that represents the feature extraction phase. Five samples of each character is being used for training set, in total 110 characters represented the training input data. The output of neural network assumed to be digital 0 or 1; 0 for non-match and 1 if match. The actual neural network output will be ration between 0 and 1 for the percent of match. The quantizing function is used to find the greatest value of the output result if the difference between it and the nearest one is greater that threshold value. Buy testing 2 samples for each character (44 character in total) a suitable threshold was chosen to be 0.4. Preprocessing of the input character image include resizing of that image, filtration, converting to binary, spatial segmentation to 20 blocks of the size 8X8, and converting it to one dimensional array. De-blurring filter is being used to remove the noise and any blurring effects on the image.

Figure-7: Diagram of the proposed system

5 PROPOSED MODEL Detailed illustration of the proposed model structure is shown in Figure-7, which consists of starts in preprocessing of the character segment image and ends by quantizing the neural network output. Preprocessing and post-processing are complementary phases and the core of this research is feature extraction and neural network intelligent recognizer.

Figure-8: main assumed model of this paper.

68

6 RESULTS The training data set (historical data set) was described in the last section. The testing data set that used to test this contributed algorithm consists of two categories. One category consists of two sample of each one of the 22 character (44 character in total) that were used in studying the algorithm parameters such as threshold value of neural network output, neural network structure, multi-level wavelet decomposition and the best level that used in such, and others. The second category is used for performance measurement of the contributed algorithm (i.e. accuracy of each single character recognition). The second category consists of 360 different image of the 22 characters. While each character has 8-18 samples. The data set was recorded by 8 different persons; all of those use the most common Arabic characters styles which is Roqa style. Figure-9 displays samples of the testing data set.

85% 85% 69% 69% 77% 87% 89% 90% 78% 78% 79% 79% 86% 84% 71% 82% 89% 82%

Table-3: MAPE for different testing datasets

MAPE Trial
Figure-9: Sample characters of the testing data set. Table-1 shows the results of recognition for each single character. Where, table-2 shows the Mean Absolute Percentage Error (MAPE) for different trials of validation test. The first record in table-2 is measuring the MAPE of 200 characters those written by four different persons. While the next record represents the MAPE for 160 characters written by different four persons. The last record is the net using all data set. Table-1: Recognition results for each character Input Character of the networks B, C, and D Testing Accuracy of the Character 83% 82% 82% 86%

Trial 1, on 4 different persons Trial 2, on another 4 different persons Trial 3, on all 8 persons

81.7% 81.25% 81.5%

7 REFERENCES
[1] Farah Hanna Zawaideh, Arabic Hand Written Character Recognition Using Modified Multi-Neural Network. CIS Journal, VOL. 3, NO. 7, Juyl 2012 [2] R. Al-Hajj, L. Likforman-Sulem, and C. Mokbel. Arabic handwriting recognition using baseline dependant features and hidden markov modeling. In 8th Inter. Conf. on Document Analysis and Recognition, pages 893897, 2005. [3] Burrus, C., R. Gopinath and H. Guo. Introduction to wavelets andwavelet Transforms .1st edition. Prentice Hall. 1998. [4] H. Boubaker, M. Kherallah, and A. M. Alimi. New algorithm of straight or curved baseline detection for short arabic handwritten

69

writing. In 10thInter. Conf. on Document Analysis and Recognition, 2009. [5] F Murtagh, J.L Strack. O Renaud, On Neuro-Wavelet Modeling, School of Computer Science, Queens University Belfast, Northern Ireland, France, 2003. [6] using genetic algorithm. In 4th International Conference on Computer Science Practice in Arabic (CSPA), 2008. [7] V. Margner, M. Pechwitz, and H. El Abed. ICDAR 2005 .Arabic handwriting recognition competition. In Proceedings of the 8th Inter. Conf. on Document Analysis and Recognition, volume 1, pages 7074, 2005. [8] ligne par reconstruction de lordre du trace en vue de lindexation de documents darchives. PhD thesis, INSA of Rennes, 2007.