| During storage and transportation of rice,mildew easily occurs in a suitable temperature and humidity environment,will cause a lot of food waste and huge economic losses,which in turn affects food security.To solve the cumbersome and time-consuming deficiencies in the traditional rice mildew detection process,this paper took the rice in the northeast cold area as the research object,proposed a method for detecting mildew degree of rice based on NIR spectral image features and developed an intelligent detection system for mildew rice based on Android on this basis.The method and system can provide theoretical basis and technical support for the occurrence of mildew in rice transportation and storage,and have certain value for early warning of rice mildew.The main research contents are as follows:(1)Through agricultural multi-spectral camera-Sequoia and fixed light sources and other equipment,this research has constructed a near-infrared image data acquisition platform for moldy rice.The imaging data of NIR spectra of the different mold states: healthy status,mild mold,and moderate mold of three varieties of Muxiang,Zaoxiang,and Caidao in Heilongjiang area were acquired.Then,taking data samples of rice with different degrees of mildew as the research object,for the 160×160 reflectance value valid area for the infrared spectrum image(NIR),applying digital image processing technology combined with spectral image analysis methods to study the various texture characteristics and spectral reflectance frequency characteristics of near infrared spectroscopy images,optimizing eight spectral characteristics of the mildew state of different rice varieties.The texture features include: mean,standard deviation,smoothness,third-order distance,consistency,information entropy,average gradient,fractal dimension of the near-infrared image are extracted,and six frequency domain features of the NIR spectrum in the 0.2~0.8 interval when the interval step is 0.1,based on a total of 14-dimensional spectral image characteristic index.Provide a reliable input source for the construction of rice mildew detection model.(2)Constructing the detection model of rice mildew degree.Based on the extracted 14 dimensional feature vector of NIR image,three detection models of rice mildew degree are constructed,including decision tree,RBF neural network and BP neural network.The decision tree structure is obtained by training and learning.The number of nodes is 5,the number depth is2,and the terminal node is 3.The accuracy in the simulation test is 67.2%.A nonlinear mapping model between the degree of mildew of rice and its near-infrared image features was established.The network structure of the model is 14-60-3,the correlation coefficient between the extracted rice NIR image features and the model output is 0.85.The accuracy of detecting the degree of mildew of different rice is 93.33%.The RBF neural network model is established.The network structure is 14-44-3.The square sum error calculated in the simulation test is 6.959 and the accuracy is 82.3%.By comprehensively comparing the three models,the detection model reaches the preset target accuracy of 0.06 when the number of learning times is 28445,and the prediction accuracy is high.Therefore,the BP neural network is selected as the optimal model.The establishment of the model can provide technical support for the automatic and rapid detection of mildew in the early stage of rice storage,and at the same time provide algorithm guarantee for the realization of the detection system.(3)The intelligent detection system of rice mildew degree based on Android is developed.Based on the optimal detection model,the transplantation of rice mildew detection model from computer to mobile phone is completed,pass-and-check,and the whole process contactless detection is realized.The front end of the system uses the Android Studio development environment,and the back end uses the Flask framework and intranet penetration technology to complete five functional modules: interactive interface,image cropping,image uploading,feature extraction and image detection.The image to be detected is manually cropped by the user and uploaded through the external network.After background calculation,the feature value will be displayed on the user’s mobile phone interface.Click to detection result,and the current health status of the rice will be fed back to the user through a pop-up window and some advice will be given.The App integrates the key parts of the acquisition of the effective area,the calculation of eigenvalues,and the detection of degree of mildew in this research.The App has strong expansibility,contributes to the further upgrading and promotion of technology. |