Image Classification of Red Dragon Fruit Ripeness Levels Using HSV Color Moments and the K-NN Algorithm
DOI:
https://doi.org/10.30871/jaic.v9i4.10206Keywords:
Red dragon fruit, HSV, Color Moment, K-Nearest Neighbor, Digital image processingAbstract
Accurately determining the ripeness level of red dragon fruit (Hylocereus polyrhizus) is crucial for ensuring post-harvest quality and distribution efficiency. This study proposes a method for classifying red dragon fruit ripeness using color moment features in the HSV color space combined with the K-Nearest Neighbor (K-NN) algorithm. The dataset consists of 2,881 images of dragon fruit with a resolution of 800×800 pixels, categorized into three classes: ripe (886 images), unripe (1,241 images), and rotten (754 images). All images were captured under natural lighting conditions and underwent pre-processing to enhance color value consistency. Color features were extracted by calculating the mean, standard deviation, and skewness of the Hue, Saturation, and Value channels. The K-NN model was trained and tested on data randomly split in an 80:20 ratio. The testing results showed that the model achieved 100% accuracy in classifying the ripeness levels, demonstrating the effectiveness of this non-destructive method in distinguishing fruit ripeness. This approach holds strong potential to support efficient and consistent decision-making in the agricultural sector.
Downloads
References
[1] A. C. Silor, F. S. C. Silor, and M. B. Emfimo, “Exploring the Economic and Health Benefits of Dragon Fruit : Consumer Perceptions , Market Dynamics , and Strategic Development for Filipino Farmers,” vol. XI, no. 2321, pp. 420–432, 2024, doi: 10.51244/IJRSI.
[2] M. F. Barkah, “Klasifikasi Rasa Buah Jeruk Pontianak Berdasarkan Warna Kulit Buah Jeruk Menggunakan Metode K-Nearest Neighbor,” Coding J. Komput. dan Apl., vol. 8, no. 1, 2020, doi: 10.26418/coding.v8i1.39193.
[3] Syafa’ati, D. M. R. Budiastra, and I. Wayan, “Penentuan Tingkat Kekerasan dan Kemanisan Buah Naga Merah (Hylocereus polyrhizus) Secara Nondestruktif Menggunakan Near Infrared Spectroscopy (NIRS),” 2021.
[4] E. Hernando, A. C. Saputra, and J. Parhusip, “Klasifikasi Kematangan Buah Naga Berdasarkan Warna Kulit Menggunakan Algoritma K-Nearest Neighbor,” AnoaTIK, 2024.
[5] W. R. U. Fadilah, D. Agfiannisa, and Y. Azhar, “Analisis Prediksi Harga Saham PT. Telekomunikasi Indonesia Menggunakan Metode Support Vector Machine,” Fountain Informatics J., vol. 5, no. 2, p. 45, 2020, doi: 10.21111/fij.v5i2.4449.
[6] K. Martin, K. Shilton, and J. Smith, “Business and the ethical implications of technology: Introduction to the symposium,” Bus. Ethical Implic. Technol., pp. 1–11, 2022, doi: 10.1007/s10551-019-04213-9.
[7] J. A. Munandar, “Deteksi Kematangan Buah Naga Menggunakan Fitur Histogram Warna Berbasis Computer Vision,” 2022.
[8] N. Alkarim and R. A. Zuama, “Implementasi Algoritma Knn ( K-Nears Neighbor ) Pada Prediksi Harga Mobil Bekas,” J. IJCCS, vol. 3, no. 1, pp. 1–7, 2024.
[9] A. Khair, V. Rosalina, and S. S, “Rancang Bangun Sistem Informasi E-Commerce Dengan Penerapan Customer Relationship Management Berbasis Web,” PROSISKO J. Pengemb. Ris. dan Obs. Sist. Komput., vol. 8, no. 2, pp. 60–85, 2021, doi: 10.30656/prosisko.v8i2.3856.
[10] G. F. Grandis, Y. Arumsari, and Indriati, “Seleksi Fitur Gain Ratio pada Analisis Sentimen Kebijakan Pemerintah Mengenai Pembelajaran Jarak Jauh dengan K-Nearest Neighbor,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 5, no. 8, pp. 3507–3514, 2021.
[11] Z. Mahendra and A. Ridok, “Analisis Sentimen Opini Masyarakat Terhadap Fenomena TikTokShop di Indonesia Menggunakan Metode K-Nearest Neighbor berbasis N-gram dengan Seleksi Fitur Information Gain,” vol. 1, no. 1, pp. 1–10, 2017.
[12] A. Halim, Y. Yusra, M. Fikry, M. Irsyad, and E. Budianita, “Klasifikasi Sentimen Masyarakat Di Twitter Terhadap Prabowo Subianto Sebagai Bakal Calon Presiden 2024 Menggunakan M-KNN,” J. Inf. Syst. Res., vol. 5, no. 1, pp. 202–212, 2023, doi: 10.47065/josh.v5i1.4054.
[13] B. Maulana Alfaruq, D. Erwanto, and I. Yanuartanti, “Klasifikasi Kematangan Buah Tomat Dengan Metode Support Vector Machine,” Gener. J., vol. 7, no. 3, pp. 64–72, 2023, doi: 10.29407/gj.v7i3.21092.
[14] D. E. Kurniawan, N. R. Hartadi, and P. Prasetyawan, "Analisis Hasil Teknik Penyembunyian Hak Cipta Menggunakan Transformasi DCT dan RSPPMC pada Jejaring Sosial," Jurnal Teknologi Informasi dan Ilmu Komputer, vol. 5, no. 3, Art. no. 3, Aug. 2018, doi: 10.25126/jtiik.201853692.
[15] R. I. Borman, D. E. Kurniawan, Styawati, I. Ahmad, and D. Alita, “Classification of maturity levels of palm fresh fruit bunches using the linear discriminant analysis algorithm,” AIP Conf. Proc., vol. 2665, no. 1, pp. 30023.1–30023.8, 2023, doi: 10.1063/5.0126513.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Nadia Br Sembiring, M. Fakhriza

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License (Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) ) that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).








