Classification of Chili Plant Diseases Through GLCM Feature Selection and the K Parameter in the K-Nearest Neighbor
Abstract
Chili pepper (Capsicum annuum L.) is a strategic horticultural commodity in Indonesia with high economic value. However, chili plants are often infected by diseases such as Anthracnose, Fusarium Wilt, Fruit Fly, and Thrips, which can lead to significant yield losses. Early and accurate identification of these diseases is crucial for effective control measures. This study aims to classify chili plant diseases based on leaf images using the Gray Level Co-occurrence Matrix (GLCM) for feature extraction and the K-Nearest Neighbor (K-NN) algorithm for classification. A total of 736 leaf images were used, divided into four disease classes. The pre-processing stages included resizing the images to 300×300 pixels, rotation augmentation (0°, 45°, 75°, 90°), and conversion to grayscale. Textural features were extracted using GLCM at four angles, and K-NN was applied with K values of 5, 7, and 9. The highest classification accuracy of 88.19% was achieved at a GLCM angle of 0° and K=5, with an overall average accuracy across all angles of 85.06%. These findings not only reinforce previous findings on the effectiveness of GLCM and K-NN but also contribute by identifying the optimal parameter configuration (angle 0° and K=5) for the specific chili disease dataset. The results have the potential to be applied as a foundation for developing an automated plant disease detection system in the field.
Keywords
Full Text:
PDFReferences
M. Anwar, Y. Kristian, and E. Setyati, “Klasifikasi Penyakit Tanaman Cabai Rawit Dilengkapi Dengan Segmentasi Citra Daun dan Buah Menggunakan Yolo v7,” INTECOMS, vol. 6, no. 1, pp. 540–548, June 2023, doi: 10.31539/intecoms.v6i1.6071.
W. G. Akbari, N. Hidayat, and N. Santoso, “Diagnosis Penyakit Cabai Menggunakan Metode Fuzzy K-Nearest Neighbor (FKNN)”.
H. D. A. Hamid, N. Hidayat, and R. K. Dewi, “Diagnosis Penyakit Tanaman Cabai Menggunakan Metode Modified K-Nearest Neighbor (MKNN)”.
D. Avianto and I. E. Handayani, “Klasifikasi Penyakit Antraknosa Pada Cabai Merah Teropong ”Inko Hot” Dengan Metode Convolutional Neural Network,” SINTECH Journal, vol. 6, no. 2, pp. 76–88, Aug. 2023, doi: 10.31598/sintechjournal.v6i2.1377.
N. Hafidhoh, “Identifikasi Penyakit Daun Tanaman Cabai Merah Dengan Ekstraksi Fitur Dan Klasifikasi Support Vector Machine,” vol. 5, 2023.
V. G. Dhanya et al., “Deep learning based computer vision approaches for smart agricultural applications,” Artificial Intelligence in Agriculture, vol. 6, pp. 211–229, 2022, doi: 10.1016/j.aiia.2022.09.007.
Z. Y. Lamasigi and A. Bode, “Influence of gray level co-occurrence matrix for texture feature extraction on identification of batik motifs using k-nearest neighbor,” Ilk. J. Ilm., vol. 13, no. 3, pp. 322–333, Dec. 2021, doi: 10.33096/ilkom.v13i3.1025.322-333.
Z. Y. Lamasigi, S. Serwin, and Y. Malago, “Identification of the Freshness Level of Tuna based on Discrete Cosine Transform on Feature Extraction of Gray Level Co-Occurrence Matrix using K-Nearest Neighbor,” Ilk. J. Ilm., vol. 15, no. 1, pp. 153–164, Apr. 2023, doi: 10.33096/ilkom.v15i1.1426.153-164.
Z. Y. Lamasigi, “DCT Untuk Ekstraksi Fitur Berbasis GLCM Pada Identifikasi Batik Menggunakan K-NN,” JJEEE, vol. 3, no. 1, pp. 1–6, Jan. 2021, doi: 10.37905/jjeee.v3i1.7113.
Y. Adhitya, S. W. Prakosa, M. Köppen, and J.-S. Leu, “Feature Extraction for Cocoa Bean Digital Image Classification Prediction for Smart Farming Application,” Agronomy, vol. 10, no. 11, p. 1642, Oct. 2020, doi: 10.3390/agronomy10111642.
- Istiadi et al., “Classification of Tempeh Maturity Using Decision Tree and Three Texture Features,” JOIV : Int. J. Inform. Visualization, vol. 6, no. 4, p. 883, Dec. 2022, doi: 10.30630/joiv.6.4.983.
M. Kurniawan, G. E. Yuliastuti, A. Rachman, A. P. Budi, and H. N. Zaqiyah, “Implementing K-Nearest Neighbors (k-NN) Algorithm and Backward Elimination on Cardiotocography Datasets,” JOIV : Int. J. Inform. Visualization, vol. 8, no. 3, p. 1239, Sept. 2024, doi: 10.62527/joiv.8.3.1996.
A. Bode, Z. Y. Lamasigi, and I. C. R. Drajana, “The K-Nearest Neighbor Algorithm using Forward Selection and Backward Elimination in Predicting the Student’s Satisfaction Level of University Ichsan Gorontalo toward Online Lectures during the COVID-19 Pandemic,” Ilk. J. Ilm., vol. 15, no. 1, pp. 118–123, Apr. 2023, doi: 10.33096/ilkom.v15i1.1381.118-123.
S. Matarru, G. A. N. Pongdatu, and J. Rusman, “Klasifikasi Penyakit pada Tanaman Kopi Arabika Menggunakan Metode K-Nearest Neighbor (KNN) Berbasis Citra,” ijcs, vol. 12, no. 2, Apr. 2023, doi: 10.33022/ijcs.v12i2.3172.
Z. Y. Lamasigi, M. Hasan, and Y. Lasena, “Local Binary Pattern untuk Pengenalan Jenis Daun Tanaman Obat menggunakan K-Nearest Neighbor,” Ilk. J. Ilm., vol. 12, no. 3, pp. 208–218, Dec. 2020, doi: 10.33096/ilkom.v12i3.667.208-218.
A. E. Minarno, I. Soesanti, and H. A. Nugroho, “Batik Classification using Microstructure Co-occurrence Histogram,” JOIV : Int. J. Inform. Visualization, vol. 8, no. 1, p. 134, Mar. 2024, doi: 10.62527/joiv.8.1.2152.
J. Pardede and R. Dwianto, “The Effect of Feature Selection on Machine Learning Classification”.
T. O. Qadir, N. S. A. Taujuddin, and N. Fuad, “A New Feature Extraction Approach in Classification for Improving the Accuracy in Iris Recognition”.
Z. Y. Lamasigi and A. Bode, “Influence of gray level co-occurrence matrix for texture feature extraction on identification of batik motifs using k-nearest neighbor,” Ilk. J. Ilm., vol. 13, no. 3, pp. 322–333, Dec. 2021, doi: 10.33096/ilkom.v13i3.1025.322-333.
K. Meethongjan, V. T. Hoang, and T. Surinwarangkoon, “Data augmentation by combining feature selection and color features for image classification,” IJECE, vol. 12, no. 6, p. 6172, Dec. 2022, doi: 10.11591/ijece.v12i6.pp6172-6177.
D. P. Prabowo et al., “Adaptive Inertia Weight Particle Swarm Optimization for Augmentation Selection in Coral Reef Classification with Convolutional Neural Networks,” JOIV : Int. J. Inform. Visualization, vol. 9, no. 1, p. 216, Jan. 2025, doi: 10.62527/joiv.9.1.2726.
N. R. Romadhon, R. Sigit, and B. S. B. Dewantara, “Classification of Intraoral Images in Dental Diagnosis Based on GLCM Feature Extraction Using Support Vector Machine”.
B. Satria, N. Afrianto, L. Ningsih, P. Sakinah, A. Sidauruk, and L. Mayola, “Comparative Analysis of Weighted-KNN, Random Forest, and Support Vector Machine Models for Beef and Pork Image Classification Using Machine Learning”.
Y. Azhar and D. R. Akbi, “Performance Comparison of GLCM Features and Preprocessing Effect on Batik Image Retrieval,” JOIV : Int. J. Inform. Visualization, vol. 8, no. 3, p. 1339, Sept. 2024, doi: 10.62527/joiv.8.3.2179.
L. L. González, I. Arias-Serrano, F. Villalba-Meneses, P. Navas-Boada, and J. Cruz-Varela, “Deep learning neural network development for the classification of bacteriocin sequences produced by lactic acid bacteria,” F1000Res, vol. 13, p. 981, Aug. 2024, doi: 10.12688/f1000research.154432.1.
DOI: https://doi.org/10.37905/jjeee.v8i1.34661
Refbacks
- There are currently no refbacks.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Published by:
Electrical Engineering Department
Faculty of Engineering
State University of Gorontalo
Jalan B.J.Habibie Desa Moutong Kecamatan Tilongkabila Kabupaten Bone Bolango
Telp. 0435-821175; 081340032063
Email: [email protected]/[email protected]
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
















