Abstract:Abstract: In order to accurately detect whether the inside of wheat kernel was infected with rice weevil (Sitophilus oryzae), soft X-ray imaging detection technology was used to process the images of wheat grains infected with rice weevil at different growth stages. The different growth stages of rice weevil were determined by image, and the reliability of the results was evaluated by random repetition and discriminant analysis. Although some experimental research results show that the automatic recognition rate of pest infections detected by X-ray imaging could reach more than 90%, and even a high recognition rate of 100%, the actual operation shows that it is impossible to get a lower recognition rate by repeated detection. Due to the randomness of data collection, sampling, modeling, and other factors, these will bring uncertainty to the model prediction. For example, the initial value of the random number seed is not fixed, so the random division of the experimental data into a training dataset and a test dataset has absolute randomness, resulting in the prediction model will be different due to the change of the training dataset. Different prediction results are obtained on the same experimental data and the same algorithm. Therefore, it can be inferred that the evaluation parameters of the model should be within a certain range of values, rather than a single value. Because randomness is inherent, there is no way to avoid it. Random repeation and summary statistics of prediction performance measures are an excellent strategy.In this study, soft X-ray image technology was used to detect the hidden insect S. oryzae in wheat kernels. The different insect growth stages of S. oryzae were determined by taking pictures of S. oryzae in wheat kernels by soft X-ray. The gray histogram features of different infection days were extracted, it is found that the image gray level distribution of the image changed with the infection days, and the pixels in the gray area of the low gray area (gray value: 10-102) decreased with increase of the infection days, while the middle gray (gray value: 103-162) and high-gray areas (gray value: 163-232) increased with the increase of infection days. Based on 47 feature values, including 17 image grayscale histogram features and 30 texture features, a discriminant model was established by using Linear Discriminant Analysis (LDA) and Quadratic Discriminant Analysis (QDA), and the prediction effect of the model was evaluated by multiple random repeated sampling (1 000 times). The results showed that within the 95% confidence interval, the accuracy of LDA in the classification of infected and uninfected wheat was above 76%, and the accuracy of the growth stage except larvae was above 95%. However, the average accuracy of QDA was much lower, and the discrimination error of 1 000 random samples was relatively higher. Therefore, it is accurate and reliable to use multiple random sampling and LDA classification methods to distinguish whether wheat is infested by S. oryzae and to distinguish different insect states of S. oryzae.