Analyzing KNN Performance in Apple Ripeness Classification with Haralick and GLCM - Putra, I Kadek Bagus Deva Diga Dana; Suhartana, I Ketut Gede; Wibawa, I Gede Arta; Widiartha, I Made (JELIKU (Jurnal Elektronik Ilmu Komputer Udayana), 2025)
This research develops a KNN-based apple ripeness classification system using image texture features. Accurate ripeness classification is crucial for post-harvest quality and shelf life. The proposed method employs Haralick feature extraction via GLCM to analyze apple surface texture at five ripeness levels (20%-100%). A dataset of 500 apple images underwent preprocessing, feature extraction with varying spatial distance (d) and angle (?), normalization, and selection. Experiments varying d, ?, and KNN's k revealed that d=1, ?=45°, and k=3 achieved the highest accuracy (96%). Five-fold cross-validation confirmed model stability with a 96.0% average accuracy and low standard deviation (0.0346). An interactive Streamlit dashboard aids result analysis. This system offers an effective, accurate, and simple solution for automated apple ripeness determination, with potential in automated sorting and post-harvest quality assessment.   Keywords : Apple ripeness classification, Haralick texture features, GLCM, K-Nearest Neighbors, image processing