This study explores the feasibility of using portable near-infrared spectroscopy for the rapid and non-destructive detection of coffee adulteration. Spectral data from adulterated coffee samples in the 900–1700 nm range were collected and processed using five preprocessing methods. For qualitative detection, the Support Vector Machine (SVM) algorithm was applied. For quantitative detection, two optimization algorithms, Invasive Weed Optimization (IWO) and Binary Chimp Optimization Algorithm (BChOA), were used for the feature wavelength selection. The results showed that convolution smoothing combined with multiple scattering correction effectively improved the signal-to-noise ratio. SVM achieved 96.88% accuracy for qualitative detection. For the quantitative analysis, the IWO algorithm identified key wavelengths, reducing data dimensionality by 82.46% and improving accuracy by 10.96%, reaching 92.25% accuracy. In conclusion, portable near-infrared spectroscopy technology can be used for the rapid and non-destructive qualitative and quantitative detection of coffee adulteration and can serve as a foundation for the further development of rapid, non-destructive testing devices. At the same time, this method has broad application potential and can be extended to various food products such as dairy, juice, grains, and meat for quality control, traceability, and adulteration detection. Through the feature wavelength selection method, it can effectively identify and extract spectral features associated with these food components (such as fat, protein, or characteristic compounds), thereby improving the accuracy and efficiency of detection, further ensuring food safety and enhancing the level of food quality control.
Read full abstract