Implementation of Color Feature Extraction and KNN Algorithm for Oil Palm Fruit Ripeness Classification

Authors

  • Haidar Al-mutawalli Universitas Islam Negeri Sumatera Utara Author
  • M. Miko Sahputra Sembiring Universitas Islam Negeri Sumatera Utara Author
  • Khairul Arifin Universitas Islam Negeri Sumatera Utara Author
  • Fadila Rahma Sari Universitas Samudra Author

DOI:

https://doi.org/10.65230/jitcos.v2i1.117

Keywords:

Oil palm fruit, Ripeness classification, HSV color space, K-Nearest Neighbor, Color feature extraction

Abstract

Determining the ripeness level of oil palm fresh fruit bunches (FFB) is crucial for Crude Palm Oil (CPO) quality, but current manual inspection in the field remains highly subjective and inconsistent. This study aims to develop and evaluate an automatic classification system for oil palm fruit ripeness using global HSV color feature extraction and the K-Nearest Neighbor (K-NN) machine learning algorithm. The research utilized a comprehensive public dataset comprising 4,728 images categorized into five ordinal ripeness classes (unripe, underripe, ripe, overripe, and decayed). The dataset was split into 80% training and 20% testing data. Images were resized, and global average values of the Hue, Saturation, and Value channels were extracted without prior background segmentation. The classification was executed using the K-NN algorithm optimized with the Euclidean Distance metric. Experimental results demonstrated that the optimal model configuration was achieved at a neighbor value of k=7, yielding an overall accuracy of 54.86%. The system showed the highest reliability in identifying the ripe class with an F1-score of 64.66% due to its prominent red-orange characteristics. However, utilizing global color averages without image segmentation led to misclassifications, particularly in transition stages and due to background noise. Therefore, it is highly recommended for future implementations to apply automatic image segmentation techniques to eliminate background interference and to combine HSV features with texture descriptors like GLCM to significantly enhance classification accuracy.

References

Azmi, F., Khalil Gibran, M., & Saleh, A. (2025). Herbal Plant Image Retrieval Using HSV Color Histogram and Random Forest Algorithm. Journal of Computer Science, Information Technology and Telecommunication Engineering (JCoSITTE), 6(2), 1019–1027. https://doi.org/10.30596/jcositte.v6i2.26495

Davincylin, V. J. A., & Hermanto, D. (2025). Klasifikasi Tingkat Kematangan Buah Kelapa Sawit Menggunakan EfficientNet-B7. Jutisi : Jurnal Ilmiah Teknik Informatika Dan Sistem Informasi, 14(3), 2133. https://doi.org/10.35889/jutisi.v14i3.3399

Guslianto, S. I., & ‘Uyun, S. (2023). Klasifikasi Kematangan Buah Sawit Berdasarkan Fitur Warna, Bentuk dan Tekstur Menggunakan Algoritma K-NN. Jurnal Edukasi Dan Penelitian Informatika (JEPIN), 9(3), 407. https://doi.org/10.26418/jp.v9i3.64877

Hasanah, U., Rouza, E., Almaida, A., Nafisyah, H., Osama, S., Yuwansyah, M. A., … Fimawahib, L. (2025). Klasifikasi dan Identifikasi Buah Sawit dari Citra Visual dengan Deep Learning CNN. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(4), 5026–5033. https://doi.org/10.31004/riggs.v4i4.4271

Himmah, E. F., Widyaningsih, M., & Maysaroh, M. (2020). Identifikasi Kematangan Buah Kelapa Sawit Berdasarkan Warna RGB Dan HSV Menggunakan Metode K-Means Clustering. Jurnal Sains Dan Informatika, 6(2), 193–202. https://doi.org/10.34128/jsi.v6i2.242

Kamal, I. M., Mochammad, S., Nurahmi, L., Natawijaya, A., & Kalili, M. (2024). An ordinal dataset for ripeness level classification in oil palm fruit quality grading. Retrieved from https://data.mendeley.com/datasets/424y96m6sw/1

