Microsoft Word - 2-3148-EndangSetyati-LE3 Knowledge Engineering and Data Science (KEDS) pISSN 2597-4602 Vol 1, No 2, September 2018, pp. 46–54 eISSN 2597-4637 https://doi.org/10.17977/um018v1i22018p46-54 ©2018 Knowledge Engineering and Data Science | W : http://journal2.um.ac.id/index.php/keds | E : keds.journal@um.ac.id This is an open access article under the CC BY-SA license (https://creativecommons.org/licenses/by-sa/4.0/) Digit Classification of Majapahit Relic Inscription using GLCM-SVM Tri Septianto a, 1, *, Endang Setyati a, 2, Joan Santoso a, 3 a Department of Information Technology, Sekolah Tinggi Teknik Surabaya, Ngagel Jaya Tengah 73-77, Surabaya-60284, Indonesia 1 septianto3@gmail.com; 2 endang@stts.edu*; 3 joan@stts.edu * corresponding author I. Introduction Currently, there are many studies that discuss the classification of images with various objects and methods. Image classification is commonly used to create object recognition apps. Classification of images is used to create an object recognition applications. For example are Text and character recognition on metal-sheets [1], Deep learning for handwritten Javanese character recognition [2], Content-based image retrieval for multi-objects fruits recognition using k-means and k-nearest neighbor [3], License Automatic Plate Recognition based on edge detection [4] and Arabic handwriting recognition using sequential minimal optimization [5]. In this study, the author attempted to use the image of the object-year figure (digit of year) on the inscription number of relics of the Majapahit Kingdom in Java, Indonesia. Classification method used is a Support Vector Machine (SVM), whereas the method of Gray-Level Co-Occurrence Matrix (GLCM) is a method used for the extraction of features. The purpose of this study was to perform image classification of a digit of the year whose form has its own uniqueness. This image classification of a digit of the year is used as an object of research to assist the public in recognizing the number of years of an inscription writing stored in the museum Trowulan, Mojokerto, East Java. Additionally, it can be used to document the image of a digit of year digitally. Image of a digit of the year is classified into 1, 2, 3, 4, 5, 6, 7, 8, 9, and 0 classes. Within this present study, the authors expect that the result is worthwhile to the direct contribution to the results of the study which are directly related to the preservation of Majapahit Kingdom ancient relic in Indonesia. Because what we are doing here pertained to participate in the preservation of the scope of the history and culture of Indonesia. So far, there is no research which employs the image of a digit year object on relic inscription of Majapahit Kingdom. Therefore, the authors were interested in the attempt to build an application to recognize the image of a digit of the year in relic inscription using recent technology. The author also expects that this research could inspire other researchers in the ARTICLE INFO A B S T R A C T Article history: Received 23 March 2018 Revised 17 April 2018 Accepted 15 June 2018 Published online 31 August 2018 A higher level of image processing usually contains some kind of classification or recognition. Digit classification is an important subfield in handwritten recognition. Handwritten digits are characterized by large variations so template matching, in general, is inefficient and low in accuracy. In this paper, we propose the classification of the digit of the year of a relic inscription in the Kingdom of Majapahit using Support Vector Machine (SVM). This method is able to cope with very large feature dimensions and without reducing existing features extraction. While the method used for feature extraction using the Gray-Level Co-Occurrence Matrix (GLCM), special for texture analysis. This experiment is divided into 10 classification class, namely: class 1, 2, 3, 4, 5, 6, 7, 8, 9, and class 0. Each class is tested with 10 data so that the whole data testing are 100 data number year. The use of GLCM and SVM methods have obtained an average of classification results about 77 %. This is an open access article under the CC BY-SA license (https://creativecommons.org/licenses/by-sa/4.0/). Keywords: Classification Features extraction Digit of year Support Vector Machine Gray-Level Co-Occurrence Matrix T. Septianto et al. / Knowledge Engineering and Data Science 2018, 1 (2): 46–54 47 future in utilizing other relic inscription of Majapahit Kingdom. Finally, Indonesian culture and history could be preserved well continuously. In this research, SVM method was chosen as a classification method. SVM is a classifier which utilizes the farthest margin distance from hyperplane [6][7]. SVM is also commonly known as a method which is able to process data with high dimension without reducing the dimension of particular data [8][9]. SVM frequently provides an identical model and solution. The result of the model could be utilized again in the testing process. SVM is able to separate data distribution which its classification is linear or non-linear. Meanwhile, this research employed GLCM for feature extraction. GLCM is one of simple feature since it is obtained from the greyness level of the certain image [10][11][12][13]. There are several similar research which employed SVM method for image classification and GLCM for extraction of features, such as research conducted by [7], [10], and [13]. However, they utilized different image objects. In the research conducted by [7], the author's utilized image of tumors and the results of trial detection obtained the precision score of 93.3 %. In the research conducted by [10], the authors succeeded to classify between hazy and not-hazy image by obtaining result accuracy of 97.16 % for synthesis database and 85 % for the genuine database. Meanwhile, in research conducted by [13], the authors obtained an accuracy of 98.32 % on sub-image A, 84.49 % on sub- image B, and 78.96 % on sub-image C from segmentation of oil palm. In accordance with several previous research which succeeded, thus the authors decided to employ SVM and GLCM as a method within this research. To facilitate understanding of the process of this research, thus the authors employed the article writing structure by dividing into three parts, research methodology, experiment results, and the last part is the conclusion. In research methodology part, the authors provided three subparts as follows: data collection, method, and data analysis. Data collection sub-part explains how the authors obtained the set data utilized in this study. Method sub-part explains how do SVM and GLCM work. Meanwhile, data analysis sub-part discusses how dataset employed could be implemented by the determined methods. In the experiment results part, it exposes the result of the trial of SVM method implementation. SVM, in this research, attempted to compare image classification, where extraction of features is without GLCM implementation and other trials of image classification where extraction of features had its extraction of features employing GLCM. In the conclusion part, it discusses the red line of the utilized methods and provides a comparison of trial results. II. Methods A. Data Collection The data used in this research is an image of a digit from relic inscription of Majapahit Kingdom digit of the year. The image of the digit was taken from sampling result and image quantification which was acquired as much as 1000 images. In this research, 900 images of a digit of the year were utilized as data training and 100 images of a digit of the year were utilized as data testing. The utilization of data training in each class is 90 images and as for data testing, 10 images of a digit of the year were utilized in each class (an example is shown in Fig. 1). Fig. 1. Example of images of digit of year 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 48 T. Septianto et al. / Knowledge Engineering and Data Science 2018, 1 (2): 46–54 B. Feature Extraction A feature extraction stage is intended to extract the characteristics or information of the object in the image that is aimed to be identified or distinguished with other objects. Characteristics or features that have been extracted and then is used as parameters or input values to distinguish between objects with one another on the stage of identification or classification. Numerous methods can be used in the extraction of features, however, in this study, the authors chose GLCM method for extraction of features on the image of a digit of the year, with the reasons as noted in the previous section. The definition of GLCM is a tabulation of how often a different combination of pixel brightness values (gray level) that occurs in an image. GLCM is a matrix that has dimensions based on the gray level of an image. GLCM has 22 features. However, the most important features are 3 elements, namely contrast (CON), correlation (CORR) and homogeneity (HOM) [10]. Contrast is a representation of the number of local gray level in an image. Correlation is a linear measurement gray level between neighboring pixels. Homogeneity is a measure of homogeneity variation of gray level in an image. Usually, when the contrast value is small, then the homogeneity value is great. To calculate GLCM, Cm,n, it can be calculated based on the distance of d and the direction of  [13]. Thus, the formula GLCM can be seen as written in the following equation (1).       1 0 1 21, }),(&),({ M x N oy ji jdydxIiyxIPC  (1) where Ci,j is the intensity of the co-occurrence matrix; i and j are a couple of pixels with intensity values I(x, y) = i and I(x ± d1,y ± d2) = j; x = 0, 1, ..., M-1 and y = 0, 1, ..., N-1; while M and N is the number of rows and columns of the matrix. After the intensity of the co-occurrence matrix is formed, then each element of the matrix P{•} needs to be normalized by dividing each element with a number which is the sum total of the pixel pair. The result of the normalization of P{•}, can be seen in the following equation (2).     false isargument theif,0 trueisargument theif,1 }{P (2) The contrasting parameter represents gray level variations in an image file, usually used as a parameter contrast linear dependence on the value of neighboring pixels of gray level. Contrast can also be referred to as the variance of the sum of squares (sum of squares variance). The formula for calculating the Contrast (CON), can be seen in the following equation (3).   i j jiCjiCON , 2)( (3) The correlation parameters showed a linear dependence of the degree of gray pixels neighboring each other in a gray image. Equation correlation (CORR), can be seen in the following equation (4), where  is the deviation standard of x and y.    i j yx jiyx Cujui CORR  ,))(( (4) Homogeneity is the parameter in GLCM that indicates homogeneity intensity variations in an image. This homogeneity equation is said to represent the roughness in the image field. Calculation of homogeneity (HOM) can be seen in the following equation (5).    i j jiC ji HOM ,2)(1 1 (5) C. Classification Data mining is a process of inferring knowledge from huge data. Classification is a major technique in data mining and widely used in various fields. Classification is data mining (machine learning) technique used to predict group membership for data instances. By simple definition, the classification T. Septianto et al. / Knowledge Engineering and Data Science 2018, 1 (2): 46–54 49 analyzes a set of data and generate a set of grouping rules which can be used to classify future data. For the classification, we focus on Support Vector Machine (SVM) [14]. SVM is a powerful algorithm with strong theoretical foundations. SVM has strong regularization properties, which refers to the generalization of the model to new data [14][15]. SVM is a supervised machine learning algorithm. Supervised learning method processed through two steps: Training and Testing [6]. SVM is based on the concept of decision making [7]. A Decision-making is based on the separation of feature members of different classes. SVM is chosen, because it is able to cope with very large feature dimensions and without reducing existing features. An SVM performs classification by constructing an n-dimensional hyperplane [15]. The purpose of SVM is to find the largest margin of hyperplane [10]. An SVM is a mathematical entity, an algorithm for maximizing a particular mathematical function with respect to a given collection of data. SVM can handle data that is linear and non-linear data. Simple SVM is usually linear in dividing features into both classes. The SVM Linear kernel function is commonly described as equation (6). yxyxK .),(  (6) where, K(x, y) is inner product of x and y. SVM is grouped into two type linear and non-linear classification. The linear SVM classifier is worthwhile for the non-linear classifier to map the input pattern into higher dimensional feature space. In here, we used non-linear SVM, which is divided into several classes. Therefore, SVM requires a kernel. Gaussian kernel or commonly known as Radial Basis Function (RBF) can be written as equation (7). The RBF kernel, is applied to two samples x and y, which indicate as feature vectors in some input space and it can be defined as,           2 2 2 exp),(  yx yxK (7) D. Data Analysis In this study, the trial would be conducted using two scenarios. The first experiment was tested by performing data classification without passing GLCM extraction of features process, workflow without GLCM features can be seen in Fig. 2. The second trial was performed by passing GLCM extraction of features process, whereby its workflow can be seen in Fig. 3. Meanwhile in the workflow of Fig. 2, after the image was done in pre-processing, then the image will be converted into a matrix of pixels. After converting into a pixel matrix, the images were converted back into a vector. The images in the vector were then forwarded using SVM method to perform the classification process. While according to the workflow in Fig. 3, the results of GLCM features would be utilized to be classified. Therefore, the workflows between systems without GLCM features and with GLCM features are different, so that it can generate different predictions. Classification in the training sets by using the image of a digit of years in Fig. 4 will produce a model. And this model will then be used to make predictions on the testing sets. Fig. 2. Workflow without GLCM process 50 T. Septianto et al. / Knowledge Engineering and Data Science 2018, 1 (2): 46–54 Examples of the image of a digit of the year in ancient relic inscriptions which were used for Training Set and Testing Set can be seen in the following Fig. 4 and Fig. 5, each of which represents a grade 0 to grade 9. At the stage of pre-processing, the image of a digit of the year will be converted to the size of 32x32 pixels. The original image of the RGB format is converted into Grayscale. Fig. 6 is the grayscale result of digit of year image sample 1 in Fig. 4. Once the image is converted, it appears that the workflow in Fig. 3 would take the process to obtain GLCM features which include contrast, correlation, and homogeneity. As an example, the results Fig. 3. Workflow employing GLCM process Fig. 4. Examples of image of digit of year in training set Fig. 5. Examples of image of digit of year in testing set Fig. 6. Convert of digit of year image sample 1 from RGB to grayscale T. Septianto et al. / Knowledge Engineering and Data Science 2018, 1 (2): 46–54 51 obtained in GLCM features of the image of a digit of the year in Fig. 4 can be seen in the following Table 1. The visualization of GLCM features con, corr, and hom in Table 1, only for the digit of the year image sample 1, can be seen in Fig. 7 while Fig. 8 is a matrix formed from Fig. 7. In Fig. 8, this grayscale matrix still has dimensions of 32x32. While after the process of GLCM, the grayscale matrix has changed into dimension 1x1. Fig. 9 is a visualization of the data distribution on the resulting model of the training process in Fig 3. The con, corr and hom values are distributed into 10 classes. From Fig. 9, it is seen that between the distributions of values per class almost has the same value as the other classes. III. Experiment Results The experiment conducted in this research was employing the dataset which has been explained in the data collection. The employed dataset was 100 images of a digit of the year, which was divided into two types of dataset, namely 900 images were taken for the training set and 100 images were taken as a testing set. It represented each of class 1, 2, 3, 4, 5, 6, 7, 8, 9 and 0. The training set consisted of 90 images for each class and testing set consisted of 10 images for each class. The experiment results employing test without GLCM features (Fig. 2) are presented in the following Table 2. Table 1. GLCM features examples in Fig 5. Image Sample GLCM Features Con Corr Hom 1 0.611895161290 0.523533267280 0.763004032258 2 0.908266129032 0.726528935617 0.725681925996 3 0.662298387097 0.838165769294 0.813381591068 4 0.803427419355 0.740220693320 0.737114563567 5 0.936491935484 0.704063655696 0.695985531309 6 0.367943548387 0.825705645161 0.535556417361 7 0.731854838710 0.715120967742 0.604353099653 8 0.735887096774 0.456205609554 0.732459677419 9 0.559475806452 0.766229838710 0.683406298090 0 0.126008064516 0.585684217570 0.939415322581 Fig. 7. Visualization of Con, Corr and Hom of digit of year image sample 1 Fig. 8. Grayscale matrix of Fig. 7 52 T. Septianto et al. / Knowledge Engineering and Data Science 2018, 1 (2): 46–54 The experimental results of trials in Table 2 show that using data from testing of 10 images predicted in class 9 and class 0, has the first highest percentage of 100 %. The order of the second highest percentage of 90 %, the data for testing of 10 images predicted only in class 6. In class 3, it obtained a percentage of 80 %. While in class 1, class 2, class 5, class 7 and class 8 obtained a percentage of 70 %. The lowest prediction was the 4th class with a percentage of 50 %. The reason for low predictions in the 4th class remains unknown since it is in the process of examination and further research. Currently, the accuracy improvement will be continued until it reaches the intended target. Whilst, the results of a test on the system workflow in Fig. 3 which employed GLCM features can be seen in Table 3. The results of the prediction percentage are very low which obtained an average of 36 %. Fig. 9. Visualization of the data distribution in Fig. 3 Table 2. Test results employing Fig 2. workflow Class Predictions Total Image Success Percentages 1 10 7 70 % 2 10 7 70 % 3 10 8 80 % 4 10 5 50 % 5 10 7 70 % 6 10 9 90 % 7 10 7 70 % 8 10 7 70 % 9 10 10 100 % 0 10 10 100 % Total 100 77 Average 77 % T. Septianto et al. / Knowledge Engineering and Data Science 2018, 1 (2): 46–54 53 The experimental results of a test on Table 3 show that by using 100 data testing, which is divided into 10 classes with each of 10 images per class, the prediction results are as follows: the predicted in class 0 obtained a percentage of 100 %. In class 2, 5 and 6 obtained a percentage of 50 %. In the third class, it obtained 40 %, and the percentage of class 7 obtained a percentage of 30 %. In class 8 and 9, it obtained the percentage of 20 %, while class 0 and 4 did not manage to identify any training set. The reasons for very low predictions in almost all classes remain unknown because it is in the process of examination and further research. Currently, the accuracy improvement will be continued until it reaches the intended target. Nonetheless, the author has guessed that the cause is due to less specific the results of extraction of a feature, in this case, is also due to the distribution of features in the formation of highly influential decision boundary. Therefore, in future research, the results in the process of feature extraction are required to be improved by adding a data set of up to 3000 images. Fig. 10 is a graph of the percentage of predicted results for the classification class 0 to class 9, using GLCM features and without GLCM features. Table 3. Test results employing Fig 3. workflow Class Predictions Total Image Success Percentages 1 10 0 0 % 2 10 5 50 % 3 10 4 40 % 4 10 0 0 % 5 10 5 50 % 6 10 5 50 % 7 10 3 30 % 8 10 2 20 % 9 10 2 20 % 0 10 10 100 % Total 100 36 Average 36 % Fig. 10. Comparison results between system test using GLCM and not using GLCM 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 1 2 3 4 5 6 7 8 9 10 PE R CE N TA G E O F PR ED IC TI O N (% ) CLASS OF DIGIT OF YEAR % without GLCM feature % with GLCM feature 54 T. Septianto et al. / Knowledge Engineering and Data Science 2018, 1 (2): 46–54 IV. Conclusions Classification performed by SVM aims to make the decision boundary. Decision boundary derived from the model resulting from the testing of the training set into the SVM. Model of this training set will be used for examining the testing set in order to be able to predict a new record. Decision boundary would be good if a data has a specific feature. The test results shows that the SVM results are better than GLCM-SVM. This is because the distribution of the features in the formation of the decision boundary is highly influential. References [1] J. Kronenberger, D. Malysiak and U. Handman, "Text and Character Recognition on Metal-sheets," 2017 IEEE International Conference on Information and Automation (ICIA), Macau, 2017, pp. 392-397. [2] R. Khadijah and A. Nurhadiyatna, "Deep Learning for Handwritten Javanese Character Recognition," 2017 1st International Conference on Informatics and Computational Sciences (ICICoS), Semarang, 2017, pp. 59-64. [3] Erwin, M. Fachrurrozi, A. Fiqih, B. R. Saputra, R. Algani and A. Primanita, "Content based Image Retrieval for Multi- objects Fruits Recognition using K-means and K-nearest neighbor," 2017 International Conference on Data and Software Engineering (ICoDSE), Palembang, 2017, pp. 1-6. [4] P. S. Ha and M. Shakeri, "License Plate Automatic Recognition Based on Edge Detection," 2016 Artificial Intelligence and Robotics (IRANOPEN), Qazvin, 2016, pp. 170-174. [5] H. Hassen and S. Al-Maadeed, "Arabic Handwriting Recognition Using Sequential Minimal Optimization," 2017 1st International Workshop on Arabic Script Analysis and Recognition (ASAR), Nancy, 2017, pp. 79-84. [6] K. Machhale, H. B. Nandpuru, V. Kapur and L. Kosta, "MRI Brain Cancer Classification Using Hybrid Classifier (SVM-KNN)," 2015 International Conference on Industrial Instrumentation and Control (ICIC), Pune, 2015, pp. 60- 65. [7] M. Mohamed Fathima, D. Manimegalai and S. Thaiyalnayaki, "Automatic Detection of Tumor Subtype in Mammograms Based on GLCM and DWT Feature Using SVM," 2013 International Conference on Information Communication and Embedded Systems (ICICES), Chennai, 2013, pp. 809-813. [8] A. Patle and T. V. Kalyani, "Support Vector Machine with Inverse Fringe as Feature for MNIST Dataset," 2016 IEEE 6th International Conference on Advanced Computing (IACC), Bhimavaram, 2016, pp. 123-126. [9] V. Wasule and P. Sonar, "Classification of Brain MRI Using SVM and KNN Classifier," 2017 Third International Conference on Sensing, Signal Processing and Security (ICSSS), Chennai, 2017, pp. 218-223. [10] R. Asery, R. K. Sunkaria, L. D. Sharma and A. Kumar, "Fog detection using GLCM based features and SVM," 2016 Conference on Advances in Signal Processing (CASP), Pune, 2016, pp. 72-76. [11] M. Imani and G. A. Montazer, "GLCM Features and Fuzzy Nearest Neighbor Classifier for Emotion Recognition from Face," 2017 7th International Conference on Computer and Knowledge Engineering (ICCKE), Mashhad, 2017, pp. 8- 13. [12] Y. L. Lei, X. M. Zhao and W. D. Guo, "Cirrhosis Recognition of Liver Ultrasound Images Based on SVM and Uniform LBP Feature," 2015 IEEE Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chongqing, 2015, pp. 382-387. [13] S. Daliman, S. A. Rahman, S. A. Bakar and I. Busu, "Segmentation of Oil Palm Area Based on GLCM-SVM and NDVI," 2014 IEEE Region 10 Symposium, Kuala Lumpur, 2014, pp. 645-650. [14] G. Kesavaraj and S. Sukumaran, "A study on classification techniques in data mining," 2013 IEEE Fourth International Conference on Computing, Communications and Networking Technologies (ICCCNT), Tiruchengode, India, 2013, pp. 1-7. [15] Arti Patle and Deepak Singh Chouhan, “SVM Kernel Functions for Classification”, 2013 International Conference on Advances in Technology and Engineering (ICATE), Mumbai, 23-25 January 2013, Paper Identification Number-102.