Analyzing KNN Performance in Apple Ripeness Classification with Haralick and GLCM

  • I Kadek Bagus Deva Diga Dana Putra Udayana University
  • I Ketut Gede Suhartana Udayana University
  • I Gede Arta Wibawa Udayana University
  • I Made Widiartha Udayana University

Abstract

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

Downloads

Download data is not yet available.
Published
2025-07-15
How to Cite
PUTRA, I Kadek Bagus Deva Diga Dana et al. Analyzing KNN Performance in Apple Ripeness Classification with Haralick and GLCM. JELIKU (Jurnal Elektronik Ilmu Komputer Udayana), [S.l.], v. 14, n. 1, july 2025. ISSN 2654-5101. Available at: <https://ojs.unud.ac.id/index.php/jlk/article/view/127815>. Date accessed: 13 aug. 2025.
Warning: array_merge(): Argument #2 is not an array in /var/www/ojs.unud.ac.id_backup/lib/pkp/classes/core/PKPApplication.inc.php on line 578 Warning: Invalid argument supplied for foreach() in /var/www/ojs.unud.ac.id_backup/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php on line 114

Most read articles by the same author(s)