Kurniawan, R., & Nurahman, N. (2023). Klasifikasi Tingkat Kematangan Buah Sawit Berdasarkan Ekstraksi Fitur RGB dan GLCM Menggunakan Algoritma K-NN. Jurnal Ilmiah Komputasi, 22(4). https://doi.org/10.32409/jikstik.22.4.3402

Mansour, M. Y. M. A., D. Dambul, K., & Choo, K. Y. (2022). Object Detection Algorithms for Ripeness Classification of Oil Palm Fresh Fruit Bunch. International Journal of Technology, 13(6), 1326. https://doi.org/10.14716/ijtech.v13i6.5932

Nasution, E. A. A., & Nasution, Y. R. (2026). Klasifikasi Kematangan Buah Kelapa Sawit Berdasarkan Fitur Citra Warna Kulit Menggunakan Metode Transformasi Ruang Warna HSV dan K-Nearest Neighbor. Rekayasa, 19(1), 38–48. https://doi.org/10.21107/rekayasa.v19i1.33679

Omar, Z., P.P. Abdul Majeed, A., Rosbi, M., Ghazalli, S. A., & Selamat, H. (2024). Outdoor oil palm fruit ripeness dataset. Data in Brief, 55, 110667. https://doi.org/10.1016/j.dib.2024.110667

Prabowo, D. W., & Limet, O. B. (2025). Pemilihan Fitur Untuk Prediksi Kematangan Kelapa Sawit Menggunakan Explainable AI (XAI). Jurnal Riset Rekayasa Elektro, 7(2), 137–150. https://doi.org/10.30595/jrre.v7i2.27865

Putri, F. J., Nurjannah, S. L., Wati, D. F., Daulay, S. A., Sistamarien, I., Giri, E. P., & Mindara, G. P. (2026). PERBANDINGAN KINERJA ALGORITMA KNN DAN SVM DALAM KLASIFIKASI KEMATANGAN BUAH JERUK MEDAN BERDASARKAN CITRA DIGITAL. SKANIKA: Sistem Komputer Dan Teknik Informatika, 9(1), 159–170. https://doi.org/10.36080/skanika.v9i1.3661

Saputra, A. chandra, & Oktaviyani, E. D. (2023). RANCANG BANGUN SISTEM DETEKSI KEMATANGAN BUAH KELAPA SAWIT BERDASARKAN DETEKSI WARNA MENGGUNAKAN ALGORITMA K-NN. Jurnal Teknologi Informasi: Jurnal Keilmuan Dan Aplikasi Bidang Teknik Informatika, 7(2), 222–229. https://doi.org/10.47111/jti.v7i2.9232

Sitorus, D. A., & Aulia, R. (2025). Analisis Tingkat Kematangan Buah Jeruk Menggunakan Chain Code Dan KNN (K-Nearest Neighbors) Berbasis Website. Algoritma: Jurnal Ilmu Komputer Informatika, 9(1). https://doi.org/10.30829/algoritma.v9i2.258998

Tristanti, N., Romadloni, N. T., & Sya’bani, N. H. (2025). Klasifikasi Citra Buah Menggunakan Algoritma K-Nearest Neighbour (KNN) dan Metode Euclidean Distance. RIGGS: Journal of Artificial Intelligence and Digital Business, 4(3), 8306–8312. https://doi.org/10.31004/riggs.v4i3.3243

Wahabi Hasibuan, R., Taufik, I., AS, M., Iskandar Al Idrus, S., & Indra, Z. (2025). IMPLEMENTASI CONVOLUTIONAL NEURAL NETWORK DALAM MENDETEKSI TINGKAT KEMATANGAN BUAH KAKAO. JATI (Jurnal Mahasiswa Teknik Informatika), 9(4), 6479–6487. https://doi.org/10.36040/jati.v9i4.14116

Downloads

Published

30-06-2026

Issue

Section

Articles

How to Cite

Haidar Al-mutawalli, Sembiring, M. M. S. ., Khairul Arifin, & Fadila Rahma Sari. (2026). Implementation of Color Feature Extraction and KNN Algorithm for Oil Palm Fruit Ripeness Classification. Journal of Information Technology and Computer System, 2(1), 168-175. https://doi.org/10.65230/jitcos.v2i1.117

Similar Articles

1-10 of 13

You may also start an advanced similarity search for this article.