Handwritten Bengali Numeral Recognition using HOG

0 downloads 0 Views 840KB Size Report
Like any other language number system, Bengali numeral ... case of hand-written character recognition, it is becomes very difficult to ... BACKGROUND STUDY.

2018 5th International Conference on Signal Processing and Integrated Networks (SPIN)

Handwritten Bengali Numeral Recognition using HOG Based Feature Extraction Algorithm Amitava Choudhury

Hukam Singh Rana

Tanmay Bhowmik

Indian Insritute of Engineering Science and Technology, Shibpur, SoCS, UPES, Dehradun, [email protected]

School of Computer Science, UPES, Dehradun India [email protected]

School of Computer Science, UPES, Dehradun, India, [email protected]

on desktop version, while for online recognition we need internet connection. However, in both the cases recognition algorithm plays a vital role. The hand-written numerals are captured either by camera or scanned by scanner device. The scanned image is given as the input image to the OCR. To recognize the particular numeric digit we need to extract the feature from the image. Many feature extraction algorithms are widely proposed. In earlier days, correlation mapping was used for recognition of digits. Later, the algorithm has been changed with the changes in the computation techniques. After the extraction of features from the input image, they are used to classify the input images. Artificial Neural Network (ANN) became popular for this type of classification [4]. In recent days, the deep learning method [5] is also use for the same classification purpose to achieve improved classification accuracy. In this paper, the input dataset is classified as

Abstract—Hand written character recognition is widely used in modern research. Recognize the characters from an image has always been active research area in the computer vision community. Apart from English, there are several regional languages available worldwide. In India there are 22 official languages, and Bengali is one of them. Bengali script has its own writing pattern. Like any other language number system, Bengali numeral system has ten different digits to indicate 0-9. It has its own alphabets and numerals. In this paper, Histogram of oriented gradient (HOG) and color histogram for selection of features algorithm is proposed. HOG are used as the feature set to represent each digit sample at the feature space and Support Vector Machine (SVM) used to produce the output from input image. Proposed algorithm is efficient and gives an accuracy of 98.05 on CMATERDB3.1.1 dataset. This type of numeric image recognition can be use in the post offices to acknowledge the pin code written in Bengali.

………………….. (1)

Keywords—OCR; Machine learning; Support vector machine; HOG features.



The rest of the paper is organise as follows. In section II, existing algorithm and model has been described. Section III provides the details of the proposed methodology. Section IV contains the details of dataset and experimental results from the experiment. Finally, the conclusion and future scope of the proposed work has been described in section V.

Due to the applications of advanced technique of computation, recognition of handwritten document has been achieving the most interesting topic by several researchers on computer vision. It has been observed that apart from English Computer vision researcher are more interested on other regional language. In this vast area of research, Handwritten Recognition of Bengali script is going to very popular. Bengali is the seventh popular language across the world and it is the national language in Bangladesh [1,14]. Various Bengali fonts are available on keyboard while typing the script. However, in case of hand-written character recognition, it is becomes very difficult to recognize. This difficulty is observed due to the variation of pattern from person to person. In this regard, various algorithms are proposed and effective model has been developed to recognize hand-written Bengali document [1, 2, 3]. As discussed earlier Bengali script has its own writing pattern, and people need to follow that pattern while writing Bengali. Bengali script has ten digits like English to represent 0 to 9. The shape of these digits is completely different to each other. It is observed that the shape of each digit is very curvy in nature. In Bengali Optical character recognition (OCR) system, there are two types of recognition: the offline recognition and the online recognition. Offline recognition is performed based

978-1-5386-3045-7/18/$31.00 ©2018 IEEE



