Smart Agricultural Technology (Aug 2024)
Fusing spectral and spatial features of hyperspectral reflectance imagery for differentiating between normal and defective blueberries
Abstract
Effective defect detection of blueberries is important to ensuring supplies of high-quality products to the fresh market. In this study, hyperspectral reflectance imaging with machine learning was evaluated for discriminating between defective and normal blueberries. Fresh blueberries hand-harvested were scanned in the wavelength range of 400–1000 nm. An image analysis pipeline was developed to segment individual blueberries and extract mean spectra and spatial features. Defective blueberries were found to have lower near-infrared reflectance than sound samples, and spectral features produced a better separation between defective and sound samples than the spatial features in the scattering plots of their first two principal components. Nine types of machine learning models were built for classifying defective and sound samples using the spectral and spatial features separately as well as their concatenation. The regularized linear discriminant analysis (RLDA) model trained on the spectral features achieved the best overall accuracy of 95.7 %, as opposed to the best accuracy of 85.3 % based on spatial features, which was obtained by LDA. Simply concatenating spectral and spatial features did not improve over modeling using spectral or spatial features alone. A model ensemble strategy integrating the spectral features-based RLDA and the spatial features-based LDA resulted in a statistically significant improvement in the overall accuracy to 96.6 %. Model-level feature integration offers an effective means for improving the discrimination between defective and normal blueberries. Both the hyperspectral data11 https://doi.org/10.5281/zenodo.11200576. and the software programs22 https://github.com/vicdxxx/Blueberry-Defect-Detection-by-Hyperspectral-Imaging. of this study are made publicly available.