Hyperspectral imaging technology at 416–1000 nm was investigated to detect moisture content in peanut kernels. Four varieties of peanuts were scanned using a “push‐broom” system to acquire hyperspectral images. In this study, three models including partial least squares regression (PLSR), principal component regression (PCR), and support vector machine regression (SVR) were established to detect moisture content in peanut kernels based on full wavelengths. The performance of SVR was the best with determination coefficient (R2) of .9432, root mean square errors (RMSE) of 0.7054%, and residual prediction deviation (RPD) of 3.9694 for prediction set. In order to simplify modeling process and improve calculation speed of the models, successive projections algorithm (SPA) and regression coefficient were applied for optimal wavelengths selection. Then, PCR, PLSR, and SVR models were established based on these selected wavelengths, respectively. As a result, SPA–SVR generated a satisfied effect with R2 of .9363, RMSE of 0.7021%, and RPD of 3.988 for prediction set. All results in this study indicated that the combination of chemometrics and hyperspectral imaging technology could achieve rapid and nondestructive detection of moisture content in peanut kernels.
Practical applications
The quality of peanut has a direct relationship with the moisture content in peanut. If moisture content in peanut is over standard, the peanut storage time will be shorter and also easy to be bad. It is harmful to eat this kind of peanut. Traditional methods for detection of peanut moisture content are tedious, time‐consuming, and even greatly influenced by subjective factors. As an emerging technique, hyperspectral imaging technology can detect moisture content in peanut kernels rapidly, accurately, and nondestructive. In this study, we generated a best prediction model, successive projections algorithm–support vector machine regression, which was established based on several characteristic wavelengths. All these results provided a theoretical basis for the detection of portable moisture content in peanut kernels.