SlideShare a Scribd company logo
C6 agramakrishnan1
Tamil Online handwriting recognition
                       using fractal features
                            Rituraj Kunwar and A G Ramakrishnan
               MILE Lab, Dept of Electrical Engineering, Indian Institute of Science, Bangalore.




Abstract

We present a fractal coding method to recognize online handwritten Tamil characters and propose a
novel technique to increase the efficiency in terms of time while coding and decoding. This technique
exploits the redundancy in data, thereby achieving better compression and usage of lesser memory. It
also reduces the encoding time and causes little distortion during reconstruction. Experiments have
been conducted to use these fractal codes to classify the online handwritten Tamil characters from the
IWFHR 2006 competition dataset. In one approach, we use coding and decoding process. A
recognition accuracy of 90% has been achieved by using DTW for distortion evaluation during
classification and encoding processes as compared to 78% using nearest neighbor classifier. In other
experiments, we use the fractal code, fractal dimensions and features derived from fractal codes as
features in separate classifiers. Whereas the fractal code was successful as a feature, the other two
features are not able to capture the wide within-class variations.

Introduction
Fractal codes are the compressed representation of patterns, based on iterative contractive
transformations in metric spaces proposed by Barnsley. A simplified version of the fractal block
coding technique for digital images has been used to encode the 1-D ordered online handwritten
character patterns. A novel partitioning algorithm has been proposed to reduce the computation
complexity of encoding and decoding, with a minor fall in recognition accuracy.

Building fractal codes for handwritten characters
We need to find the collection of affine transforms of the online handwritten character. The raw online
handwritten character is first preprocessed using three steps: (i) smoothing (ii) re-sampling the
variable number of points in each character to 60 points. (iii) normalizing the x and y coordinates
between 0 and 1. The handwritten character locus is divided into non-overlapping range segments.
Each range segment has a fixed number of points (R) in it. Last point of each range becomes the first
point of the next range, except in the case of the last range.

Creating a pool of domain segments
The domain pool is formed for each character locus. Domain pool is the collection of all possible
domain segments. The number of points in each domain segment is chosen to be double that in each
range segment, D = 2R. Domain pool can be obtained by sliding the window containing D points at a
time. The window is first located at the beginning of the stroke. The window is moved along the




                                                     142
stroke by δ points, in such a way that it does not cross the end point of the stroke. The step δ has been
chosen as R/2 in our experiments.



Constructing transformed Domain pool
Transformed domain pool is constructed by multiplying each domain segment with the eight
isometrics that involve reflection and rotation about different axes. To begin with, each domain is
translated to its centroid and scaled down by the contractivity factor (s=0.5). The following
transformations are then applied to each of the candidate domain segment.




The above transformations produce a whole family of geometrically related domain segments. In
domain pool, matching blocks will be looked for encoding the online handwritten character.

Searching for the most similar domain segment for each range: Each affine transformed domain
segment is re-sampled into R points and then its centroid is translated to that of the concerned range
segment. Distance between them is found. Similarly, distances w.r.t to the all the domain segments is
calculated. The most similar domain segment corresponding to each range segment is identified and
fractal code is stored corresponding to the particular range. The fractal codes are similarly obtained
for all the online handwritten characters.
Fractal codes corresponding to each range segment consists of (1) the range segment index, (2) the
range segment centroid, (3) index of the most similar domain segment and (4) the index of
transformation used out of the 8 transformations.
Issue related to constructing fractal codes
The whole character is divided into range segments of equal number of points. Smaller the number of
points in each range segment, the more minutely we can capture the complexity in any region of the
character. The number of range segments per character is thus inversely proportional to the number of
points in each range. Again, the encoding speed is inversely proportional to the number of range
segments per character. It has been noted that there are certain region in a character where the
curliness is minimal so in those area the range segment size could be increased still encoding the
region precisely.
Steps to encode a handwritten character where the number of points in each range is variable:




                                  Fig 1. Tamil handwritten character ‘aa’


                                                   143
