Manual determination of betel nut ripeness often takes a long time and depends on the subjectivity of the observer, so the results are inconsistent. This study aims to improve the accuracy of betel nut ripeness classification by optimizing the K parameter in the K-Nearest Neighbor (KNN) algorithm. The research process begins with the collection of 200 betel nut images that go through a preprocessing stage in the form of resizing, segmentation, and normalization. Furthermore, color feature extraction is carried out from the RGB and HSV models and texture features using the Gray-Level Co-occurrence Matrix (GLCM) method. The dataset is divided into training data and test data, then the K value is tested between 1 and 20 using the cross-validation technique. The test results show that the K value = 3 provides the highest accuracy of 85% with fairly balanced predictions in the raw, ripe, and old categories. These findings prove that selecting the appropriate K value can improve classification performance, while opening up opportunities for the application of an automated system to help farmers and industry players in determining the ripeness of betel nuts more quickly, accurately, and consistently.
Copyrights © 2025