Abstract:In order to achieve fast and accurate detection of cucumber freshness by hyperspectral technology, taking the hardness and rate of water loss as the quality index, the hyperspectral imaging technology was used to test the cucumber with different storage dates in the same batch. Firstly, Savitzky-Golar method, multivariate scattering correction (MSC) and standard normal variable transformation (SNV) were used to preprocess the collected hyperspectral data of cucumber, and the pretreatment results were compared to determine that the Savitzky-Golar method was more effective. Then, competitive adaptive reweighted sampling (CARS), partial least squares (PLS) and successive projections algorithm (SPA) were used to select the hyperspectral characteristic wavelengths, and 25, 13 and 20 characteristic wavelengths were selected for the hardness index, respectively. 20, 16, and 20 characteristic wavelengths were selected for the index of water loss rate, respectively. Finally, the BP neural network was used to distinguish the cucumber hardness and water loss rate based of the characteristic wavelengths. The results showed that the BP neural network combined with SPA method had the best discrimination effects, and the accuracy of the training set and the test set for hardness discrimination were 95.24% and 91.67%, respectively. The accuracy of training set and test set for rate of water loss were 97.78% and 95.00%, respectively.