[IEEE 2012 World Congress on Information and Communication Technologies (WICT) - Trivandrum, India...

Post on 15-Dec-2016

213 views 1 download

Transcript of [IEEE 2012 World Congress on Information and Communication Technologies (WICT) - Trivandrum, India...

On-line Handwritten Character Recognition System for Kannada using Principal Component Analysis Approach

for Handheld Devices

Keerthi Prasad G, Imran Khan, Naveen R Chanukotimath, Firoz Khan Department of Information Science and Engineering

GM Institute of Technology Davanagere, India

logon2keerthi@gmail.com, imrangmit@ymail.com, rcmnaveen@gmail.com, khanferoz23@gmail.com

Abstract— In this paper, we present an unrestricted Kannada online handwritten character recognizer which is viable for real time applications. It handles all basic characters of the Kannada script. In this paper, the proposed Online Handwritten Kannada Character Recognition System (OHKCRS) is discussed in detail. Developing an Online Handwriting Recognition System for Kannada character set to mobile devices would play an important role in making these devices available and usable for the Indian society as Kannada language is spoken in major part of India. In this paper, we present a model for writer-independent online handwriting character recognition for the 51 basic Kannada characters. The proposed system is implemented on mobile device using two different approaches namely Principal Component Analysis (PCA) and Dynamic Time Wrapping (DTW). To find the suitability of these two approaches for handheld devices several experiments were conducted and detailed analysis has been made on the obtained results. The results obtained for PCA approach is quite promising than DTW. On an average, recognition accuracy up to 88% is achieved for the PCA approach and up to 64% is achieved for DTW approach, also the time taken for recognition of unknown character is around 0.8 sec for PCA approach, and around 55 sec for DTW approach, thus the PCA approach is suitable for real-time applications.

Keywords- Online handwriting recognition, Character recognition, PCA, Pattern recognition, Handwriting recognition

I. INTRODUCTION Handwritten character recognition has received greater

attention in academic and productive fields. The recognition system can be either online or off-line. There is large demand for handwritten character recognition system. Intensive research has been done on handwritten character recognition and a large number of articles have been published on this topic during the last few decades. Many commercial handwritten character recognition systems are now available in the market, but most of these systems work for Roman, Chinese, Japanese and Arabic characters. India is a multi-lingual and multi-script country, where eighteen official scripts are accepted and have over hundred regional languages. Online handwriting recognition engines have been developed for various character sets. Despite that, very less attempt has been made to build an online handwriting recognition engine for Indian languages. Speech and

handwriting are among the natural ways of communication that people have been using since their presence for thousands of years [1]. Personal Digital Assistance (PDA) has been described as a “small, handheld device that provides tools to enhance personal productivity” [2]. The productivity comes from their easiness to use, their mobility and capability to accept handwritten input using the stylus or finger touch.

Generally, Online Handwriting Recognition (OHWR) is more practical for handwritten languages having larger number of characters such as of Kannada language on handheld devices such as PDAs. Designing and implementing Online Handwriting Recognition Systems (OHWRS) for Kannada characters requires compromising the large size of Kannada character set and the limitations of handheld devices.

KANNADA LANGUAGE

Kannada is the official language of the southern Indian state of Karnataka. Kannada is a Dravidian language spoken by about 44 million people in the Indian states namely Karnataka, Andhra Pradesh, Tamil Nadu and Maharashtra. The Kannada alphabets were developed from the Kadamba and Chalukya scripts, descendents of Brahmi which were used between the 5th and 7th centuries AD. The Kannada character set considered for recognition in this paper has 16 vowels and 35 consonants as shown in Fig. 1.

Figure 1.Basic Kannada Character Set

675978-1-4673-4805-8/12/$31.00 c©2012 IEEE

II. RELATED WORK In the online character recognition system for the

handwritten Kannada characters, proposed by Srinivasa Rao Kunte R and Sudhaker Samuel R D [3], wavelet features are extracted from the contour of characters are used as features. The conventional feed forward multilayer neural network is used as classifier. In the recognition system reported by Muralikrishna Sridhar, Dinesh Mandalapu and Mehul Patel [4], a classifier called Active-DTW (Dynamic Time Warping) has been proposed. In the experiments they used the database, which contains both online and off-line handwriting information. Their system combines the advantages of generative and discriminative classifiers to address the similarity of between-class samples, while taking into account the variability of writing styles within the same character class. Niranjan Joshi, G.Sita, A.G.Ramakrishnan and S.Madhvanath [5] proposed a recognition system for Tamil handwritten text. In their system they used subspace and DTW classifiers so as to combine the advantages of the two schemes to formulate a hybrid scheme for recognition and carried out the experiment on all the three modes, namely, writer dependent (WD), writer independent (WI) and writer adaptive (WA). Hiroto Mitoma, Seiichi Uchida, and Hiroaki Sakoe[6] proposed online character recognition system based on Elastic Matching and Quadratic Discrimination to overcome the over fitting problem which often degrades the performance of elastic matching based online character recognizers..

III. OUR APPROACH

A. Architecture Architecture of the proposed system for online

handwriting recognition [7] is shown in Fig. 2

. Figure 2. Architecture of the proposed System

From the architecture of the system we can observe that the system has three layers. The data collection and display layer is responsible to pass user’s input data to the pre-processing and subsequently to the feature extraction processes and displays recognized letter. The pre-processing and feature extraction activities can be considered as a layer that can perform pre-activities for the main functional activity of the system, the classification. In the classification layer the user’s pre-processed and feature extracted pattern will be compared with those in the data store using PCA approach.

B. Principal Component Analysis (PCA) Principal Components Analysis (PCA) is a useful

statistical technique that has found application in fields such as face recognition and image compression, and is a common technique for finding patterns in data of high dimension [8]. The PCA method can be used to extract relevant information from data sets, and consists of looking for another basis that better express the distribution of the data. This basis is obtained by means of a linear combination of the original basis, and removes part of the redundancy of the data. PCA is also a technique used to obtain a more compact encoding of the data, allowing reduce its dimension from n to p, where p n. The Approach for Pattern Recognition

PCA can be used to classify patterns, as pointed by some previous works in face recognition. The process used to train a PCA classifier involves the following steps:

1) Define an initial set of training patterns. Each pattern Pi of the set, where 1 i m, belongs to some of the classification classes. Also, assume that Pi is an n x 1 vector.

2) Calculate the average vector of the training set. This vector, named B, will be defined as: B=1/m i (1.1)

