Handwritten Character Recognition Using Multiresolution Technique and Euclidean Distance Metric
Total Page:16
File Type:pdf, Size:1020Kb
Journal of Signal and Information Processing, 2012, 3, 208-214 doi:10.4236/jsip.2012.32028 Published Online May 2012 (http://www.SciRP.org/journal/jsip) Handwritten Character Recognition Using Multiresolution Technique and Euclidean Distance Metric Dileep Kumar Patel1, Tanmoy Som1, Sushil Kumar Yadav2, Manoj Kumar Singh3 1Department of Applied Mathematics, Institute of Technology, Banaras Hindu University, Varanasi, India; 2Department of Statistics, Faculty of Science, Banaras Hindu University, Varanasi, India; 3DST Centre for Interdisciplinary Mathematical Sciences, Faculty of Science, Banaras Hindu University, Varanasi, India. Email: {dkpatel.bhu, sush.stats}@gmail.com, [email protected], [email protected] Received July 28th, 2011; revised January 18th, 2012; accepted March 21st, 2012 ABSTRACT In the present paper, the problem of handwritten character recognition has been tackled with multiresolution technique using Discrete wavelet transform (DWT) and Euclidean distance metric (EDM). The technique has been tested and found to be more accurate and faster. Characters is classified into 26 pattern classes based on appropriate properties. Features of the handwritten character images are extracted by DWT used with appropriate level of multiresolution tech- nique, and then each pattern class is characterized by a mean vector. Distances from input pattern vector to all the mean vectors are computed by EDM. Minimum distance determines the class membership of input pattern vector. The pro- posed method provides good recognition accuracy of 90% for handwritten characters even with fewer samples. Keywords: Discrete Wavelet Transform; Euclidean Distance Metric; Feature Extraction; Handwritten Character Recognition; Bounding Box; Mean Vector 1. Introduction field since the advent of digital computers [15]. The ul- timate objective of any HCR system is to simulate the The shape variation of handwritten characters causes the human reading capabilities so that the computer can read, misclassification, therefore multiresolution of handwrit- understand, edit and do similar activities as human do ten characters is important for the correct recognition. with the text. Mostly, English language is used all over Using multiresolution we can reduce the size of charac- ters without losing the basic characteristics of characters, the world for the communication purpose, also in many therefore more accuracy and better recognition rate can Indian offices such as railways, passport, income tax, be achieved using multiresolution. The extensive appli- sales tax, defense and public sector undertakings such as cations of Handwritten Character Recognition (HCR) in bank, insurance, court, economic centers, and educa- recognizing the characters in bank checks and car plates tional institutions etc. A lot of works of handwritten Eng- etc. have caused the development of various new HCR lish character recognition have been published but still systems such as optical character recognition (OCR) sys- minimum training time and high recognition accuracy of tem. There are so many techniques of pattern recognition handwritten English character recognition is an open pro- such as template matching, neural networks, syntactical blem. Therefore, it is of great importance to develop au- analysis, wavelet theory, hidden Markov models, Bayes- tomatic handwritten character recognition system for ian theory and minimum distance classifiers etc. These English language. In this paper, efforts have been made techniques have been explored to develop robust HCR to develop automatic handwritten character recognition systems for different languages such as English (Numeral) system for English language with high recognition accu- [1-3], Farsi [4], Chinese (Kanji) [5,6], Hangul (Korean) racy and minimum classification time. Handwritten scripts [7], Arabic script [8] and also for some Indian character recognition is a challenging problem in pattern languages like Devnagari [9], Bengali [10], Telugu [11- recognition area. The difficulty is mainly caused by the 13] and Gujarati [14]. HCR is an area of pattern recogni- large variations of individual writing style. To get high tion process that has been the subject of considerable recognition accuracy and minimum classification time research during the last few decades. Machine simulation for HCR, we have applied multiresolution technique us- of human functions has been a very challenging research ing DWT [16,17] and EDM [18,19]. Experimental results Copyright © 2012 SciRes. JSIP Handwritten Character Recognition Using Multiresolution Technique and Euclidean Distance Metric 209 show that the proposed method used in this paper for the written form on blank papers by people of different handwritten English character recognition is giving high age groups. These characters are written by different recognition accuracy and minimum classification time. In blue/black ball point pens. The collected samples of what follows we briefly describe the different techniques handwritten characters are scanned by scanner into JPEG used in our paper. format on 600 ppi [24]. Then all the characters are sepa- rated and resized into 100 by 100 pixel images. The ex- 1.1. Multiresolution ample of the samples of handwritten characters is given below (Figures 2 and 3). Representation of images in various degrees of resolution is known as multiresolution process. “Inmultiresolution process, images are subdivided successively intosmaller- 2.2. Preprocessing regions [16,17]. Wavelets are used as the foundation of The separated RGB character images of 100 by 100 pixel multiresolution process. In 1987, wavelets are first shown resolution obtained in the Section 2.1 are converted into to be the foundation of a powerful new approach to sig- grayscale images and then the grayscale images is again nal processing and analysis called multiresolution theory converted into binary images using appropriate graysca- [17]. Multiresolution theory is concerned with the repre- lethresholding. Now, binary image is thinned using ske- sentation and analysis of images at more than one resolu- letonization infinite times. Edges of these thinned images tion”. We use this technique in HCR system. are detected using appropriate thresholding and then fur- ther dilatedusing appropriate structure element [16,20,25]. 1.2. Euclidean Distance Metric These steps are known as preprocessing and preprocess- The EDM is significantly simplified under the following ing steps are given in Figure 4. assumptions [18,19]: The classes are equiprobable. 2.3. Feature Extraction The data in all classes follow Gaussian distributions. In this section, multiresolution technique is applied on The covariance matrix is the same for all classes. the dilated images obtained in Section 2.2 and this is The covariance matrix is diagonal and all elements achieved by applying DWT [26,27]. In this section, pat- across the diagonal are equal. tern vectors are generated [28-30]. DWT has given good Given an unknown pattern vector x, assign it to class results in different image processing applications. It has w if j excellent spatial localization and good frequency local- T xxxxmmmmiiiij , j ization properties that makes it an efficient tool for image analysis. There are different multiresolution techniques EDM is often used, even if we know that previously stated assumptions are not valid, because of its simplicity. such as image pyramids, subband coding and DWT. We It assigns a pattern to the class whose mean is closed to it have used DWT in this paper. DWT maps a function of a with respect to the Euclidean norm [20]. continuous variable into a sequence of coefficients. If the function being expanded is a sequence of numbers, like 2. Methodology of the Proposed HCR samples of a continuous function f(x, y), the resulting co- System efficients are called the DWT of f(x, y) [16,17]. DWT of an image f(x, y) of size MN is defined as This paper is divided into four sections. In Section 2.1, 1 MN11 samples of handwritten characters are collected. In Sec- Wjmn,, fxy , xy , (1) 0, jmn0 , tion 2.2, some preprocessing steps are performed on the MN xy00 collected samples of handwritten characters. In Section MN11 ii1 2.3, pattern vectors are generated using multiresolution Wjmn ,, fxy , jmn,, xy , technique by applying DWT on preprocessed handwrit- MN xy00 (2) ten characters. In Section 2.4, mean vectors are computed i HV,, D of each class and then EDM is used to compute distances for j j and from input pattern vector to all the mean vectors and in- 0 1 put handwritten character is recognized by the minimum f xy,(,,) W j mn xy, 0,jmn0 , distance obtained in Section 2.4. A complete flowchart of MN mn (3) handwritten English character recognition system is given 1 Wjmnii(, ,) xy , in Figure 1 [21-23]. jmn,, MN iHVDjj,, 0 m n 2.1. Data Collection where, j0 is an arbitrary starting scale and j 2 jj First of all, the data of English characters is collected in jmn,, xy,2 2,2xm yn (4) Copyright © 2012 SciRes. JSIP 210 Handwritten Character Recognition Using Multiresolution Technique and Euclidean Distance Metric Figure 1. A flowchart of HCR system. Figure 2. Sample of characters written by 10 different persons. Copyright © 2012 SciRes. JSIP Handwritten Character Recognition Using Multiresolution Technique and Euclidean Distance Metric 211 100 100 100 100 100 100 100 100 100 100 Figure 3. Some separated characters from the sample in Figure 1 and resized into 100 by 100 pixel images. Figure 4. Results of preprocessing steps applying on a handwritten character. and = M = 2 j so that j = 0, 1, 2, 3,, J – 1 and m, n = 0, 1, 2, ij2 ijj j jmn,, xy,2 2,2xm yn 3, , 21 [16,17]. Equation (3) shows that f(x, y) is (5) obtained via the inverse discrete wavelet transform for i HV,, D i given W and W of Equations (1) and (2). DWT can where index i identifies the directional wavelets that as- be implemented using digital-filters and down-samplers sumes the values H, V and D. Wavelets measure func- [16,17]. The block diagram of multiresolution using DWT tional variations such as intensity or gray-level variations is shown in the Figure 5.