Klasifikasi Tingkat Kematangan Tomat Menggunakan Algoritma Knn (K-Nearest Neighbor) Berbasis Citra Digital

Authors

  • Muhammad Suryanto Rustam Universitas Muhammadiyah Parepare
  • Marlina Universitas Muhammadiyah Parepare
  • Mughaffir Yunus Universitas Muhammadiyah Parepare
  • Andi Wafiah Universitas Muhammadiyah Parepare
  • Wahyu Artanugraha Universitas Muhammadiyah Parepare

Keywords:

Klasifikasi, Tomat, K-Nearest Neighbor (KNN), Pengolahan Citra Digital, HSV

Abstract

The problem raised in this study is the difficulty of accurately classifying tomato ripeness levels if only relying on visual observation, so a more objective computational method is needed. This study aims to design and implement a tomato ripeness classification system using the K-Nearest Neighbor (KNN) method based on digital image processing. The dataset used consists of 300 tomato images taken from agricultural land in Enrekang Regency, South Sulawesi, with an even distribution in each ripeness category. The method used includes taking tomato images, resizing the images to 200×200 pixels, extracting RGB and HSV color features, and normalizing pixel values. The features used in the classification are the average values ​​of Hue, Saturation, and Value of each image. The KNN algorithm with parameter K = 3 is applied to compare the Euclidean distance between the test data and the training data. The test results show that the accuracy per category reaches 100%, and the overall accuracy is 90%. These findings prove that the combination of HSV and KNN color models is effective in distinguishing tomato ripeness levels, and has the potential to be implemented in automated sorting systems to improve post-harvest efficiency in the agricultural sector.

References

[1] O. Lastiur Sianipar, A. H. Damanik, S. T. Akuntansi, M. Indonesia, and S. T. Akuntansi, “Peranan Teknologi Informasi Dalam Meningkatkan Pemasaran Hasil Pertanian Di Kecamatan Ajibata Kabupaten Toba Samosir,” Jurnal EK&BI, vol. 4, no. 2, pp. 2620–7443, 2021, doi: 10.37600/ekbi.v4i2.371.

[2] I. R. M. Fatah, A. H. Ginting, and W. T. Ina, “Klasifikasi Tingkat Kematangan Buah Tomat Berdasarkan Warna,” Jurnal Teknik Elektro, vol. 1, no. 1, 2024, Accessed: Aug. 21, 2025. [Online]. Available: https://elektro.ejournal.web.id/index.php/elektro/article/view/112/44

[3] L. L. Karliman and E. Sarvia, “Perancangan Alat Material Handling untuk Mereduksi Tingkat Risiko Cedera Tulang Belakang Operator pada Aktivitas Pemindahan Semen di Toko Bangunan,” Journal of Integrated System, vol. 2, no. 2, 2019, Accessed: Aug. 21, 2025. [Online]. Available: https://journal.maranatha.edu/index.php/jis/article/view/1609

[4] S. Margaretta, I. Arwani, and D. E. Ratnawati, “Implementasi Algoritma K-Nearest Neighbor Pada Database Menggunakan Bahasa SQL,” Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 4, no. 7, pp. 2043–2052, 2020, Accessed: Aug. 21, 2025. [Online]. Available: https://j-ptiik.ub.ac.id/index.php/j-ptiik/article/view/7535

[5] N. Safitri, D. Kusnandar, and S. Martha, “Implementasi Algoritma K-Nearest Neighbor Dengan Normalisasi Z-Score Dalam Klasifikasi Penerima Bantuan Sosial Desa Serunai,” Buletin Ilmiah Math. Stat. dan Terapannya (Bimaster), vol. 13, no. 1, pp. 99–106, 2024, Accessed: Aug. 21, 2025. [Online]. Available: https://jurnal.untan.ac.id/index.php/jbmstr/article/view/74063

[6] Sesilia Barek Tukan, Alfian Nara Weking, and Dominikus Boli Watomakin, “Optimalisasi Parameter K Dalam Algoritma K-Nearest Neighbor Untuk Klasifikasi Kematangan Buah Pinang Berdasarkan Fitur Tekstur Dan Warna,” Jurnal Teknik Mesin, Elektro dan Ilmu Komputer, vol. 5, no. 2, pp. 72–83, Jul. 2025, doi: 10.55606/teknik.v5i2.7405.

[7] Relin Pramudiya, Cerwyn Asyraq, Aldo Kadafi, and Ricky Putra Sardika, “Analisis Gambar Menggunakan Metode Grayscale Dan Hsv (Hue, Saturation, Value),” Just IT : Jurnal Sistem Informasi, Teknologi Informasi dan Komputer, vol. 14, no. 3, 2024, Accessed: Aug. 21, 2025. [Online]. Available: https://jurnal.umj.ac.id/index.php/just-it/article/view/22099/10373

[8] H. Mubarok, S. Murni, and M. M. Santoni, “Penerapan Algoritma K-Nearest Neighbor untuk Klasifikasi Tingkat Kematangan Buah Tomat Berdasarkan Fitur Warna,” Seminar Nasional Mahasiswa Ilmu Komputer dan Aplikasinya (SENAMIKA) Jakarta-Indonesia, vol. 2, no. 1, 2021, Accessed: Aug. 21, 2025. [Online]. Available: https://conference.upnvj.ac.id/index.php/senamika/article/view/1438

[9] N. Istiana and A. Mustafiril, “Perbandingan Metode Klasifikasi pada Data dengan Imbalance Class dan Missing Value,” Jurnal Informatika, vol. 10, no. 2, pp. 101–108, Oct. 2023, doi: 10.31294/inf.v10i2.15540.

[10] Petrus Oktavianus Nurak and Yoseph Yakop Da Rato, “Prospek Pengembangan Usahatani Tomat (Solanum Lycopersicum L.) di Kebun Fakultas Pertanian Universitas Nusa Nipa Maumere,” Jurnal Ilmiah Wahana Pendidikan, vol. 8, no. 1, 2022, Accessed: Aug. 21, 2025. [Online]. Available: https://jurnal.peneliti.net/index.php/JIWP/article/view/1318

[11] J. Homepage, S. R. Cholil, T. Handayani, R. Prathivi, and T. Ardianita, “Implementasi Algoritma Klasifikasi K-Nearest Neighbor (KNN) Untuk Klasifikasi Seleksi Penerima Beasiswa,” IJCIT (Indonesian Journal on Computer and Information Technology), vol. 6, no. 2, pp. 118–127, 2021.

[12] Supiyandi Supiyandi, Muhammad Abdul Mujib, Khairul Azis, Rahmat Abdillah, and Salsa Nabila Iskandar, “Penerapan Teknologi Pengolahan Citra dalam Analisis Data Visual pada Tinjauan Komprehensif,” Jurnal Kendali Teknik dan Sains, vol. 2, no. 3, pp. 179–187, Jul. 2024, doi: 10.59581/jkts-widyakarya.v2i3.3796.

Downloads

Published

2025-09-04

How to Cite

Muhammad Suryanto Rustam, Marlina, Mughaffir Yunus, Andi Wafiah, & Wahyu Artanugraha. (2025). Klasifikasi Tingkat Kematangan Tomat Menggunakan Algoritma Knn (K-Nearest Neighbor) Berbasis Citra Digital . Jurnal Publikasi Ilmu Komputer Dan Multimedia, 4(3), 121–129. Retrieved from https://journalcenter.org/index.php/jupikom/article/view/5275