The obtained B vector has then size n x 1. 3) From the initial set of training patterns, define matrix

A (the pattern space), putting in each of its columns one of the m training patterns, subtracted from it the average vector B:

A = [P1 - B P2 - B ... Pm - B] (1.2) The obtained A matrix has then size n x m. 4) Calculate the eigenvectors of the covariance matrix of

the set of training patterns. This matrix, named C, will be defined as:

C = AAT (1.3) The covariance matrix has then size n x n, where n is the

size of one training pattern. As the size of C is big, usually the matrix L is considered.

L = ATA (1.4) The L matrix has size m X m, where m is the number of training patterns. Assuming that vi and i are eigenvectors and eigenvalues of L, respectively, we have:

L vi = i vi (ATA) vi = i vi A (ATA) vi = A i vi (AAT)Avi = i Avi CAvi = i Avi (1.5)

676 2012 World Congress on Information and Communication Technologies

Above Equation 1.5 shows that Avi is an eigenvector of the matrix C = AAT. So, let V be the matrix that contains in its columns the m eigenvectors of L. The U matrix, that contains in its columns the eigenvectors of C, can then be obtained calculating:

U = AV As matrix V has size m x m, and matrix A has size n x m,

it follows that matrix U has size n x m. 5) Select p eigenvectors of C to compose the principal