Cumulative angle ‘θC’ is calculated starting from the first point and traversing the character stroke till
it crosses an empirically set threshold of θT. Smaller the threshold, finer is the encoding. Figure 1
shows a sample of the handwritten character /aa/ in Tamil. Figure 2 shows the effect of the choice of
the angle threshold on the reconstruction error.




Fig 2. Illustration of the distortion in reconstruction with different angle thresholds ϕT. Here
reconstruction is performed from the fractal codes of the character /aa/ shown in Fig 1. For encoding,
different values of range sizes are used, namely, 4, 8, 12, 16 and 20.

Algorithm for partitioning

  1.   Domain pool of different sizes (namely 8, 16, 24, 32, 40) are constructed corresponding to the
       range sizes of 4, 8, 12, 16 and 20. By size, we mean the number of points in each domain.
  2.   Start from the first point and move along the character from one point to the next and calculate
       the cumulative change in angle θC.
  3.   The No. of points (K) till the point penultimate to the one, where θC crosses the threshold ϕT is
       noted.
  4.   The range size closest to and less than K is chosen. The most suitable domain is chosen from the
       corresponding domain pool and the fractal codes are stored.
  5.   The last point of the present range is then considered as the first point of the new range and the
       process repeats starting from step 2.

Along with the fractal codes, the size of the range chosen is also stored. If the end point is reached
with θC < ϕT, then step 4 is followed, where K includes the last point also since θC < ϕT). If at the end,
few points are left which is less than the smallest range, they are discarded else step 4 is repeated.

Algorithm for reconstruction: Banach’s contractive mapping theorem states: “If a contractive
mapping ‘W’ (which are the fractal codes here) is defined, then iterative application of the mapping on
any sequence of the same space will lead to a Cauchy’s sequence which will converge to a fixed,
unique point.

CASE I: Range having fixed number of points
A random initial pattern having the same number of points is taken or generated. A domain pool of
size double that of the range is created in a manner similar to the encoding process. First fractal code is

                                                   144
taken corresponding to the first range of the pattern, and operations are performed on the
corresponding domain indicated by the domain index in the code of first range. The indicated domain
segment’s origin is shifted to its origin and then it is scaled down by the contractivity factor (0.5 here).
Then the affine transformation as indicated in the code is applied on the scaled domain segment.
Finally the transformed domain’s centroid is shifted to the range segment centroid as present in the
fractal code. The above steps are repeated to decode all the range segments. Then the whole decoded
locus is smoothened. The above steps are repeated till the termination condition is satisfied to finally
converge to a fixed and unique pattern. Termination condition could be (i) an empirically set fixed
number of iterations, sufficient for convergence or (ii) minimal or no distortion between two
consecutive patterns produced by 2 consecutive iterations.

CASE II: Range having variable number of points in each range
In this case, multiple domain pools are created out of the random pattern taken for the reconstruction.
Using the extra information given in the fractal code pertaining to the range size to be chosen so that
domain segment is picked up from the appropriate domain pool. The rest of the steps are same as the
case for the reconstruction with fixed range size. Using above two methods, fractal codes of any give
pattern can be created and the same pattern could be decoded using any random pattern after
applying this reconstruction algorithm iteratively for few times.

1. Classification by using fractal codes in construction and reconstruction:

The above fractal encoding and decoding method has been used for classification of characters. The
assumption behind this classification is that if a sample of a class (say /a/) is encoded and fractal
codes are obtained. The following process of reconstruction if started in 2 ways i.e. firstly by applying
the reconstruction algorithm iteratively on a random pattern of any different class (anything other
than ‘A’) and secondly doing the same on any random pattern of the same class (i.e. ‘A’) then the
distortion between the initial pattern and the pattern obtained after first iteration of reconstruction is
relatively much more in the first case than in the second. The reason behind this is that reconstruction
process leads to convergence to the pattern whose code is used for reconstruction. And since the class
of the initial pattern in the second case and the fractal code is same, the distortion in the second case is
smaller than the first case.




                                                   145
