Rice is the main staple food for more than half of the world's population. Consumption of long-stored rice will have adverse effects on the human body. Here, we proposed the near-infrared (NIR) hyperspectral imaging (HSI) technique to distinguish rice from different storage years. Multiplicative Scatter Correction (MSC), Standard Normalize Variate (SNV) and 1st Derivative (1st) were used for the pretreatment of HSI data. In order to reduce dimensional spectral features, Principal Component Analysis (PCA) and t-distributed Stochastic Neighbor Embedding (tSNE) were used for data visualization. Besides, spectral characteristic wavelengths were extracted by competitive adaptive reweighted sampling (CARS) and least absolute shrinkage and selection operator (Lasso). Simultaneously, the textural features of rice were analyzed by Local Binary Pattern (LBP), Gray-Level Co-occurrence Matrix (GLCM) and Tamura algorithms. In order to realize feature fusion of spectra and texture, Support Vector Machine (SVM) model was optimized using the Whale optimization algorithm (WOA) and Extreme Gradient Boosting (XGBoost) model were established based on spectral features and textural features. Compared to other models, feature fusion model showed an excellent result with an accuracy of 98.89%. Experimental results suggested that HSI technology can be served as an effective method for rice detection.
Read full abstract