II. BACKGROUND STUDY First, Bengali numeral recognition can be classified into two ways, offline and online systems. We mainly concentrate on offline handwritten numeral recognition (HNR). The offline character recognition is presented in [3] to describe HNR using template-matching technique. Mohammed Moshiul Hoqueet et al. [2] proposed an OCR engine to recognize the Bengali numerals. The unique fuzzy-based rule was applied to each numeral. The numerals’ features i.e. fuzzy-features are mapped into some predefined linguistic variables. For the recognition of a numeral, fuzzy rules are calculated. This fuzzy rule is compared with rule-base and the character, which contains the highest percentage value, is the recognized character. The acceptance rate of the successful recognition ws 82.099%. Vishweshwarayya C. Hallur and Ravindra S. Hegadi


2018 5th International Conference on Signal Processing and Integrated Networks (SPIN)

described an approach based on template matching for HNR of another Indian script[4]. OCR is used for text recognition. To recognize Indian handwritten script, several algorithms have been proposed. K. Roy, C. Chaudhuri, U. Pal and M. Kundu described an approach on the effect of varying training set sized on the recognition performance with and written Bengali numerals [5]. Amitava Choudhury and Joydeep Mukherjee also described an approach to recognize offline hand written Bengali numeral recognition using template matching method [6]. OCR can be used to recognize the characters as well the numeric values also. Ketan S. Machhale et al. [7] proposed an adaptive template matching and feature extraction using curvlet transform for the recognition of handwritten Bengali numerals. The feature extracted from the numeral set based on the curvelet transform morphological method. To classify the characters a K-nearest neighbor (KNN) classifier is used. Ujjawal Bhattacharya et al. [8] proposed an efficient algorithm for recognition system of mixed numerals. A multi stage cascaded recognition scheme using wavelet based multi resolution representations and multilayer perception of Multi-layer perceptron (MLP) classifier. The proposed method has been implemented for the recognition of handwritten numerals in mixed script situation. In U. Pal, B. B. Chaudhuri [9], an automatic recognition method for unconstrained off-line Bengali hand written numerals was described. To obtain features from each character, they provided a concept of water overflow from the reservoir as well as topological and statistical features and numerals. The direction of water flow, height of water level, when water overflows from the reservoir, position of the reservoir with respect to the character-bonding box, shape of the reservoir etc, are used in the recognition scheme. Pulak purakait and Bhabatosh Chanda described offline recognition of handwritten Bengali numerals [10]. They proposed a novel morphological feature and k-curvature feature extraction technique to recognize handwritten scripts. R. V. Kulkarni and P. N. Vasambekar describe an overview of segmentation of handwritten connected digits [11]. Bengali numerals can also be recognized using correlation coefficients [12]. Showmik Bhowmik et. al [15] proposed a recognition algorithm using HoG descriptor.

Fig1. Sample dataset B. Feature Extractions Learning of useful features is always a challenging task in computer vision community. Feature extraction refers to the process of identifying points in an image that can be used to elucidate the image’s representation such as Edges, corners, and blobs Most of the image features are not robust against the scaling, rotation, illumination and the camera viewpoints. When performing analysis of handwritten Bengali numeral data, one of the biggest problems is to identify the useful features those can determine the edges and the orientation of the curve and the robust against the translation, rotation and camera viewpoints. In computer vision literature there are many approaches for features detection like Canny edge detection, Harris, SURF, Histogram oriented Gradient (HOG), Color Histogram, Scale Invariant Feature Transform (SIFT), etc. In this paper, Histogram oriented Gradient (HOG) and Color Histogram methods to extract the features. Histogram oriented Gradient (HOG) provides the robust features for edge detection and curve orientation while color histogram captures the statistical properties of an image's pixel. To compute the features from HOG descriptor, we operate on 8x8 pixel cells within images. We organized the cells into overlapping blocks. For each cell, we compute the gradient vector at each pixel and place them into a 9-bin histogram. The Histogram ranges from 0 to 180 degrees, so there are 20 degrees per bin. In this paper, the designed a classifier f which is described as , …………… (2) . Where