Fig 3. In the above image, reconstruction process is shown which starts from a random straight line
and finally converges to a pattern which is very close to the original pattern after 8 iterations. The
original pattern (in Fig 1) was encoded using different range sizes of 4, 8, 12, 16 and 20 with the
threshold angle of 30 degrees.

Character classification using fractal codes:




Fig. 4. The above image shows the distortion created, when an iteration of reconstruction was
performed. This shows that the distortion is huge if the starting pattern (above left) is very different
from the original pattern, whose fractal codes are used for reconstruction (in this case Fig 1).




Fig. 5. The above image shows the distortion created, when an iteration of reconstruction was
performed. This shows that the distortion is much less if the starting pattern (above left) is not very
different from the original pattern, whose fractal codes are used for reconstruction (in this case Fig 1).

Classification Algorithm

In the present research, fractal codes of ‘N’ samples of entire 156 classes are computed and stored. To
classify a test sample, following steps are taken.

        a) An iteration of the reconstruction algorithm is applied on the test sample using the fractal
            code of each sample of each class.
        b) The distortion ‘D’ is calculated between the initial pattern and the pattern obtained after
            one step of reconstruction. Thus the distortion matrix of size 156*N is obtained.
        c) The row number of the minimum value of the distortion is found from the distortion
            matrix and assigned to the test sample.

Distortion evaluation:

The distortion between two patterns can be evaluated by finding the distance between them. The
distance between 2 patterns is measured by Nearest Neighbor (NN) method. The issue with NN is
that the matching is done point by point which increases the distance unusually and thus decreases
the classification accuracy (evident from the result table). This drawback in distance evaluation of NN


                                                     146
is addressed by DTW pattern matching which is more intuitive. This intuitive matching takes place
because DTW matches similar subsections of the patterns thus producing a reasonable distance
between patterns. This method hence produces a remarkable increase in accuracy as shown Table 1.

Classification using the fractal codes as a features in the Nearest Neighbor (NN)

In this method, the fractal codes are used as features and fed into a NN classifier. An accuracy of
approximately 65% is obtained.

Classification using fractal dimension or features derived from the fractal codes

Fractal dimension is a unique identity of any pattern or object. However, because of the mere nature
of handwritten character recognition (i.e. large variation within every class), it fails completely to
classify any random sample. The features derived from the fractal codes like MMVA and DRCLM,
though successful in problems like face recognition and signature verification, fail in recognizing
handwritten characters.

Results

                Table 1: Results show how the DTW comparison during reconstruction
                                   impacts the recognition accuracy

                                                  No. of Training        No. of Testing      Accuracy
          Fixed Range Size       DTW used?
                                                        samples            samples            (in %)
                 4                  No                    20                  50               78.9
                 4                  Yes                   20                  50               90.4

Table 2: Results show the efficacy of the Partitioning algorithm in improving the efficiency of the
recognition system (in terms of time) with marginal drop in accuracy. Variable range sizes used (4, 8,
16, 24 and 32). No. of training and testing samples used are 5 and 30, respectively, No. of classes used
is 156.
               Threshold angle         DTW used for          Encoding time      Accuracy
                   (degree)        distortion evaluation?   per sample (sec)      (in %)

                      0                     Yes                     31               90.44
                      10                    Yes                     22               86.43
                      30                    Yes                     12               85.04
                      50                    Yes                     10               83.55
                      70                    Yes                      8               81.60
                      90                    Yes                      6               80.87

Acknowledgment: The authors thank Technology Development for Indian Languages (TDIL), DIT,
Government of India for funding this research, as part of the research consortium on Online
handwriting recognition of Indian languages.

References

      M. F. Barnsley, Fractals everywhere, New York: Academic, 1988.
      T. Tan and H. Yan, Face recognition by fractal transformations, IEEE ICASSP, 6:3405-3408, 1999.
      Mozaffari S., Faez K. and Faradji F, One Dimensional Fractal Coder for Online Signature
      Recognition, IEEE ICPR, 2:857- 860, 2006.

                                                  147

