Classification of Broadleaf Weeds Using a Combination of K-Nearest Neighbor (KNN) and Principal Component Analysis (PCA)


  • Alfry Aristo Jansen Sinlae Universitas Katolik Widya Mandira
  • Dedy Alamsyah Universitas Muhammadiyah Tangerang
  • Lilik Suhery Sekolah Tinggi Teknologi Payakumbuh
  • Fryda Fatmayati Sekolah Tinggi Teknologi Kedirgantaraan




Broadleaf weed, Classification, Image processing, K-Nearest Neighbor, Principal Component Analysis


Palm oil is one of the leading commodities in Indonesia. Oil palm yields can be influenced by several factors, one of which is proper weed control. Uncontrolled weeds can damage oil palm plantations. To be able to manage and control weeds, especially large leaf weeds, it is necessary to know the types of weeds. However, not all farmers have knowledge about the types of weeds. For that we need a system that can help identify broadleaf weeds based on leaf images using image processing. So this study aims to build a large leaf weed classification system using a combination of the K-Nearest Neighbor (KNN) and Principal Component Analysis (PCA) algorithms. PCA is used as feature extraction based on the characteristics formed from each spatial property. PCA can be used to reduce and retain most of the relevant information from the original features according to the optimal criteria. The results of the information will then be used by KNN for learning by paying attention to the closest distance from the object. Based on the test results, the developed model is able to produce an accuracy of 90%. Principal Component Analysis (PCA) and K-Nearest Neighbor (KNN) algorithms can be used in the classification process properly. Accuracy results are strongly influenced by the amount of training data and test data as well as the quality of the image used.

GS Cited Analysis


Download data is not yet available.


Agustin, S., & Dijaya, R. (2019). Beef Image Classification using K-Nearest Neighbor Algorithm for Identification Quality and Freshness. ICCOMSET 2018.

Alkababji, A. M., & Jbaar, M. A. Al. (2021). Iris Re-Identification Using Stationary Wavelet Transform (SWT), Principal Component Analysis and KNN Classifier. Turkish Journal of Physiotherapy and Rehabilitation, 32(3), 8224–8230.

Andrian, R., Maharani, D., Muhammad, M. A., & Junaidi, A. (2020). Butterfly Identification Using Gray Level Co-Occurrence Matrix (GLCM) Extraction Feature and K-Nearest Neighbor (KNN) Classification. Register: Jurnal Ilmiah Teknologi Sistem Informasi, 6(1), 11–21.

Borman, R. I., Napianto, R., Nugroho, N., Pasha, D., Rahmanto, Y., & Yudoutomo, Y. E. P. (2021). Implementation of PCA and KNN Algorithms in the Classification of Indonesian Medicinal Plants. ICOMITEE 2021, 46–50. IEEE.

Borman, R. I., Priopradono, B., & Syah, A. R. (2017). Klasifikasi Objek Kode Tangan pada Pengenalan Isyarat Alphabet Bahasa Isyarat Indonesia (Bisindo). Seminar Nasional Informatika Dan Aplikasinya (SNIA), (September), 1–4.

Borman, R. I., & Priyopradono, B. (2018). Implementasi Penerjemah Bahasa Isyarat Pada Bahasa Isyarat Indonesia (BISINDO) Dengan Metode Principal Component Analysis (PCA). Jurnal Informatika: Jurnal Pengembangan IT (JPIT), 03(1), 103–108.

Borman, R. I., & Purwanto, Y. (2019). Impelementasi Multimedia Development Life Cycle pada Pengembangan Game Edukasi Pengenalan Bahaya Sampah pada Anak. Jurnal Edukasi Dan Penelitian Informatika (JEPIN), 5(2), 119.

Borman, R. I., Putra, Y. P., Fernando, Y., Kurniawan, D. E., Prasetyawan, P., & Ahmad, I. (2018). Designing an Android-based Space Travel Application Trough Virtual Reality for Teaching Media. Proceedings of the 2018 International Conference on Applied Engineering, ICAE.

Borman, R. I., Rossi, F., Jusman, Y., Rahni, A. A. A., Putra, S. D., & Herdiansah, A. (2021). Identification of Herbal Leaf Types Based on Their Image Using First Order Feature Extraction and Multiclass SVM Algorithm. 1st International Conference on Electronic and Electrical Engineering and Intelligent System (ICE3IS) Identification, 12–17. IEEE.

Borman, R. I., & Wati, M. (2020). Penerapan Data Maining Dalam Klasifikasi Data Anggota Kopdit Sejahtera Bandarlampung Dengan Algoritma Naïve Bayes. Jurnal Ilmiah Fakultas Ilmu Komputer, 9(1), 25–34.

Chen, Y., Song, L., Liu, Y., Yang, L., & Li, D. (2020). A Review of the Artificial Neural Network Models for Water Quality Prediction. Applied Sciences, 10(5776), 1–49.

Dahlianah, I. (2019). Keanekaragaman Jenis Gulma Di Perkebunan Kelapa Sawit Desa Manggaraya Kecamatan Tanjung Lago Kabupaten Banyuasin. Indobiosains, 1(1), 30–37.

