<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>A simpli ed feature vector obtained by wavelets method for fast and accurate recognition of handwritten characters o -line</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Carlos Ram rez Pin~a</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vianney Mun~oz-Jimenez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Rosa Maria Valdovinos Rosas</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>J. A. Hernandez Serv n</string-name>
          <email>xoseahernandezg@uaemex.mx</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Facultad de Ingenier a, Universidad Autonoma del Estado de Mexico</institution>
          ,
          <addr-line>Toluca, Estado de</addr-line>
          <country country="MX">Mexico</country>
        </aff>
      </contrib-group>
      <fpage>90</fpage>
      <lpage>97</lpage>
      <abstract>
        <p>This paper presents an algorithm for simpli ed features extraction based on a wavelet method for o -line recognition of handwritten character. The proposal is applied to a set of 3250 handwritten symbols, which include the digits and the upper and lowercase character of English alphabet. The e ectiveness of our algorithm is tested by comparison against the descriptors FKI and Wavelets using the Nearest Neighbour rule as classi er. The classi cation is measured in percentage of overall Accuracy and the processing time obtained by each methods.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The study of character recognition is divided into o -line and on-line methods
mainly [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The di erence between them lies on how handwriting is done and
analyzed. For the o -line recognition, the data are taken to be a static
representation of text, since it can not be establish the order on which they were
produced by a machine or handwritten [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. On the other hand, in the on-line
recognition, the original data are glyphs and points, which are normally storage
on regular intervals of time [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        This paper is focused on the o -line recognition of handwritten characters.
The study is based on descriptors such as FKI [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and discrete wavelets [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. The
dataset used in this work have been generated by [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] which includes digits and
characters (0 9, A-Z, a-z). Our proposal was compared with the descriptors
FKI and the discrete wavelet, in accuracy and processing time terms using the
Nearest Neighbour rule 1-NN as classi er.
1.1
      </p>
      <sec id="sec-1-1">
        <title>The FKI o ine features</title>
        <p>
          The FKI algorithm was proposed by [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ] which obtain a set of geometric features
that has been used in handwriting recognition. That is, given a binary image
? Corresponding author
S(x; y) of size M N , the method computes nine geometrical features ci where
i 2 f1; :::; 9g for each entry column x such that 1 x M . This is done on
each column of the image, thus the method obtain 9N features in total. The
authors also have features such as number of black and white pixels and their
transitions, centre of gravity and second order moments.
1.2
        </p>
      </sec>
      <sec id="sec-1-2">
        <title>Wavelets Descriptors</title>
        <p>
          The wavelets are transformations which decompose an image into multi-resolution
descriptions localized in space and frequency domain providing a smaller frames
of the images. The frequency domain analyse di erent variations that has been
successfully used in many image processing applications [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <p>The DWT decompose the image S into wavelet blocks, an average image of
smaller size than the original for a factor of two, and three more images
containing the gradients and contours of itself, according to the following de nitions:
Wg(j; m; n) = p
Whi (j; m; n) = p
1
1
M N x=0 y=0
M N x=0 y=0</p>
        <p>M 1 N 1
X X S(x; y)gjimn(x; y)
M 1 N 1
X X S(x; y)hijmn(x; y)
(1)
(2)
where g is g(x) = 1 x 2 [0; 21 ] and h belongs to the Daubechies family of
1 x 2 [ 12 ; 1]
mother wavelets; where as before i 2 fH; V; Dg. The wavelet blocks will be
denoted by Aj = Wg(j; m; n), Hj = WhH (j; m; n), Vj = WhV (j; m; n) and Dj =
WhD(j; m; n) where j is an index that indicates level of decomposition of the
image (see Figure 1 (b)).</p>
        <p>
          Frequency domain analysis is the background of representation of the feature
vector. Di erent textural and statistical values are also computed which enrich
the feature vector, like mean ( ) and standard deviation ( ) [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. The type of
entropies in the reference, which we have also implemented for comparison to
our proposal, are like shannon, Log energy, threshold, sure and norm, which are
computed on approximation the Aj coe cient block, as illustrated in Figure 1
(a).
2
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Our Proposal</title>
      <p>The main objective of the proposal method is to obtain an strategy which
combine feature extraction methods in handwritten characters o -line and the
recognition process of these characters in an accurate way. For that, segmentation and
binarization methods were used before the actual feature extraction.
2.1</p>
      <sec id="sec-2-1">
        <title>Binarization and segmentation</title>
        <p>A pre-processing to the image is applied before feature extraction in order to
eliminating noise of the image. In this way, rstly the images are converted into
a binary type by analysing their histogram in a gray scale, in order to determine
the optimal cut threshold. On a second stage, the symbol image is segmented
extracting pixels corresponding to the symbol only. Finally, the symbol image
are resized to a xed size of 120 120. The size has been xed in order to get
optimal results when the wavelet transform is applied.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Feature extraction by a simpli ed vector feature using wavelets method</title>
        <p>
          Feature extraction in the context of image processing, speci cally in
handwriting character recognition, is based on two types [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]; structured and statistical
methods. The rst one, are derived from the probability distributions of pixels,
e.g. zones, rst and second moments, projection and direction histograms. The
second one, are based on topological and geometrical properties of the object
under study.
        </p>
        <p>
          The Wavelet transformation is used to compress an image by transforming
it into the frequency domain [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. In order to accomplish this, the image are
represented using a set of basic functions produced by translation and scale up
of a mother function. Let S(x; y) be an input image, where x; y represent indexes,
whereas S(x; y) is the pixel value. In this paper, a 2D wavelet transform is used,
the scaling of S(x; y) is given by the functions g and h.
        </p>
        <p>Coe cients wavelet analysis are obtained from three blocks; it was observed
that wavelet coe cient of the third block are features of the input image, that
is, it maintains representative information of the symbol. The wavelet
transformation for the third state generate four images of size 15 15, A2, H2, V2
and D2 with 17 features correspondlly. The information from the approximation
coe cients A2 in third block keeps the information of the input image and the
other four coe cients obtained represent 12% of the original image size and 25%
of the size of the A0 coe cient.</p>
        <p>S(x; y)
g[x]
h[x]
along x
along x
#2 gjmn(x; y)
#2 hjmn(x; y)
(a)
g[y]
h[y]
g[y]
h[y]
along y
along y
along y
along y
#2 Aj AV22DH22 H1
#2 Vj
#2 Dj
#2 Hj</p>
        <p>V1 D1</p>
        <p>V0
(b)</p>
        <p>H0
D0</p>
        <p>For each coe cient obtained, were calculated the median, entropy and
standard deviation; additionally ve entropy wavelets are also calculated: Shannon,
Log energy, Threshold, sure and norm; with this in mind we are reducing an
amount of 77% the statistical measures as compared with the original method.</p>
        <p>The Algorithm 1 represent the feature extraction of the vector formed by 21
features proposed for this study.</p>
        <p>Algorithm 1 Simpli ed vector feature using Wavelet method
Require: Gray scale input image
Ensure: Set of 21 features
1: Convert image to binary type
2: Apply the wavelet transform to obtain the coe cients of the third block A2, H2,</p>
        <p>V2, D2 thus obtainig four features.
3: Calculate the mean ( ), standard deviation ( ), entropy (E) thus giving 12 features
4: Calculate the entropies shannon, Log energy, threshold, sure, norm from A2 thus
generating ve features at this stage.
5: Repeat steps 1 to 4, for each symbol image in order to form its feature vector.
3
3.1</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Tools and Methods</title>
      <sec id="sec-3-1">
        <title>Data set</title>
        <p>
          The results here reported correspond to the experiments over the data set
generated by [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ], which includes digits 0 9 with 10 classes and 527 feature vectors,
the uppercase characters A Z form 26 classes and 1402 feature vectors, the
lowercase characters a z with 26 classes and 1321 feature vectors.
        </p>
        <p>
          For the data, the 10-fold cross-validation method was employed to estimate
the classi cation error: 80% of the available patterns were for training purposes
and 20% for the test set. On the other hand, we use as base classi er the 1-NN
rule, expressed as [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]:
        </p>
        <p>vu e
E (V1; V2) = utX(V1[j]
j=1</p>
        <p>V2[j])2
(3)
Where E is the euclidean distance between vectors V1 test feature and V2
training feature .
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>The con guration of the method</title>
        <p>The experiments were carried out datasets with di erent dimension of the feature
vector, depending on the method used. That is:
{ The FKI method, obtain nine features by column that containing the image,
therefore the feature vector will have nine features by the number of columns
that containing the image.
{ Wavelts method obtain 55 features. The vector dimension is computed by
the matrix of A0, which generates ( x2 ) ( y2 ) features, where, x and y are the
original image size, plus 54 features which represent the statistical averages.
{ The Simpli ed vector features using Wavelet method obtain a vector with
21 features. That is, the whole of the features is ( x8 ) ( y8 ) plus 17 features
which represent the statistical averages.
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Results and Discussion</title>
      <p>In this paper, we study two descriptor methods: FKI and Wavelets, in
comparison with our wavelets method for recognition of handwritten characters o -line,
in Accuracy and processing time terms. The Accuracy is obtained as follow:</p>
      <p>Classes
(c)</p>
      <p>
        In order to identify the statistic signi cance between the methods, the
Table 1, shows the average accuracy for each dataset, bold values represent the
best results. For that, the rank of each method was calculated as follows [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]:
For each dataset, the method with the best accuracy receives rank 1, and the
worst receives rank 3. If there is a tie, the ranks are shared. Thus the overall
rank of a method is the averaged rank of this method across the data set used.
The results shown that the highest rank is obtained by the Wavelet method and
the method with lowest rank is the FKI method.
      </p>
      <p>
        To complete the analysis of statistical signi cance between the results, the
Namenyi test is used [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] DC = q q K(6KN+1) , where q is critical value, K is
the number of methods to compare and N is the number of training set used.
The test obtains a critical di erence (CD) to reject the assumptions on which
the corresponding p value is less than the adjusted . In this paper we compare
three feature selection methods and analyse their behaviour on three di erent
datasets; the corresponding value for qa are: q0:05 is 2.343 and for q0:10 is 2.052.
The critical di erence for q0:5 is 1.913 and for q0:10 is 1.675.
      </p>
      <p>To interpret the results it is stated that a particular method A is signi
cantly di erent than B, if the overall rank (A) + CD &lt; rank(B). From results
in Table 1 it is posible to identify that the behaviour of our method and the
Wavelets method do not o er statistic di erence, that is to say that it is
competitive with the Wavelets methdo. However, comparing the resulst respect to
the FKI method, the Wavelets method is signi catively better (1:3 (Wavelets
Rank) +1:675(CD0:10) &lt; 3 (FKI Rank)).
4.2</p>
      <sec id="sec-4-1">
        <title>Processing time</title>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions and future work</title>
      <p>
        In this paper we propose a method for reducing the feature vector for handwriting
recognition in comparison to the results reported by [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], in which method obtain
a vector with 55 features. Our method obtain a feature vector of 21 features
only, using the third moment of the wavelet transformation. This allow us to
reduce processing time compared to the FKI and traditional wavelet methods.
That means, our algorithm reduces the processing time from 74.65% to 16.51%
and decrease in size vector from 74.87% to 15% respect to FKI and Wavelet
method respectively.
      </p>
      <p>The future work will be focus on the processing of the dataset generated
through a simpli ed vector feature using Wavelet method. We are in search to
improve accuracy of the classi er by using the multilayer perceptron.</p>
      <p>Acknowledgment. This work has partially been supported by the
SEPPRODEP-3238 and 3834/2014/CIA Mexican Projects and by the Mexican
Science and Technology Council (CONACYT-Mexico) through the Masters
scholarship 702528.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Fotini</given-names>
            <surname>Simistira</surname>
          </string-name>
          , Vassilis Katsouros, and
          <string-name>
            <given-names>George</given-names>
            <surname>Carayannis</surname>
          </string-name>
          .
          <article-title>Recognition of online handwritten mathematical formulas using probabilistic fSVMsg and stochastic context free grammars</article-title>
          .
          <source>Pattern Recognition Letters</source>
          ,
          <volume>53</volume>
          :
          <fpage>85</fpage>
          {
          <fpage>92</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Ernesto</given-names>
            <surname>Tapia</surname>
          </string-name>
          .
          <article-title>A survey on recognition of on-line handwritten mathematical notation</article-title>
          .
          <source>In Technical Report B-07-01</source>
          . Freie Universitat Berlin, Germany,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Ernesto</given-names>
            <surname>Tapia</surname>
          </string-name>
          .
          <article-title>Understanding mathematics: A system for the recognition of online handwritten mathematical expressions</article-title>
          .
          <source>PhD thesis</source>
          , Freie Universitat Berlin, Germany,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>F.</given-names>
            <surname>Alvaro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Sanchez</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Bened</surname>
          </string-name>
          .
          <article-title>O ine features for classifying handwritten math symbols with recurrent neural networks</article-title>
          .
          <source>In Pattern Recognition (ICPR)</source>
          ,
          <year>2014</year>
          22nd International Conference on, pages
          <volume>2944</volume>
          {
          <fpage>2949</fpage>
          ,
          <string-name>
            <surname>Aug</surname>
          </string-name>
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Sk</given-names>
            <surname>Md</surname>
          </string-name>
          <string-name>
            <given-names>Obaidullah</given-names>
            , Chayan Halder,
            <surname>Nibaran Das</surname>
          </string-name>
          , and
          <string-name>
            <given-names>Kaushik</given-names>
            <surname>Roy</surname>
          </string-name>
          .
          <article-title>Numeral script identi cation from handwritten document images</article-title>
          .
          <source>Procedia Computer Science</source>
          ,
          <volume>54</volume>
          :
          <fpage>585</fpage>
          {
          <fpage>594</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. Teo lo Em dio de Campos, Bodla Rakesh Babu, and
          <string-name>
            <given-names>Manik</given-names>
            <surname>Varma</surname>
          </string-name>
          .
          <article-title>Character Recognition in Natural Images</article-title>
          .
          <source>Proceedings of the International Conference on Computer Vision Theory and Applications</source>
          , Lisbon, Portugal,
          <source>February</source>
          <volume>273</volume>
          {
          <fpage>280</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>K. B. Raja</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Sindhu</surname>
            ,
            <given-names>T. D.</given-names>
          </string-name>
          <string-name>
            <surname>Mahalakshmi</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Akshatha</surname>
            ,
            <given-names>B. K.</given-names>
          </string-name>
          <string-name>
            <surname>Nithin</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Sarvajith</surname>
            ,
            <given-names>K. R.</given-names>
          </string-name>
          <string-name>
            <surname>Venugopal</surname>
            , and
            <given-names>L. M.</given-names>
          </string-name>
          <string-name>
            <surname>Patnaik</surname>
          </string-name>
          .
          <article-title>Robust image adaptive steganography using integer wavelets</article-title>
          .
          <source>In Communication Systems Software and Middleware and Workshops</source>
          ,
          <year>2008</year>
          .
          <source>COMSWARE</source>
          <year>2008</year>
          . 3rd International Conference on, pages
          <volume>614</volume>
          {
          <fpage>621</fpage>
          ,
          <string-name>
            <surname>Jan</surname>
          </string-name>
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>Hedieh</given-names>
            <surname>Sajedi</surname>
          </string-name>
          .
          <article-title>Handwriting recognition of digits, signs, and numerical strings in Persian</article-title>
          .
          <source>Computers &amp; Electrical Engineering</source>
          ,
          <volume>49</volume>
          :
          <fpage>52</fpage>
          {
          <fpage>65</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>R</given-names>
            <surname>Colom</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Rafael</given-names>
            <surname>Gadea</surname>
          </string-name>
          ,
          <string-name>
            <surname>A Sebastia</surname>
          </string-name>
          ,
          <article-title>Marcos Mart nez</article-title>
          , Vicente Herrero, and
          <string-name>
            <given-names>Vicente</given-names>
            <surname>Arnau</surname>
          </string-name>
          .
          <article-title>Transformada Discreta Wavelet 2-D para procesamiento de video en tiempo real</article-title>
          . Actas de las XII Jornadas de Paralelismo,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Cristina</surname>
          </string-name>
          <article-title>Garc a Cambronero and Irene Gomez Moreno</article-title>
          . Algoritmos de aprendizaje:
          <source>knn &amp; kmeans. Intelgenc a en Redes de Comunicacion</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>Janez</given-names>
            <surname>Demsar</surname>
          </string-name>
          .
          <article-title>Statistical comparisons of classi ers over multiple data sets</article-title>
          .
          <source>The Journal of Machine Learning Research</source>
          ,
          <volume>7</volume>
          :1{
          <fpage>30</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>