component matrix, where p m. The selected eigenvectors are columns of matrix U related to the biggest eigenvalues found in computing the eigenvectors of the covariance matrix. The selection is done in order to keep in matrix U only the selected p eigenvectors:

U = [U1 U2 ... Up] (1.6) As each eigenvector has n elements and it was selected p

eigenvectors, the final U matrix has then size n x p. 6) Project each training pattern Pi onto the selected

eigenvectors space, in order to obtain a new encoding i of the pattern:

i = UT (Pi - B) (1.7) The obtained encoded i vector has then size p x 1.

From the steps suggested by the PCA training algorithm, step 5 is especially important, because it allows reduce the size of the training patterns from n x 1 to p x 1. This step can then be seen as a compression step.

Let Ptest be an n x 1 size pattern submitted to the classification task. To perform this work, the classifier executes the following operations:

1) Subtract the average vector B from Ptest. Then, project the obtained vector onto the eigenvectors space U, in order to obtain a new encoding test of the pattern:

test = UT (Ptest - B) (1.8) The obtained test vector has then size p x 1.

2) Analyze the encoded training patterns i, in order to find the pattern such that:

= min || test – i || (1.9) The submitted pattern Ptest is then classified as belonging to the same class that Xi if i is the obtained pattern in applying the Euclidean distance.

C. Dynamic Time Wrapping (DTW) Dynamic time wrapping (DTW) is a technique that finds

the optimal alignment between two time series if one time series may be “wrapped” non-linearly by stretching or shrinking it along its time axis [9]. This wrapping between two time series can then be used to find corresponding regions between the two time series or to determine the similarity between the two time series. An example of how one time series is “wrapped” to another is shown in Fig. 3.

Figure 3. A Wrapping between Two Time Series

In Fig. 3, each vertical line connects a point in one time series to its correspondingly similar point in the other time series. The lines actually have similar values on the y-axis but have been separated so the vertical lines between them can be viewed more easily. If both of the time series in Fig. 3 were identical, all of the lines would be straight vertical lines because no wrapping would be necessary to ‘line up’ the two time series. The wrap path distance is a measure of the difference between the two time series after they have been wrapped together, which is measured by the sum of the distances between each pair of points connected by the vertical lines in Fig. 3. Thus, two time series that are identical except for localized stretching of the time axis will have DTW distances of zero. The Approach for Pattern Recognition

DTW can be used to classify the input patterns. Given a test pattern, first normalize (size normalization) the pattern. After normalization, find out the wrapping path between given test pattern and stored reference patterns by using the algorithm explained in the above section and store in a distance vector.

Finally find out a minimum wrapping distance in the distance vector and index of the class having minimum wrapping distance, then given test pattern is classified as belonging to the class which is having minimum wrapping distance.

IV. EXPERIMENT AND ANALYSIS The developed online handwritten recognition system

was tested both on android emulator in the personal computer as well as on the android based mobile device. Experiments were carried out by considering 16 vowels and 35 consonants as character set to analyze the performance of the system. The system is deployed on Samsung mobile device which support Android Operating System and Android emulator. 51 samples of each character are collected from different persons for training the system thereby constructed the database of 2550 (50x51) samples. 765 (15x51) samples were collected for testing which are different from training samples.

Analysis is done using receiver operating characteristic (ROC), on PCA approach. Receiver operating characteristic (ROC), or simply ROC curve, is a graphical plot of the sensitivity, or true positive rate, v/s. false positive rate (1 specificity or 1 true negative rate). The ROC can also be represented equivalently by plotting the fraction of true positives out of the positives (TPR = true positive rate) v/s. the fraction of false positives out of the negatives (FNR = false negative rate).

Fig. 4 shows the graph of sensitivity and specificity plotted against varying threshold for k-NN classifier. From the graph shown in Fig. 4 it is observed that, sensitivity is better in PCA as compared to DTW approach. And it can also be observed that specificity increases with increase in threshold, so it is better to keep threshold value as 2 for good result.

