Butterfly identification using gray level co-occurrence matrix (glcm) extraction feature and k-nearest neighbor (knn) classification

Rico Andrian(1*), Devi Maharani(2), Meizano Ardhi Muhammad(3), Akmal Junaidi(4),

(1) Universitas Lampung, Bandar Lampung
(2) Universitas Lampung, Bandar Lampung
(3) Universitas Lampung, Bandar Lampung
(4) Universitas Lampung, Bandar Lampung
(*) Corresponding Author
Rico Andrian
Devi Maharani
Meizano Ardhi Muhammad
Akmal Junaidi


Gita Persada Butterfly Park is the only breeding of engineered in situ butterflies in Indonesia. It is located in Lampung and has approximately 211 species of breeding butterflies. Each species of Butterflies has a different texture on its wings. The Limited ability of the human eye to distinguishing typical textures on butterfly species is the reason for conducting a research on butterfly identification based on pattern recognition. The dataset consists of 600 images of butterfly’s upper wing from six species: Centhosia penthesilea, Papilio memnon, Papilio nephelus, Pachliopta aristolochiae, Papilio peranthus and Troides helena. The pre-processing stage is conducted using scaling, segmentation and grayscale methods. The GLCM method is used to recognize the characteristics of butterfly images using pixel distance  and Angular direction 0o, 45o, 90o and 135o. The features used is angular second moment, contrast, homogeneity and correlation. KNN classification method in this study uses k values1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21 and 23 based on the Rule of Thumb. The result of this study indicate that Centhosia penthesilea and Papilio nephelus classes can be classified properly compared to the other 4 classes and require a classification time of 2 seconds at each angular orientation. The highest accuracy is 91.1% with a value of  in the angle of 90o and error rate8.9%. Classification error occured because the value of the test data features is more dominant with the value of the training image features in different classes than the supposed class.  Another reason is because of imperfect test data.


butterflies; GLCM; KNN; pattern recognition

Full Text:



S. Herawati, A. Larasati, A. Djausal and M. Martinus, Kupu-Kupu Lampung Taman Kupu-Kupu Gita Persada, Bandar Lampung: Yayasan Sahabat Alam, 2016.
S. B. Kulkarni, R. B. Kulkarni, U. P. Kulkarni and R. S. Hegadi, "GLCM-Based Multiclass Iris Recognition Using FKNN and KNN," International Journal of Image and Graphics, vol. 14, no. 3, 2014.
G. Kausha and R. Bala, "GLCM and KNN based Algorithm for Plant Disease Detection," International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering, vol. 6, no. 7, pp. 5845-5852, 2017.
O. R. Indriani, E. J. Kusuma, C. A. Sari, E. H. Rachmawanto and D. R. I. M. Setiadi, "Tomatoes Classification Using K-NN Based on GLCM and HSV Color Space," in International Conference on Innovative and Creative Information Technology (ICITech), Salatiga, 2017.
G. A. Purnomo, "Klasifikasi Spesies Kupu-Kupu Menggunakan Ekstraksi GLCM dan Algoritma Klasifikasi K-NN," Universitas Dian Nuswantoro, Semarang, 2015.
Ö. F. Ertuğrul, Y. Kaya, L. Kaycı and R. Tekin, "A Vision System for Classifying Butterfly Species by using Law’s Texture Energy Measures," International Journal on Computer Vision, Machine Learning and Data Mining, vol. 1, pp. 16-24, 2015.
S. Safinaz, "An Efficient Algorithm for Image Scaling with High Boost Filtering," International Journal of Scientific and Research Publications, vol. 4, no. 5, pp. 1-9, 2014.
P. Kaler, "Study of grayscale image in image procesing," International Journal of Recent and Innovation Trends in Computing and Communication, vol. 4, no. 11, pp. 309-311, 2016.
E. Budianita, J. Jasril and L. Handayani, "Implementasi Pengolahan Citra dan Klasifikasi K-Nearest Neighbour Untuk Membangun Aplikasi Pembeda Daging Sapi dan Babi," Jurnal Sains, Teknologi dan Industri, vol. 12, no. 2, pp. 242-247, 2015.
M. A. Agmalaro, A. Kustiyo and A. R. Akbar, "Identifikasi Tanaman Buah Tropika Berdasarkan Tekstur Permukaan Daun Menggunakan Jaringan Syaraf Tiruan," Jurnal Ilmu Komputer Agri-Informatika, vol. 2, no. 2, pp. 73-82, 2013.
P. N. Andono, T.Sutojo and M. Muljono, Pengolahan Citra Digital, Yogyakarta: Andi, 2017.
I. Zyout and I. Abdel-Qader, "Classification of Microcalcification Clusters via PSO-KNN Heuristic Parameter Selection and GLCM Features," International Journal of Computer Applications, vol. 31, no. 2, pp. 34-39, 2011.
H. Leidiana, "Penerapan Algoritma K-Nearest Neighbor untuk Penentuan Resiko Kredit Kepemilikan Kendaraan Bemotor," Jurnal Penelitian Ilmu Komputer,System Embedded & Logic, vol. 1, no. 1, pp. 65-76, 2013.
P. Harrington, Machine Learning in Action, Greenwich, CT, USA: Manning Publications Co, 2012.
H. S. Khamis, K. W. Cheruiyot and S. Kimani, "Application of k- Nearest Neighbour Classification in Medical Data Mining," International Journal of Information and Communication Technology Research, vol. 4, no. 4, pp. 121-128, 2014.
F. N. M. Sabri, N. M. Norwawi and K. Seman, "Identifying False Alarm Rates for Intrusion Detection System with Data Mining," IJCSNS: International Journal of Computer Science and Network Security, vol. 11, no. 4, pp. 95-99, 2011.
J. W. Yodha and A. W. Kurniawan, "Pengenalan Motif Batik Menggunakan Deteksi Tepi Canny dan K-Nearest Neighbor," Techno.COM, vol. 13, no. 4, pp. 251-262, 2014.

DOI: https://doi.org/10.26594/register.v6i1.1602

Article metrics

Abstract Abstract views : 0times
Article views : 0 times


  • There are currently no refbacks.

Copyright (c) 2020 Register: Jurnal Ilmiah Teknologi Sistem Informasi

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Indexed in:



This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International  License