Dix, S., & Müller, P. (2021). Digital Image Processing Methods for The Evaluation of Optical Anisotropy Effects in Tempered Architectural Glass Using Photoelastic Measurements. Glass Structures & Engineering, 6(1), 3–19.

Imaniasita, V., Liana, T., & Pamungkas, D. S. (2020). Identifikasi Keragaman dan Dominansi Gulma pada Lahan Pertanaman Kedelai. Agrotechnology Research Journal, 4(1), 11–16.

Ionel-bujorel, P., Ancuceanu, R., Enache, C., & Vasilăţeanu, A. (2017). Important Shape Features for Romanian Medicinal Herb Identification Based on Leaf Image. The 6th IEEE International Conference on E-Health and Bioengineering - EHB, 599–602. IEEE.

Justiawan, J., Sigit, R., & Arief, Z. (2017). Tooth Color Detection Using PCA and KNN Classifier Algorithm Based on Color Moment. EMITTER International Journal of Engineering Technology, 5(1), 139–153.

Lee, S. L., & Tseng, C. C. (2018). Digital Image Sharpening Using Integral Image Representation and Laplacian Operator. 2018 IEEE International Conference on Consumer Electronics-Taiwan, ICCE-TW 2018, 31–32.

Li, R., Ji, S., Shen, S., Li, P., Wang, X., Xie, T., … Wang, Z. (2019). Arrhythmia Multiple Categories Recognition based on PCA-KNN Clustering Model. The 8th IEEE International Symposium on Next-Generation Electronics. IEEE.

Lubis, Z., Sihombing, P., & Mawengkang, H. (2020). Optimization of K Value at the K-NN algorithm in clustering using the expectation maximization algorithm. IOP Conf. Series: Materials Science and Engineering, 725.

Mulyanto, A., Borman, R. I., Prasetyawan, P., Jatmiko, W., Mursanto, P., & Sinaga, A. (2020). Indonesian Traffic Sign Recognition For Advanced Driver Assistent (ADAS) Using YOLOv4. 2020 3rd International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), 520–524. Retrieved from file:///C:/Users/CPU/AppData/Local/Mendeley Ltd./Mendeley Desktop/Downloaded/Mulyanto et al. - 2020 - Indonesian Traffic Sign Recognition For Advanced Driver Assistent (ADAS) Using YOLOv4.pdf

Nikita, N., Sadawarti, H., & Kaur, B. (2020). Classification of Renal Cancer using Principal Component Analysis (PCA) and K-Nearest Neighbour (KNN). International Journal of Engineering Research & Technology (IJERT), 8(16), 156–159.

Pradhana, M. A. (2020). Analisis Perubahan Sikap Uni Eropa Terhadap Impor Minyak Kelapa Sawit Indonesia. Journal of International Relations, 6(4), 525–534.

Prasetyawan, P., Ahmad, I., Borman, R. I., Ardiansyah, A., Pahlevi, Y. A., & Kurniawan, D. E. (2018). Classification of the Period Undergraduate Study Using Back-propagation Neural Network. Proceedings of the 2018 International Conference on Applied Engineering, ICAE 2018.

Saleh, A., Dibisono, M. Y., & Gea, S. U. (2020). Keragaman Gulma Pada Tanaman Kelapa Sawit (Elaies guineensis Jacq.) Belum Menhasilkan dan Sudah Menghasilkan di Kebun Rambutan PT. Perkebunan Nusantara III. Agro Estate, 4(1), 1–10.

Sanjaya, S., Pura, M. L., Gusti, S. K., Yanto, F., & Syafria, F. (2019). K-Nearest Neighbor for Classification of Tomato Maturity Level Based on Hue, Saturation, and Value Colors. Indonesian Journal of Artificial Intelligence and Data Mining, 2(2), 101.

Tanjung, J. P., & Wijaya, B. A. (2020). Facial Recognition Implementation using K-NN and PCA Feature Extraction in Attendance System. SinkrOn : Jurnal Dan Penelitian Teknik Informatika, 5(1), 43–50.

Vaishnnave, M. P., Devi, K. S., Srinivasan, P., & Jothi, G. A. P. (2019). Detection and Classification of Groundnut Leaf Diseases Diseases Using KNN Classifier. Proceeding of International Conference on Systems Computation Aatomation and Networking.

Wirdiani, N. K. A., Hridayami, P., Widiari, N. P. A., Rismawan, K. D., Candradinata, P. B., & Jayantha, I. P. D. (2019). Face Identification Based on K-Nearest Neighbor. Scientific Journal of Informatics, 6(2), 150–159.


Crossmark Updates

How to Cite

Aristo Jansen Sinlae, A., Alamsyah, D., Suhery, L., & Fatmayati, F. (2022). Classification of Broadleaf Weeds Using a Combination of K-Nearest Neighbor (KNN) and Principal Component Analysis (PCA). Sinkron : Jurnal Dan Penelitian Teknik Informatika, 7(1), 93-100.