III. PROPOSED METHODOLOGY A. Dataset To run the proposed algorithm CMATERDB3.1.1 [13] dataset has been used. The dataset contains 6000 individual numeric values from 0-9 in Bengali font. The size of each letter is 32x32 pixel. Most of them are noise-free though mid filter noise reducing algorithm was applied on the dataset to reduce noise. We divided the dataset into three subsets, training validation and testing. In the training set, we sampled 4000 images from the dataset while in validation and testing test we sampled 1000 images from the dataset. We used the stratified sampling technique to overcome the problem of bias.


2018 5th International Conference on Signal Processing and Integrated Networks (SPIN)

easy to express the rough shape of the object and is robust to variations in geometry and illumination changes. HoG algorithm process is given below. 1. The color image is converted to grayscale 2. the luminance gradient is calculated at each pixel 3. To create a histogram of gradient orientations for each cell. 4. Feature quantity becomes robust to changes of form 5. Normalization and Descriptor Blocks 6. Feature quantity becomes robust to changes in illumination The luminance gradient is calculated at each pixel, the luminance gradient is a vector with magnitude m and orientation ș represented by the change in the luminance.

Input Image

Gradient computation

Computing HOG feature

Combining the computed histograms to generated feature vector

m( x, y ) = ( L( x + 1, y ) − L( x − 1, y )) 2 + ( L( x, y + 1) − L( x, y − 1)) 2 …………… (3)

ª º −1 § L ( x, y + 1) − L ( x, y − 1) · ¸¸» «θ ( x, y ) = tan ¨¨ © L( x + 1, y ) − L( x − 1, y ) ¹¼ ¬

Feature Vector

…………….. (4) Here, luminance gradient is a vector express change in luminance by the magnitude m and orientation ș. Then, luminance magnitude m of (x, y) coordinates of the image coordinate system is given by the equation. In this equation, Magnitude stronger in so much as the difference in luminance more intense vertical and horizontal target pixel, In addition, the luminance orientation is given by the expression. L contained in these expressions is the luminance value of pixel. Applying this process to all pixels, this figure looks like.

Fig2. HOG feature extraction process

Fig.3 Feature extraction using HOG feature extractor

Fig.4 Feature extraction using HOG feature and color histogram.

IV. EXPERIMENTAL RESULT AND ANALYSIS Fig. 5 processing of input image and corresponding 8x8 block HoG output

A. HoG and color histogram feature

B. Support Vector Machine The main objective of character recognition system is to achieve good accuracy on an enormous amount of training data and generalize the learning from training to test data with the same precision. SVM has the strength to approximate any

Extracted HOG features, returned as either a 1-by-N vector or a P-by-Q matrix. The features encode local shape information from regions or point locations within an image. HOG is an edge orientation histograms based on the orientation of the gradient in localized region that is called cells. Therefore, it is


2018 5th International Conference on Signal Processing and Integrated Networks (SPIN)

multidimensional function. It can also generalize the result without any prior knowledge of data. SVM isolate the data in the different classes by finding the right decision rules. These rules can be define with the help of support vectors, small subset of the training set. Optimal separation of these SVs will reflect the optimal separation of global data. SVM gives the excellent accuracy for binary and multi class classifications. In this paper, we usage SVM for multiclass classification since Bengali numerals recognition is a multi-class classification problem. is independent and identically Since our data and distributed where .The main idea of SVM is to find the hyperplanes to separate the data into 10 different classes so that the distance between hyperplanes and nearest point is maximal. This gives the following optimization problem Minimize