2012 World Congress on Information and Communication Technologies 677

Figure 4. TPR v/s FNR.

V. CONCLUSION Despite the challenges we need to overcome in designing

and implementing OHWRSs in handheld devices, a lot has to be done to come up with a reliable and higher recognition rate system. In designing and implementing such systems for handheld devices such as PDAs, the devices’ limitations have to be taken into consideration. Otherwise, no matter how such systems are designed and tested to be intelligent with high recognition rate on desktop computers, when implementing them for handheld devices they may not fit the storage and computational limitations of those devices.

In this work, these limitations of the handheld systems are taken into account and a real-time working model of the On-line handwriting recognition system for mobile device is proposed and developed. The system is implemented using two different approaches namely DTW (commonly used approach in personal computer) and PCA based approach. The recognition rate of PCA based approach is 87.5% where as that of DTW approach found to be 63.7%. Also the time taken for recognition by PCA based approach is 0.8secs where as that of DTW approach is 51secs which do not suit for real-time applications.

In view of the above results it can be concluded that proposed system using PCA is a better choice for implementation. PCA approach is suggested for the

implementation because of the reliable feature like speed and recognition accuracy. To improve the accuracy rate of the system and make it usable, the following are listed as recommendations and future works.

Other preprocessing steps, such as slant correction, can be added so that we can remove points that are not important early at the preprocessing stage.

Exploring other handheld devices that make use of operating systems other than Android.

Exploring the mechanism to use PDA devices’ built in handwriting input interface by assessing available APIs provided by device vendors. Doing so and incorporating it with this system, we can make the system efficient and consequently the efficiency may result for the data collection step to collect all the data points that represent the unknown pattern.

REFERENCES

[1] Homayoon S.M. Beigi, Krishna Nathan, Gregory J. Clary, Jayashree Subrahmonia, “Challenges of Handwriting Recognition in Farse, Arabic and other languages with Similar Writing Styles – An Online Digit Recognizer”, T.J.Watson Research Center, IBM

[2] Deneen, L., “Handheld PDAs and Wearable Computing Devices”,at http://www.educause.edu/ir/library/pdf/DEC0101.pdf

[3] Srinivasa Rao Kunte, R, Sudhaker Samuel, R D “On-line character recognition for handwritten Kannada characters using wavelet features and neural classifier” IETE J RES. Vol. 46, no. 5, pp. 387-392. 2000.

[4] M. Sridhar, D. Mandalapu, and M. Patel. “Active- DTW: A generative classier that combines elastic matching with active shape modeling for online handwritten character recognition”. International Conference on Frontiers in Handwriting Recognition, 99(7):1.100, November 1999.

[5] Niranjan Joshi, G.Sita, A.G.Ramakrishnan and S.Madhvanath, “ Comparison of elastic matching algorithms for online Tamil handwritten character recognition”, In Proc. IWFHR-9, Tokyo, Japan, Oct. 26-29, pp. 444-449, 2004.

[6] Hiroto Mitoma, Seiichi Uchida, and Hiroaki Sakoe, “Online Character Recognition Based on Elastic Matching and Quadratic Discrimination”, Kyushu University, Japan, 2005.

[7] Keerthi Prasad, Imran Khan and Naveen R Chanukotimath. “On-line Hindi Handwritten Character Recognition for Mobile Devices”, In Proc. ICCACI-12, Chennai, India, Aug.3-5, pp. 1074-1078, 2012.

[8] Shlens, J. “A Tutorial on Principal Component Analysis: Derivation, Discussion, and Singular Value Decomposition”. Online Notes: http://www.snl.salk.edu/~shlens/notes.html, 2006.

[9] Stan Salvador and Philip Chan “FastDTW: Toward Accurate Dynamic Time Warping inLinear Time and Space” 2004.

678 2012 World Congress on Information and Communication Technologies