This study aims to automatically classify the quality of fresh and rotten Mandarin oranges using RGB and HSV color features with the K-Nearest Neighbor (KNN) algorithm. This study adopted a quantitative experimental approach. The dataset used consisted of 150 Mandarin orange images, 75 fresh and 75 rotten, with preprocessing stages consisting of image resizing to 512 × 512 pixels and feature extraction of the average RGB and HSV channel Values. Tests were conducted with varying K Values : 1, 3, 5, and 7. The results showed that the K-Nearest Neighbor method, which utilizes RGB and HSV color attributes, was able to classify the quality of Mandarin oranges effectively. The test results showed that changes in the K parameter affected the classification results, with K = 5 producing the highest accuracy of 94.74% (AP = 0.948). This indicates that the RGB and HSV color attributes with the KNN method are effective in determining the quality of Mandarin oranges. Penelitian ini bertujuan untuk mengklasifikasikan kualitas Jeruk Mandarin segar dan busuk secara otomatis menggunakan fitur warna RGB dan HSV dengan algoritma K-Nearest Neighbor (KNN). Studi ini mengadopsi metode kuantitatif dengan pendekatan eksperimen. Dataset yang digunakan terdiri dari 150 citra Jeruk Mandarin, masing-masing 75 citra Jeruk segar dan 75 citra Jeruk busuk, dengan tahap prapengolahan berupa resizing citra menjadi 512×512 piksel dan ekstraksi fitur nilai rata-rata kanal RGB dan HSV. Pengujian dilakukan dengan variasi nilai K = 1, 3, 5, dan 7. Hasil penelitian mendapatkan bahwa metode K-Nearest Neighbor yang memanfaatkan atribut warna RGB dan HSV mampu mengklasifikasikan dengan baik kualitas Jeruk Mandarin. Hasil pengujian menunjukkan bahwa perubahan nilai parameter K mempengaruhi hasil klasifikasi, di mana K = 5 menghasilkan akurasi tertinggi sebesar 94,74% dengan nilai average precision (AP) sebesar 0,948 dan memperoleh tingkat akurasi klasifikasi yang optimal. Ini menunjukkan bahwa atribut warna RGB dan HSV dengan metode KNN efektif dalam menentukan kualitas Jeruk Mandarin.
Copyrights © 2026