More Related Content

PDF
Arithmetic coding
PPT
Lec7 8 9_10 coding techniques
PPT
Adaptive Huffman Coding
PDF
Low complexity design of non binary ldpc decoder using extended min-sum algor...
DOCX
Arithmetic coding
PDF
vorlage
PDF
An Efficient Interpolation-Based Chase BCH Decoder
PPTX
Error control coding techniques
Arithmetic coding
Lec7 8 9_10 coding techniques
Adaptive Huffman Coding
Low complexity design of non binary ldpc decoder using extended min-sum algor...
Arithmetic coding
vorlage
An Efficient Interpolation-Based Chase BCH Decoder
Error control coding techniques

What's hot (20)

PDF
Error Control Coding -Introduction
PDF
PDF
Analysis of LDPC Codes under Wi-Max IEEE 802.16e
PPT
Compression Ii
PPTX
LDPC Encoding
PPT
(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...
PDF
E010422834
PDF
Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...
PPT
Arithmetic coding
PPTX
LDPC - Low Density Parity Check Matrix
PDF
A new Algorithm to construct LDPC codes with large stopping sets
PDF
(Paper) Efficient Evaluation Methods of Elementary Functions Suitable for SIM...
PDF
Performance comparison of eg ldpc codes
PPTX
Data Compression - Text Compression - Run Length Encoding
PDF
Thesis_Presentation
PDF
Data communication & computer networking: Huffman algorithm
PPTX
My review on low density parity check codes
PPT
Slides
PDF
Energy-Efficient LDPC Decoder using DVFS for binary sources
PDF
Module 4 Arithmetic Coding
Error Control Coding -Introduction
Analysis of LDPC Codes under Wi-Max IEEE 802.16e
Compression Ii
LDPC Encoding
(Slides) Efficient Evaluation Methods of Elementary Functions Suitable for SI...
E010422834
Design and Performance Analysis of Convolutional Encoder and Viterbi Decoder ...
Arithmetic coding
LDPC - Low Density Parity Check Matrix
A new Algorithm to construct LDPC codes with large stopping sets
(Paper) Efficient Evaluation Methods of Elementary Functions Suitable for SIM...
Performance comparison of eg ldpc codes
Data Compression - Text Compression - Run Length Encoding
Thesis_Presentation
Data communication & computer networking: Huffman algorithm
My review on low density parity check codes
Slides
Energy-Efficient LDPC Decoder using DVFS for binary sources
Module 4 Arithmetic Coding
Ad

Viewers also liked (20)

PDF
D1 singaravelu
PDF
H3 anuraj
DOC
Alagumuthu ph.d.-progress report
PDF
E3 ilangkumaran
PDF
C8 akumaran
PDF
A1 devarajan
DOC
Agenda tamil
PDF
Actionresearch
PDF
I2 madankarky1 jharibabu
PDF
I6 mala3 sowmya
PDF
B1 sivakumaran
PDF
C2 mala2 janani
PDF
F2 pvairam sarathy
PDF
A2 velmurugan
PDF
B5 msaravanan
PDF
E1 geetha2 karthikeyan
PDF
C3 geetha1 karthikeyan
DOCX
Embedded system design with microcontrollers in waayoo.com
PDF
Congress combat sports_portugal_tk_2011
PPTX
유권자DB 소개
D1 singaravelu
H3 anuraj
Alagumuthu ph.d.-progress report
E3 ilangkumaran
C8 akumaran
A1 devarajan
Agenda tamil
Actionresearch
I2 madankarky1 jharibabu
I6 mala3 sowmya
B1 sivakumaran
C2 mala2 janani
F2 pvairam sarathy
A2 velmurugan
B5 msaravanan
E1 geetha2 karthikeyan
C3 geetha1 karthikeyan
Embedded system design with microcontrollers in waayoo.com
Congress combat sports_portugal_tk_2011
유권자DB 소개
Ad

Similar to C6 agramakrishnan1 (20)

PDF
www.ijerd.com
PDF
B140715
PDF
www.ijerd.com
PDF
Image compression using fractal functions
PDF
Welcome to International Journal of Engineering Research and Development (IJERD)
PDF
FREEMAN CODE BASED ONLINE HANDWRITTEN CHARACTER RECOGNITION FOR MALAYALAM USI...
DOCX
Rasterisation of a circle by the bresenham algorithm
DOCX
Rasterisation of a circle by the bresenham algorithm
PPTX
Computer graphics
PPTX
Output primitives computer graphics c version
PDF
20121020 semi local-string_comparison_tiskin
PPTX
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
PPT
Tutorials--Coordinate Systems
PDF
Functional Programming In Mathematica
PDF
Sketch sort sugiyamalab-20101026 - public
PDF
PDF
MAP MAKING FROM TABLES
PDF
MAP MAKING FROM TABLES
DOCX
The Digital Image Processing Q@A
PPTX
Pseudo and Quasi Random Number Generation
www.ijerd.com
B140715
www.ijerd.com
Image compression using fractal functions
Welcome to International Journal of Engineering Research and Development (IJERD)
FREEMAN CODE BASED ONLINE HANDWRITTEN CHARACTER RECOGNITION FOR MALAYALAM USI...
Rasterisation of a circle by the bresenham algorithm
Rasterisation of a circle by the bresenham algorithm
Computer graphics
Output primitives computer graphics c version
20121020 semi local-string_comparison_tiskin
ACM ICPC 2012 NEERC (Northeastern European Regional Contest) Problems Review
Tutorials--Coordinate Systems
Functional Programming In Mathematica
Sketch sort sugiyamalab-20101026 - public
MAP MAKING FROM TABLES
MAP MAKING FROM TABLES
The Digital Image Processing Q@A
Pseudo and Quasi Random Number Generation

More from Jasline Presilda (20)

PDF
I5 geetha4 suraiya
PDF
I4 madankarky3 subalalitha
PDF
I3 madankarky2 karthika
PDF
I1 geetha3 revathi
PPT
Hari tamil-complete details
PDF
H4 neelavathy
PDF
H2 gunasekaran
PDF
H1 iniya nehru
PDF
G3 chandrakala
PDF
G2 selvakumar
PDF
G1 nmurugaiyan
PDF
Front matter
PDF
F1 ferdinjoe
PDF
PDF
E2 tamilselvan
PDF
D5 radha chellappan
PDF
D4 sundaram
PDF
D3 dhanalakshmi
PDF
D2 anandkumar
PDF
Computational linguistics
I5 geetha4 suraiya
I4 madankarky3 subalalitha
I3 madankarky2 karthika
I1 geetha3 revathi
Hari tamil-complete details
H4 neelavathy
H2 gunasekaran
H1 iniya nehru
G3 chandrakala
G2 selvakumar
G1 nmurugaiyan
Front matter
F1 ferdinjoe
E2 tamilselvan
D5 radha chellappan
D4 sundaram
D3 dhanalakshmi
D2 anandkumar
Computational linguistics

Recently uploaded (20)

PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
August Patch Tuesday
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
1. Introduction to Computer Programming.pptx
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
Getting Started with Data Integration: FME Form 101
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
The various Industrial Revolutions .pptx
PPTX
Modernising the Digital Integration Hub
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
DP Operators-handbook-extract for the Mautical Institute
observCloud-Native Containerability and monitoring.pptx
August Patch Tuesday
Univ-Connecticut-ChatGPT-Presentaion.pdf
NewMind AI Weekly Chronicles - August'25-Week II
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
A contest of sentiment analysis: k-nearest neighbor versus neural network
1. Introduction to Computer Programming.pptx
TLE Review Electricity (Electricity).pptx
Final SEM Unit 1 for mit wpu at pune .pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Zenith AI: Advanced Artificial Intelligence
Enhancing emotion recognition model for a student engagement use case through...
Getting Started with Data Integration: FME Form 101
1 - Historical Antecedents, Social Consideration.pdf
The various Industrial Revolutions .pptx
Modernising the Digital Integration Hub
O2C Customer Invoices to Receipt V15A.pptx
A comparative study of natural language inference in Swahili using monolingua...
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf

C6 agramakrishnan1

  • 2. Tamil Online handwriting recognition using fractal features Rituraj Kunwar and A G Ramakrishnan MILE Lab, Dept of Electrical Engineering, Indian Institute of Science, Bangalore. Abstract We present a fractal coding method to recognize online handwritten Tamil characters and propose a novel technique to increase the efficiency in terms of time while coding and decoding. This technique exploits the redundancy in data, thereby achieving better compression and usage of lesser memory. It also reduces the encoding time and causes little distortion during reconstruction. Experiments have been conducted to use these fractal codes to classify the online handwritten Tamil characters from the IWFHR 2006 competition dataset. In one approach, we use coding and decoding process. A recognition accuracy of 90% has been achieved by using DTW for distortion evaluation during classification and encoding processes as compared to 78% using nearest neighbor classifier. In other experiments, we use the fractal code, fractal dimensions and features derived from fractal codes as features in separate classifiers. Whereas the fractal code was successful as a feature, the other two features are not able to capture the wide within-class variations. Introduction Fractal codes are the compressed representation of patterns, based on iterative contractive transformations in metric spaces proposed by Barnsley. A simplified version of the fractal block coding technique for digital images has been used to encode the 1-D ordered online handwritten character patterns. A novel partitioning algorithm has been proposed to reduce the computation complexity of encoding and decoding, with a minor fall in recognition accuracy. Building fractal codes for handwritten characters We need to find the collection of affine transforms of the online handwritten character. The raw online handwritten character is first preprocessed using three steps: (i) smoothing (ii) re-sampling the variable number of points in each character to 60 points. (iii) normalizing the x and y coordinates between 0 and 1. The handwritten character locus is divided into non-overlapping range segments. Each range segment has a fixed number of points (R) in it. Last point of each range becomes the first point of the next range, except in the case of the last range. Creating a pool of domain segments The domain pool is formed for each character locus. Domain pool is the collection of all possible domain segments. The number of points in each domain segment is chosen to be double that in each range segment, D = 2R. Domain pool can be obtained by sliding the window containing D points at a time. The window is first located at the beginning of the stroke. The window is moved along the 142
  • 3. stroke by δ points, in such a way that it does not cross the end point of the stroke. The step δ has been chosen as R/2 in our experiments. Constructing transformed Domain pool Transformed domain pool is constructed by multiplying each domain segment with the eight isometrics that involve reflection and rotation about different axes. To begin with, each domain is translated to its centroid and scaled down by the contractivity factor (s=0.5). The following transformations are then applied to each of the candidate domain segment. The above transformations produce a whole family of geometrically related domain segments. In domain pool, matching blocks will be looked for encoding the online handwritten character. Searching for the most similar domain segment for each range: Each affine transformed domain segment is re-sampled into R points and then its centroid is translated to that of the concerned range segment. Distance between them is found. Similarly, distances w.r.t to the all the domain segments is calculated. The most similar domain segment corresponding to each range segment is identified and fractal code is stored corresponding to the particular range. The fractal codes are similarly obtained for all the online handwritten characters. Fractal codes corresponding to each range segment consists of (1) the range segment index, (2) the range segment centroid, (3) index of the most similar domain segment and (4) the index of transformation used out of the 8 transformations. Issue related to constructing fractal codes The whole character is divided into range segments of equal number of points. Smaller the number of points in each range segment, the more minutely we can capture the complexity in any region of the character. The number of range segments per character is thus inversely proportional to the number of points in each range. Again, the encoding speed is inversely proportional to the number of range segments per character. It has been noted that there are certain region in a character where the curliness is minimal so in those area the range segment size could be increased still encoding the region precisely. Steps to encode a handwritten character where the number of points in each range is variable: Fig 1. Tamil handwritten character ‘aa’ 143
  • 4. Cumulative angle ‘θC’ is calculated starting from the first point and traversing the character stroke till it crosses an empirically set threshold of θT. Smaller the threshold, finer is the encoding. Figure 1 shows a sample of the handwritten character /aa/ in Tamil. Figure 2 shows the effect of the choice of the angle threshold on the reconstruction error. Fig 2. Illustration of the distortion in reconstruction with different angle thresholds ϕT. Here reconstruction is performed from the fractal codes of the character /aa/ shown in Fig 1. For encoding, different values of range sizes are used, namely, 4, 8, 12, 16 and 20. Algorithm for partitioning 1. Domain pool of different sizes (namely 8, 16, 24, 32, 40) are constructed corresponding to the range sizes of 4, 8, 12, 16 and 20. By size, we mean the number of points in each domain. 2. Start from the first point and move along the character from one point to the next and calculate the cumulative change in angle θC. 3. The No. of points (K) till the point penultimate to the one, where θC crosses the threshold ϕT is noted. 4. The range size closest to and less than K is chosen. The most suitable domain is chosen from the corresponding domain pool and the fractal codes are stored. 5. The last point of the present range is then considered as the first point of the new range and the process repeats starting from step 2. Along with the fractal codes, the size of the range chosen is also stored. If the end point is reached with θC < ϕT, then step 4 is followed, where K includes the last point also since θC < ϕT). If at the end, few points are left which is less than the smallest range, they are discarded else step 4 is repeated. Algorithm for reconstruction: Banach’s contractive mapping theorem states: “If a contractive mapping ‘W’ (which are the fractal codes here) is defined, then iterative application of the mapping on any sequence of the same space will lead to a Cauchy’s sequence which will converge to a fixed, unique point. CASE I: Range having fixed number of points A random initial pattern having the same number of points is taken or generated. A domain pool of size double that of the range is created in a manner similar to the encoding process. First fractal code is 144
  • 5. taken corresponding to the first range of the pattern, and operations are performed on the corresponding domain indicated by the domain index in the code of first range. The indicated domain segment’s origin is shifted to its origin and then it is scaled down by the contractivity factor (0.5 here). Then the affine transformation as indicated in the code is applied on the scaled domain segment. Finally the transformed domain’s centroid is shifted to the range segment centroid as present in the fractal code. The above steps are repeated to decode all the range segments. Then the whole decoded locus is smoothened. The above steps are repeated till the termination condition is satisfied to finally converge to a fixed and unique pattern. Termination condition could be (i) an empirically set fixed number of iterations, sufficient for convergence or (ii) minimal or no distortion between two consecutive patterns produced by 2 consecutive iterations. CASE II: Range having variable number of points in each range In this case, multiple domain pools are created out of the random pattern taken for the reconstruction. Using the extra information given in the fractal code pertaining to the range size to be chosen so that domain segment is picked up from the appropriate domain pool. The rest of the steps are same as the case for the reconstruction with fixed range size. Using above two methods, fractal codes of any give pattern can be created and the same pattern could be decoded using any random pattern after applying this reconstruction algorithm iteratively for few times. 1. Classification by using fractal codes in construction and reconstruction: The above fractal encoding and decoding method has been used for classification of characters. The assumption behind this classification is that if a sample of a class (say /a/) is encoded and fractal codes are obtained. The following process of reconstruction if started in 2 ways i.e. firstly by applying the reconstruction algorithm iteratively on a random pattern of any different class (anything other than ‘A’) and secondly doing the same on any random pattern of the same class (i.e. ‘A’) then the distortion between the initial pattern and the pattern obtained after first iteration of reconstruction is relatively much more in the first case than in the second. The reason behind this is that reconstruction process leads to convergence to the pattern whose code is used for reconstruction. And since the class of the initial pattern in the second case and the fractal code is same, the distortion in the second case is smaller than the first case. 145
  • 6. Fig 3. In the above image, reconstruction process is shown which starts from a random straight line and finally converges to a pattern which is very close to the original pattern after 8 iterations. The original pattern (in Fig 1) was encoded using different range sizes of 4, 8, 12, 16 and 20 with the threshold angle of 30 degrees. Character classification using fractal codes: Fig. 4. The above image shows the distortion created, when an iteration of reconstruction was performed. This shows that the distortion is huge if the starting pattern (above left) is very different from the original pattern, whose fractal codes are used for reconstruction (in this case Fig 1). Fig. 5. The above image shows the distortion created, when an iteration of reconstruction was performed. This shows that the distortion is much less if the starting pattern (above left) is not very different from the original pattern, whose fractal codes are used for reconstruction (in this case Fig 1). Classification Algorithm In the present research, fractal codes of ‘N’ samples of entire 156 classes are computed and stored. To classify a test sample, following steps are taken. a) An iteration of the reconstruction algorithm is applied on the test sample using the fractal code of each sample of each class. b) The distortion ‘D’ is calculated between the initial pattern and the pattern obtained after one step of reconstruction. Thus the distortion matrix of size 156*N is obtained. c) The row number of the minimum value of the distortion is found from the distortion matrix and assigned to the test sample. Distortion evaluation: The distortion between two patterns can be evaluated by finding the distance between them. The distance between 2 patterns is measured by Nearest Neighbor (NN) method. The issue with NN is that the matching is done point by point which increases the distance unusually and thus decreases the classification accuracy (evident from the result table). This drawback in distance evaluation of NN 146
  • 7. is addressed by DTW pattern matching which is more intuitive. This intuitive matching takes place because DTW matches similar subsections of the patterns thus producing a reasonable distance between patterns. This method hence produces a remarkable increase in accuracy as shown Table 1. Classification using the fractal codes as a features in the Nearest Neighbor (NN) In this method, the fractal codes are used as features and fed into a NN classifier. An accuracy of approximately 65% is obtained. Classification using fractal dimension or features derived from the fractal codes Fractal dimension is a unique identity of any pattern or object. However, because of the mere nature of handwritten character recognition (i.e. large variation within every class), it fails completely to classify any random sample. The features derived from the fractal codes like MMVA and DRCLM, though successful in problems like face recognition and signature verification, fail in recognizing handwritten characters. Results Table 1: Results show how the DTW comparison during reconstruction impacts the recognition accuracy No. of Training No. of Testing Accuracy Fixed Range Size DTW used? samples samples (in %) 4 No 20 50 78.9 4 Yes 20 50 90.4 Table 2: Results show the efficacy of the Partitioning algorithm in improving the efficiency of the recognition system (in terms of time) with marginal drop in accuracy. Variable range sizes used (4, 8, 16, 24 and 32). No. of training and testing samples used are 5 and 30, respectively, No. of classes used is 156. Threshold angle DTW used for Encoding time Accuracy (degree) distortion evaluation? per sample (sec) (in %) 0 Yes 31 90.44 10 Yes 22 86.43 30 Yes 12 85.04 50 Yes 10 83.55 70 Yes 8 81.60 90 Yes 6 80.87 Acknowledgment: The authors thank Technology Development for Indian Languages (TDIL), DIT, Government of India for funding this research, as part of the research consortium on Online handwriting recognition of Indian languages. References M. F. Barnsley, Fractals everywhere, New York: Academic, 1988. T. Tan and H. Yan, Face recognition by fractal transformations, IEEE ICASSP, 6:3405-3408, 1999. Mozaffari S., Faez K. and Faradji F, One Dimensional Fractal Coder for Online Signature Recognition, IEEE ICPR, 2:857- 860, 2006. 147