to identify and recognize handwritten Bengali numerals; still there are many challenges in this field. HOG based feature extraction method, SVM classifier is used to establish the proposed algorithm, and it has been seen that accuracy level is increased by using proposed method. Table 1 describes the accuracy table, which is also compared with existing method. Accuracy can be increased by extracting more features from input data, which is our next aim of development. REFERENCES [1] B. B. Choudhury and U. Pal, An OCR System to Read Two Indian Language Script: Bengali and Devnagari, IEEE, pp. 1011–1015, (1997). [2] Mohammed Mohisul Houque, et al., Bengali Numeral Recognition Engine (BNRE), 5th International Conference on Electrical and Computer Engineering, IEEE, pp. 644–647, (2008). [3] Farukh Al-omari, Handwritten Indian Numeral Recognition System using Template Matches Approaches, IEEE, 0-7695, 1165-1, (2001). [4] Vishweshwarayya C. Hallur and Ravindra S. Hegadi, Template Matching Approach for Handwritten Kanada Numeral Recognition, International Journal of Computer Applications, ISSN:0975-8887, pp. 11–12, (2012).

(5) With constraints

[5] K. Roy, C. Choudhury, U. Pal and M. Kundu, A Study on Effect of Varying Training Set Sizes on Recognition Performance with Handwritten Bengali Numerals, IEEE, 0-7803-9503-4, pp. 570–574, (2005). [6] Amitava Choudhury and Joydeep Mukherjee, An Approach Towards Recognition of Size and Shape Independent Bengali Handwritten


Numerals, International Journal of Scientific Research, vol. 2, no. 1, ISSN: 2319-7064, pp. 223–226, January (2013).

This gives the hyperplanes

[7] Ketan S. MAchhale, Pradnya P. Zode and Pravin P. Zode, Implementation of Number Recognition using Adaptive Template Matching and Feature Extraction Method, International Conference on Communication Systems and Network Technologies, 978-0-7695-4692-6/12, IEEE,

Where i = 0,1,2,3,4,5,6,7,8,9

pp. 194–197, (2012).

C. Result Analysis To established proposed method efficient 5000 data is used for training purpose and 1024 data is used for testing. This dataset consists ten several class depending on the feature of all ten digits. HoG extracts invariant features from an image by capturing edge and gradient structure. Further, a combination of combining HoG feature with color based histogram orient features is used to increase the accuracy level. Now this newly constructed features set captures color intensity features with edge and gradient structure. Accuracy of first method is 94% and the accuracy of second method is 98.05%.

[8] Ujjwal Bhattacharya and B. B. Chaudhuri, Handwritten Numeral Database of Indian Script and Multistage Recognition of Mixed Numerals, IEEE Transactions, pp. 444–457, (2009). [9] U. Pal and B. B. Chaudhuri, Automatic Recognition of Unconstrained Offline Bengali Handwritten Numerals, Springer, pp. 371–378, (2000). [10] Pulak Purkait and Bhabatosh Chanda, Off-line Recognition of Handwritten Nengali Numerals using Morphological Feature, 12th International Conference on Frontiers in Handwritten Recognition, 978-07695-4221-8/10, IEEE, pp. 363–368. [11] R. V. Kulkarni and P. N. Vasmbekar, An Overview of Segmentation Techniques for Handwritten Connected Digits, 978-1-4244-8594-9/10, IEEE, pp. 479–482, (2010). [12]Amitava Choudhury, Alok Negi, Sanhita Das “Recognition of Handwritten Bengali Numerals using Adaptive Coefficient Matching Technique”, Procedia Computer Science, Elsevier, DOI10.1016/j.procs.2016.06.055, pp. 764-770, 2016.

Table 1 Condition Existing method proposed by the author earlier[12] Proposed method

% accuracy 95.70%

[13]http://code.google.com/p/cmaterdb/. [14] Lewis, M. P., Simons, G. F., and Fennig, C. D. (2016). Ethnologue: Languages of the world, volume 19. SIL international Dallas, TX. [15] Showmik Bhowmik et.al., “Handwritten Bangla Word Recognition using HOG Descriptor”, 4th International conf of Emerging Applications of Information Technology, IEEE conferece procedding, 2014, pp-193197.


V. CONCUSION AND FUTURE SCOPE This paper describes an efficient algorithm for handwritten Bengali recognition. Various algorithms is already established


Suggest Documents