Post on 27-Jul-2020
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 345 ~
Recognition of Tifinaghe Handwritten Characters using Moments for feature extraction
Mohamed Abaynarh1, Hakim Elfadili2, Lahbib Zenkouar3
1Ecole Mohamadia d‘Ingenieurs RABAT
mohamed.abaynarh@gmail.com 2Ecole Nationale des Sciences Appliquées, FES
el_fadili_hakim@yahoo.fr 3Ecole Mohamadia d‘Ingenieurs RABAT
Lahbibzenkouar@emi.ac.ma
Abstract
There has been a significant amount of research in various aspects of writing based user interfaces including interactive design tools, studies of gestures, software toolkits, ink beautification, and sketch recognition. In this paper, we shall focus on the recognition of handwritten characters that are used in common applications.
Different people may use different stroke-order, number, and direction to draw the same shape of any character. In fact, handwritten characters are imprecise in nature such that corners are not always sharp, lines are not perfectly straight, and curves are not necessarily smooth. A robust recognition system has to account for all of these factors. In this paper, we shall consider a statistical approach to Handwritten Character Recognition using Legendre moments as features. These features will be the input of character classification algorithms based on nearest neighbor criteria (NN) (Khotanzad, A. and Hong) and hidden neural network.
Experimentation has been performed on a local database of characters. Experimental results show the robustness of the approach.
Keywords: Character recognition, Tifinaghe characters, Invariant moments, Neural network
Résumé Nous présentons dans ce manuscrit une méthode de reconnaissance de caractères amazighs manuscrits isolés, basée sur les moments invariants. La base de données constituée est composée d‘images de l‗alphabet Tifinaghe écrits par 28 scripteurs pour un total de 924 images de taille normalisée
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 346 ~
100x100, Elle est divisée en une base d‘apprentissage de 726 caractères et une base de test de 198 caractères. Des algorithmes d‘extraction d‘attributs appropriés à base de la méthode des moments serviront à alimenter les classifieurs utilisés : la distance minimale, les plus proches voisins, et les réseaux des neurones. Les résultats expérimentaux dressent une étude comparative entre les différents algorithmes en termes de taux de reconnaissance
Mots clés : reconnaissance de caractères, caractères Tifinaghe, Moments invariants, Réseaux de neurones
1-Introduction Character Recognition is a part of Pattern Recognition. It‘s the research area that studies the operation and design of systems that recognize patterns in data. It encloses sub disciplines like discriminate analysis, feature extraction, error estimation, cluster analysis (also called statistical pattern recognition), grammatical inference and parsing. Important application areas are image analysis, character recognition, speech analysis, man and machine diagnostics, person identification and industrial inspection.
Handwriting is a simple and natural mode of expression. It is especially desirable for conceptual design, both on an Individual basis and in a collaborative environment. It is used in a significant amount of research to date in various aspects of sketch-based user interfaces: Interactive design tools, studies of gestures, software toolkits, ink beautification, and sketch recognition. The work in off-line character recognition can be roughly categorized into statistical, structural, and rule-based approaches.
In this paper, we consider a statistical approach to Tifinaghe handwritten characters recognition using Legendre moments as features. In fact, Legendre moments are a class of orthogonal moments and have been shown effective in terms of image representation.
Legendre moments can be easily constructed to an arbitrary order. Although higher order moments carry more fine details of an image, they are also more susceptible to noise. Therefore we have experimented with different orders of Legendre moments to determine the optimal order for our problem, for this, we introduce the Maximum Entropy Principle (MEP) as a selection criterion (C.-H. Tech and R.T. Chin, 1988) that extracts optimal character features. The main goal is to reduce the input dimensionality of the classification problem by eliminating features with low information content or high redundancy with respect to other features.
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 347 ~
The second step (recognition) is achieved by using minimum mean distance, multilayer hidden neural network and nearest neighbor as classifier, where finite vectors obtained in the preprocessing phase are used as inputs. Experimental results are obtained using a collected database of handwritten Amazigh characters.
2-Database construction Since there is no publicly available handwritten database of Tifinaghe characters, we have created a test corpus by gathering data from different and independent people, referring to The alphabet Tifinaghe adopted by IRCAM,( L. Zenkouar,2004,2008) which is composed of thirty-three characters representing consonants and vowels as shown in Figure 1.
So far, we have gathered data from 28 users. Each user was asked to write one example for each of The 33 characters of Tifinaghe alphabet shown in Figure 1, the resulting dataset contains a total of 28 users overall and 924 characters.
Our database is composed of isolated character images of Tifinaghe alphabet, gathered from 28 users, to obtain 924 character images
The database has the following properties:
gray level Images coded with 8 bytes
Figure 8 : the characters set representing
the Amazigh alphabet adopted by IRCAM
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 348 ~
All images have 100 100 size
Training and test databases are written by different users, it‘s divided on
training database containing 726 characters, and test database containing
198 characters
Indeed, our database contain 924 gray level character images,
3- Features extraction In order to design a good character recognition system, the choice of feature extractor is very crucial. In fact, the feature vectors should contain the most pertinent information about the character to be recognized while having a low dimensionality. In the statistics-based feature extraction approaches, global information is used to create a set of feature vector elements to perform recognition. The low-dimensional feature vector reduces the computational burden of the recognition system; however, if the choice of the feature elements is not properly made, this in turn may affect the classification performance.
Also, as the number of feature elements in the feature extraction step decreases, the neural network classifier becomes small with a simple structure.
Statistics-based approaches for feature extraction are very important in pattern recognition for their computational efficiency and their use of global information in an image for extracting features (J. Haddadnia and al, 2001). Especially, the advantages of considering orthogonal moments are that they are shift, and scale invariants and are very robust in the presence of noise. The invariant properties of moments are utilized as pattern sensitive features in classification and recognition applications (C. H. Teh and R. T. Chin, 1988; S. O. Belkasim and al 1991). Statistical moments represent average values of processes (powered to order n) when a random variable is involved. Here, the original and pre-processed images were considered as two dimensional arrays of a random variable of dimension N×N. The random variables took values from level 0 to 255, as the images were considered in gray levels quantized in 8 bits
(Gray levels were obtained from BMP format). Moments were calculated for the random variable X, which was identified with the image block. In addition, X is a
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 349 ~
matrix of two coordinates (x,y) obtained from the image matrix f(x,y). The definition of (p+q) order invariant moment around the origin is given by:
The Legendre moments of order (p + q) are defined for a given real image intensity function f (x, y) as
qp, =
,dxdyy,xfyPxP4
1q21p2q
R R
p
Where yxf , is assumed to have bounded support
The Legendre polynomials xPp are a complete orthogonal basis set on the interval 1,1 for an order p they are defined as
p
p
p
pp xdx
d
pxp 1
!2
1 2
The orthogonality property is guaranteed by the equality
Where q,p is the Kronecker function, that is,
otherwise0
qpif1q,p
3-1-Image reconstruction by Legendre moments
By taking the orthogonality principle into consideration, the image function y,xf can be written as an infinite series expansion in terms of Legendre
polynomials over the square 1,11,1 :
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 350 ~
Where the Legendre moments are computed over the same square
If only Legendre moments of order smaller than or equal to are given, then the function y,xf can be approximated by a continuous function which is a truncated series:
Furthermore, s'
q,p must be replaced by their numerical approximation which will
be pointed out on the following section. The number of moments used in the reconstruction of image for a given is defined by
3-2-Approximation of the Legendre moments
In practice the Legendre moments have to be computed from sampled data, that is, the rectangular sampling of the original image function y,xf , producing the set
of samples ji y,xf with an N,M array of pixels, thus we define the discrete
version of q,p
in terms of summation by the traditional commonly used formula (C.-H. Tech and R.T. Chin, 1988):
Where 1ii xxx and 1jj yyy are sampling intervals in the x and y
directions.
It is clear, however, that q,p
~ is not a very accurate approximation of q,p , in
particular, when the moment order qp increases
The piecewise constant approximation of y,xf proposed recently by Liao and Pawlak
(S. X. Liao, 1996; S. X. Liao, 1993), yields the following approximation ofq,p
:
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 351 ~
With the supposition that y,xf is piecewise constant over the interval
yy,yyxx,xx jjii
And where
represents the integration of the polynomial yPxPqp
around the ji
y,x pixel.
This approximation allows a good quality of reconstructed images by reducing the reconstruction error.
4-Learning and classification Three different classification techniques have been evaluated: the minimum mean distance (MMD), the nearest neighbor (NN) (Khotanzad, A. and Hong), and hidden neural network. The classifiers learn from the training set in which every example is represented with a multi-dimensional feature vector composed of extracted Legendre moments.
4-1-Minimum Mean Distance (MMD)
In the minimum distance classifier, each character class, Ck, is represented with the sample means, μk, learned from the training examples. When a new example is given, it is compared to each character class by calculating the Euclidean distance. The example is assigned to class k for which the distance is minimum.
The training example of class k, ck, with the smallest distance to the test example, a, is the nearest neighbour of a, the equations are shown below:
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 352 ~
2
1
)(),(
m
i
k
ii
k cacad
4-2-Nearest Neighbour (NN)
During training, the nearest neighbour classifier uses the feature vectors of the samples in the training set using the corresponding moments. In the classification stage, the classifier extracts features from the test example and computes the Euclidean distance, d, between the example and every training example.
The test example is classified to the class receiving the maximum number of votes. The training data is scaled to be in the range of [0, 1] in order to avoid numerical problems. The test data is also scaled according to the parameters obtained during the training stage
4-3-Neural Network
Neural network is widely used as a classifier in many recognition systems. Neural networks have been employed and compared to conventional classifiers for a number of classification problems. The results have shown that the accuracy of the neural network approaches is equivalent to, or slightly better than, other methods. Also, due to the simplicity, generality, and good learning ability of the neural networks, these types of classifiers are found to be more efficient (W. Zhou, 1999) Therefore, neural networks are an excellent candidate for pattern classification (J. Haddadnia, and al, 2002), where attempts have been carried out to make the learning process in this type of classification faster than normally required for the multilayer neural networks (W. Zhou, 1999) In this paper, a neural network is used as a classifier in character recognition where the inputs to the neural network are feature vectors derived from the proposed feature extraction technique described in the previous section (H. El fadili, 2006)
The output of each node is a pondered sum of its inputs:
N
1kkikii
wao
with k the k
thcomposant of sample vector.
ikw is the weight of the connection which rely unit k and unit i.
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 353 ~
a i is the activation of the unit i,
is the activation function of the units which is a threshold function with the following expression :
xsi1
xsi1x
Figure 2: Simple Perceptron
5-Experimentation We have designed two sets of experiments based on these two usage scenarios to evaluate the recognition system. In this experiment, we are interested in determining how well the pre-trained recognizer works for a new user under different classification methods. Each time, a different individual‘s data set is held out for a test set, and a classifier is trained with all other users‘ data and then test on the holdout set. For each round, there are 726 characters for training, and 198 characters for testing.
MMD (%) Nearest Neighbour (%) Neural Network (%) 61 24 9
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 354 ~
Table 1: comparison of error rate for the test set of the three used classification methods
Table 1 shows the classifier error rate of three approaches, the classifier error rate (%) is considered as the number of misclassifications in the training (test) phase over the total number of training (test) images.
From Table 1 we can see that neural network method wit, hidden layers (only two hidden layer) and hidden nodes can easily provide excellent results in terms of test error
Figure 3: recognition rate of training set of the same architecture
and two different samples
The recognition converges faster when a the number of iterations is great, due to the very small number of training examples
We believe it is because there is a great level of consistency in how a user draws shape (character). Of course, the more examples, the better is to train the recognizer
6-Conclusion In this paper an efficient feature extraction technique is developed, based on the orthogonal moments using Invariant Legendre moments. We have focused on the discrimination power of Legendre moments and have shown that the proposed
0 200 400 600 800 1000 1200 1400 1600 1800 20000
100
200
300
400
500
600
700
800
726 samples
Nodes per layers: 231,200,150,150,33
264 samples
Nodes per layers: 231,200,150,150,33
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 355 ~
Legendre moment extraction method with hidden neural network classifier is tolerant to shape distortion, while showing improved performances in terms of recognition rate and generalization ability.
Références C. H. Teh and R. T. Chin, ―On image analysis by the methods of moments,‖ IEEE
Trans. on Pattern Analysis and Machine Intelligence, vol. 10, no. 4, pp. 496–513, 1988.
C.-H. Tech and R.T. Chin, ―On image analysis by the methods of moments,‖ IEEE
Trans, on Pattern Analysis and Machine Intelligence, vol. 10, no 4, pp.496-513, 1988.
H. El fadili, ―Conception d‘un système de reconnaissance de forme par combinaison de la méthode des moments avec un classifieur neuronal optimisé par algorithme d‘évolution, ‖ Ph.D. thesis, Laboratoire d‘Electronique, Signaux-Systèmes et d‘Informatique, University of Sidi Mohamed ben Abdellah, Fes, Morocco, 2006.
J. Haddadnia, K. Faez, and P. Moallem, ―Neural network based face recognition with moments invariant,‖ in Proc. IEEE International Conference on Image Processing C P ’01 vol. 1, pp. 1018–1021, Thessaloniki, Greece, October 2001.
J. Haddadnia, M. Ahmadi, and K. Faez, ―An efficient method for recognition of
human faces using higher orders pseudo Zernike moment invariant,‖ in Proc.
5th International Conference On Automatic Face and Gesture Recognition (FG
’02 pp. 330–335,Washington, DC, USA, May 2002. J. Haddadnia, K. Faez, and P. Moallem, ―Neural network based face recognition
with moments invariant,‖ in Proc. IEEE International Conference on Image
Processing C P ’01 vol. 1, pp. 1018–1021, Thessaloniki, Greece, October 2001.
J. Haddadnia, M. Ahmadi, K. Faez‖An Efficient Feature Extraction Method with Pseudo-Zernike Moment in RBF Neural Network-Based Human Face Recognition System‖ EURASIP Journal on Applied Signal Processing, 890–901 2003 Hindawi Publishing Corporation
J. Haddadnia, M. Ahmadi, and K. Faez, ―A hybrid learning RBF neural network
for human face recognition with pseudo Zernike moment invariant,‖ in IEEE
nternational Joint Conference On Neural Network JCNN ’02 pp. 11–16, Honolulu, Hawaii, USA, May 2002.
Khotanzad, A. and Hong, Y.H. Invariant Image Recognition by Zernike Moments.
IEEE Trans. on PAMI, 12(5). 289-497.
LES RESSOURCES LANGAGIERES : CONSTRUCTION ET EXPLOITATION
~ 356 ~
L. Yingwei, N. Sundararajan, and P. Saratchandran, ―Performance evaluation of a
sequential minimal radial basis function (RBF) neural network learning algorithm,‖ IEEE Transactions on Neural Networks, vol. 9, no. 2, pp. 308–318, 1998.
L. Zenkouar, « L‘écriture Amazighe Tifinaghe et Unicode », in Etudes et
documents berbères. Paris (France). n° 22, pp. 175—192, 2004 L. Zenkouar, « Normes des technologies de l‘information pour l‘ancrage de
l‘écriture amazighe », revue Etudes et Documents Berbères, Paris(France), n°27, pp. 159-172, 2008
S. O. Belkasim, M. Shridhar, and M. Ahmadi, ―Pattern recognition with moment
invariants: a comparative study and new results,‖ Pattern Recognition, vol. 24, no. 12, pp. 1117–1138, 1991.
Stone, M. Cross-validatory choice and assessment of statistical predictions (with discussion). J. Royal Statist. Soc. B, 36. 111-147.
S. X. Liao and M. Pawlak, ‖On image analysis by moments,‖ IEEE Trans, on
Pattern Analysis and Machine Intelligence, vol. 18,no. 3, pp.254-266,1996. S. X. Liao, Image analysis by moments, Ph.D. thesis, Department of Electrical and
computer Engineering, University of Manitoba, Winnipeg, Manitoba, Canada, 1993.
W. Zhou, ―Verification of the nonparametric characteristics of backpropagation
neural networks for image classification,‖ IEEE Transactions on Geoscience
and Remote Sensing, vol. 37,no. 2, pp. 771–779, 1999