Non-Destructive Quality Grading of Apples and Oranges using Hyperspectral Imaging and Machine Learning
DOI:
https://doi.org/10.57041/jx5hhf82Keywords:
Artificial intelligence, classification, fruit quality, hyperspectral imaging, machine learningAbstract
Hyperspectral Imaging (HSI) offers a powerful non-destructive technique for fruit quality evaluation by simultaneously capturing both spatial and spectral information. In this research, apples and oranges were analyzed using a 224-band visible–near-infrared (400–1000 nm) imaging system with a controlled illumination setup and a standardized region-of-interest (ROI) extraction protocol. To enhance signature quality, preprocessing methods such as Savitzky–Golay smoothing and median filtering were applied, effectively reducing noise while retaining meaningful spectral characteristics. The dataset comprised 34,394 spectra (224 bands each), including 19,595 fresh and 14,799 spoiled samples. Class balance was preserved during training and testing to avoid bias. Several supervised learning algorithms—k-nearest neighbours (KNN), support vector machines (SVM), random forests (RF), decision trees (DT), linear discriminant analysis (LDA), and logistic regression (LR)—were employed to classify fruit freshness both within individual species and across a four-class scenario (apple-fresh, apple-spoiled, orange-fresh, orange-spoiled). Model performance was assessed using accuracy, precision, recall, and the F1-score. The top-performing classifiers achieved nearly 99% accuracy with balanced error rates across all categories. These findings demonstrate that the integration of HSI with supervised machine learning (ML) provides a reliable and automated solution for grading apples and oranges. The approach is highly applicable to real-time sorting lines, supporting improved quality assurance, food safety, and waste reduction. Furthermore, the methodology is adaptable to other agricultural commodities and can be optimized for industrial deployment through band selection and lightweight models that reduce computational requirements while maintaining classification accuracy.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 https://paas-pk.org/index.php/pjosr/cr

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
