Klasifikasi Tingkat Kematangan Tomat Menggunakan Algoritma Knn (K-Nearest Neighbor) Berbasis Citra Digital - Muhammad Suryanto Rustam; Marlina; Mughaffir Yunus; Andi Wafiah; Wahyu Artanugraha (Pusat Riset dan Inovasi Nasional, 2025)
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.