CN112507851A - Rice mildew degree detection method adopting near infrared spectrum image features - Google Patents

Rice mildew degree detection method adopting near infrared spectrum image features Download PDF

Info

Publication number
CN112507851A
CN112507851A CN202011399095.0A CN202011399095A CN112507851A CN 112507851 A CN112507851 A CN 112507851A CN 202011399095 A CN202011399095 A CN 202011399095A CN 112507851 A CN112507851 A CN 112507851A
Authority
CN
China
Prior art keywords
rice
near infrared
mildew
image
infrared spectrum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011399095.0A
Other languages
Chinese (zh)
Inventor
关海鸥
马晓丹
钱丽丽
左锋
温冯睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Heilongjiang Bayi Agricultural University
Original Assignee
Heilongjiang Bayi Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Heilongjiang Bayi Agricultural University filed Critical Heilongjiang Bayi Agricultural University
Priority to CN202011399095.0A priority Critical patent/CN112507851A/en
Publication of CN112507851A publication Critical patent/CN112507851A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/188Vegetation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features

Abstract

The invention provides a rice mildew degree detection method adopting near infrared spectrum image characteristics, which comprises the following steps: acquiring near infrared spectrum image data of rice in different known mildew states; acquiring image characteristics of the near infrared spectrum image by taking the near infrared spectrum image data as a research object; establishing a mapping model between the rice mildew degree and the image characteristics of the near-infrared image thereof by utilizing a feedforward neural network (BP) self-adaptive reasoning mechanism; acquiring near infrared spectrum image data of the paddy to be detected; obtaining the image characteristics of the near infrared spectrum image of the paddy to be detected; and obtaining the mildew state of the paddy to be detected by using the mapping model. The method can realize the nondestructive detection of the rice mildew degree.

Description

Rice mildew degree detection method adopting near infrared spectrum image features
Technical Field
The invention relates to a rice mildew degree detection method adopting near infrared spectrum image characteristics.
Background
The paddy is easy to mildew in a proper temperature and humidity environment during storage and transportation, so that various fungicins harmful to human bodies and livestock are generated. According to the traditional rice mildew research, the mildew condition of rice is detected by observing fungal spores in the rice through instruments such as an electron microscope and the like after chemical treatment. The methods have the defects of long time consumption and complicated detection process. There is a need to establish a new method for nondestructive testing of rice mildew degree.
Disclosure of Invention
The invention provides a rice mildew degree detection method adopting near infrared spectrum image characteristics, which can realize nondestructive detection of rice mildew degree.
A rice mildew degree detection method adopting near infrared spectrum image features comprises the following steps:
acquiring near infrared spectrum image data of rice in different known mildew states;
acquiring image characteristics of the near infrared spectrum image by taking the near infrared spectrum image data as a research object;
establishing a mapping model between the rice mildew degree and the image characteristics of the near-infrared image thereof by utilizing a feedforward neural network (BP) self-adaptive reasoning mechanism;
acquiring near infrared spectrum image data of the paddy to be detected; obtaining the image characteristics of the near infrared spectrum image of the paddy to be detected; and obtaining the mildew state of the paddy to be detected by using the mapping model.
According to the embodiment of the invention, the rice variety is selected from three varieties of Muscovitum, early fragrant rice and colored rice, and is planted in Heilongjiang.
According to an embodiment of the present invention, the rice mildew state includes: healthy rice, mild and moderate mildew.
According to the embodiment of the invention, the near infrared spectrum image data is acquired at the near infrared wavelength of 700-900nm and the bandwidth of 30-50 nm.
According to an embodiment of the present invention, the near infrared spectral image data is collected at a near infrared wavelength of 790nm and a bandwidth of 40 nm. For example, a 4-channel multispectral camera (Sequoia) may be employed. In some embodiments, the data acquisition interval is 12-36 hours, such as 24 hours, and a fixed multispectral camera is taken at a distance (e.g., 30-60cm, specifically, such as 40 cm) above the sample. In some embodiments, the camera lens is taken as perpendicular as possible to the rice surface.
According to the embodiment of the invention, a natural light source or an artificial light source can be adopted during shooting. When the artificial light source is adopted, the effect of sunlight can be generated by containing the full wave band. In some embodiments, a 100W single ended tungsten halogen lamp is used as the light source.
According to the embodiment of the invention, the near infrared spectrum image data is researched by combining a digital image processing technology with a spectral image analysis method, so that the image characteristics of the near infrared spectrum image are obtained.
According to the embodiment of the invention, the image characteristics of the near infrared spectrum image comprise texture characteristics and reflection value distribution frequency of the near infrared spectrum image.
According to an embodiment of the present invention, the texture features include a mean, a standard deviation, a smoothness, a third-order distance, a consistency, an information entropy, a mean gradient, and a fractal dimension of the near infrared spectrum image.
According to the embodiment of the invention, the interval of the distribution frequency of the reflection values of the selected near infrared spectrum image is as follows: 0.2 to 0.3, 0.3 to 0.4, 0.4 to 0.5, 0.5 to 0.6, 0.6 to 0.7, 0.7 to 0.8.
According to the embodiment of the invention, the three-layer structure of the constructed BP neural network is 14-60-3 type. The 3 layers of nodes of the neural network structure are respectively as follows: the device comprises an input layer, a hidden layer and an output layer, wherein all the layers are in a full interconnection mode, and the same layers are not connected with one another.
According to the embodiment of the invention, the method further comprises the step of training the mapping model.
The method takes paddy rice in the northeast cold region as a research object, obtains the imaging data of the near infrared spectrum of three varieties of Muscong, early fragrant and color rice in different mildew states, analyzes various textures and frequency domain characteristics of NIR (near infrared spectrum) images, preferably selects the spectral characteristics of the mildew states of different varieties of paddy rice, establishes a mapping model between the paddy rice mildew degree and the near infrared image characteristics by utilizing a feedforward neural network (BP) self-adaptive reasoning mechanism, realizes a novel method for nondestructive detection of the paddy rice mildew degree, and can automatically and quickly provide technical support for the early mildew of paddy rice storage.
Drawings
Fig. 1 is a schematic structural diagram of a device for acquiring near-infrared image data according to an embodiment of the present invention.
FIG. 2 shows near infrared images of rice according to various degrees of mildew in the examples of the present invention.
FIG. 3 is a histogram showing the distribution frequency of the reflection values of near infrared spectrum images of rice with different degrees of mildew according to an embodiment of the present invention.
FIG. 4 shows a neural network architecture according to an embodiment of the present invention.
FIG. 5 is a schematic view showing a nondestructive testing process of the degree of rice mildew in the embodiment of the present invention.
Detailed Description
The invention is further illustrated by the following examples.
Example 1
In the process of storing and transporting rice, the rice is easy to mildew under a proper temperature and humidity environment, so that a large amount of grain is wasted and economic loss is caused, and in order to avoid the defects that the traditional rice mildew detection process is complicated and consumes long time, the rice mildew degree detection method based on the near infrared spectrum image processing technology and the neural network is provided. Firstly, an agricultural multispectral camera (Sequoia) and a fixed light source are used for constructing a mildew rice near-infrared image data acquisition platform, and imaging data of near-infrared spectrums of different mildew states of Muscong, early fragrant rice and colored rice in Heilongjiang are dynamically acquired. Secondly, taking data samples of rice with different mildew degrees as research objects, and applying a digital image processing technology in combination with a spectral image analysis method to research various textures and frequency domain characteristics of an NIR (near infrared spectrum) image, preferably spectral characteristics of different rice varieties in mildew states. And finally, establishing a mapping model between the rice mildew degree and the near infrared image characteristics by utilizing a feed-forward neural network (BP) self-adaptive reasoning mechanism based on 14-dimensional characteristic vectors such as the mean value, standard deviation, smoothness, three-step distance, consistency, information entropy, average gradient, fractal dimension, and NIR spectrum reflection value frequency in 0.2-0.8 interval when the interval step length is 0.1. The model neural network structure is 14-60-3 type, the target precision is achieved when the learning times are 28455 times, the correlation coefficient R of the extracted spectral image features and the model output is 0.85, and the accuracy rate of the simulation experiment on the detection of the mildew degree of different paddy rice is 93.33%. The research result is a novel method for realizing nondestructive detection of the mildew degree of the rice, and can automatically and quickly provide technical support for early mildew during rice storage.
1 collecting mildew paddy near-infrared image
Taking paddy in the northeast cold region as a research object, selecting paddy varieties in different years as follows: black rice, early fragrant rice and color rice. Putting the three kinds of healthy paddy into a culture dish, pouring sterile water, uniformly stirring, laminating, putting into a climatic chamber with the temperature of 35-40 ℃, and simulating the paddy mildew process. Near-infrared image data of the whole rice mildew process are shot and collected through a 4-channel multispectral camera (Sequoia) at the near-infrared wavelength of 790nm and the bandwidth of 40 nm. In order to reduce the interference of the external environment on the acquisition of the near-infrared image, the experimental process is carried out in a standard shooting box and is provided with 2 standard light sources, the data acquisition interval is 24 hours, a multispectral camera is fixed to vertically shoot at a position 40cm above a sample, and the structure of the device for acquiring the near-infrared image data is shown in figure 1. In the experiment, a 100W single-end halogen tungsten lamp is used as a light source.
After the paddy rice is infected by fungi and mildewed, the surface of the paddy rice has mildew, and the color of the surface of the paddy rice gradually becomes dark and even appears black. The mold content of the common rice is 104CFU/g below (i.e. the amount of mould is less than or equal to 10)4CFU/g), which is a relatively good storage condition, also becomes healthy rice (sometimes referred to herein as dry rice); if the amount of mold in the rice exceeds 105At CFU/g, the rice began to mildew. In this text, the number "10" in rice5The amount of the fungus is less than or equal to 10 when the ratio of CFU to g is less than or equal to6CFU/g' is defined asRice in the early stage of mildew (sometimes referred to herein as lightly mildewed rice); when the amount of the Pythium oryzae exceeds 106CFU/g (i.e. the mould amount is more than or equal to 10)6CFU/g), the rice mildew was very severe, defined as moderate mildew rice. In some cases, when 10 in rice4CFU/g < mildew amount < 105CFU/g is also defined as rice in the early stage of mildew (i.e., slightly mildewed rice). See in particular the literature: study on rice mold series succession under different storage conditions of Zhoujianxin, Ju Xin Rong, Sun Zhongdong, Jinhao, Yao Ming lan, Shenhai Xian (J)]The journal of China's food and oil, 2008(05): 133-.
Near infrared spectral images of healthy, early-stage and moderately mildly mildewed rice were collected in this study. Selecting and collecting an effective area of 160 multiplied by 160 pixels in 600 frames, and analyzing the near infrared spectrum image characteristics of the mildewed paddy at the wavelength of 790 nm. Specifically, near-infrared images of rice with different degrees of mildew are shown in fig. 2. In FIG. 2, (a) healthy rice, (b) mild mildew, and (c) moderate mildew.
2. Extracting near-infrared image features of rice
2.1 extracting texture features
The rice is easy to mildew under a proper temperature and humidity environment, and mildew flora mainly comprising aspergillus and penicillium is generated and randomly distributed on the surface of grains. And calculating the texture characteristics of the image with the wavelength of 790nm, analyzing the NIR image characteristics when the paddy mildews, and providing data indexes for the rapid detection of the mildewing degree of the paddy during storage and transportation through the image characteristics of the early generation process of the paddy mildewing.
Texture features of the near-infrared images of the rice are calculated according to literature (Madaodan, seagull, Qiguangyun, Liu-gang, Tan peak, soybean leaf disease diagnosis model [ J ] based on an improved cascade neural network, 2017,48(01):163-168.) method in the research.
(1) Mean value
The integral mean value of the near-infrared images of the rice mildewed reflects the brightness degree of the surface of grains after the mildew is distributed, the larger the characteristic value is, the brighter the NIR images are, otherwise, the smaller the image brightness is, and the mean value M calculation formula of the rice mildewed NIR images is as follows:
Figure BDA0002811884660000041
in the formula (1), ZiA random variable, P (Z), representing the reflection value of the picture elementi) Representing a histogram corresponding to the NIR image and L representing the number of distinguishable pixel values.
(2) Standard deviation of
The standard deviation of the NIR image of the rice mildew reflects the discrete degree of the integral pixel value of the image relative to the mean value, and the calculation formula sigma is as follows:
Figure BDA0002811884660000051
(3) smoothness of the surface
Smoothness can reflect the roughness of the NIR image of the mildewed rice, and a smaller value indicates a smoother image, whereas a coarser NIR image of the mildewed rice defines the smoothness S as the formula:
Figure BDA0002811884660000052
(4) third step distance
The third-order distance can be used for representing the symmetry of the NIR image histogram of the mildewed rice, and the calculation formula is as follows:
Figure BDA0002811884660000053
when delta3When the NIR image histogram distribution is 0, the NIR image histogram distribution is relatively even; delta3If the spectrum is more than 0, the image histogram is on the right as a whole, and the near infrared spectrum reflection value is larger; delta3If the spectrum is less than 0, the histogram is shifted to the left integrally, and the near infrared spectrum reflection value is small.
(5) Consistency
The degree of regularity of the NIR image of the moldy rice is measured by the consistency H, which has no relationship between the value of the consistency and the smoothness and is calculated by the formula:
Figure BDA0002811884660000054
(6) entropy of information
The information entropy can represent the randomness of reflection values in the near-infrared image, the larger the value of the information entropy represents the larger the NIR image variability, otherwise, the smaller the image variability, and the calculation formula of the information entropy e is as follows:
Figure BDA0002811884660000055
(7) mean gradient
In order to objectively describe the definition of the NIR image of the mildewed rice, an average gradient G is used for representing multi-level details of the NIR image, the larger G indicates that the image is more hierarchical and clear, and conversely, the image is more fuzzy, and the calculation formula of the average gradient G is as follows:
Figure BDA0002811884660000061
wherein m and n respectively represent the row number and the column number of the near infrared image, and F (i, j) represents the reflection value of the near infrared image pixel; 1,2, 1, m-1; j-1, 2.
(8) Fractal dimension
In the variable periodic repeated details of the NIR image of the mildewed rice, the fractal dimension can be used for measuring the intensity characteristics of the image reflection value imaging to a certain degree, and the rule degrees are expressed, so that the fractal dimension is one of the very important texture characteristics of the NIR image, and the formula for calculating the fractal dimension FD is as follows:
Figure BDA0002811884660000062
in the formula, N (epsilon) represents the total number of boxes required to cover the whole image, and epsilon represents the side length of the original image for dividing a plurality of sub-images.
According to a calculation method of 2.1 sections of mildewed rice characteristics, 600 near infrared spectrum imaging samples with the size of 160 multiplied by 160 pixels are selected, and 8 texture characteristics of the average value, standard deviation, smoothness, three-step distance, consistency, information entropy, average gradient and fractal dimension of NIR images of the rice in different mildewed states are calculated through the formulas (1) to (8).
In the mean value, the mean values of the three states of rice are respectively: 150.795, 151.838 and 141.294, it can be seen that dry rice and lightly mildewed rice do not change much in image brightness, but the average value of near infrared image mean values of moderately mildewed rice is decreased, and the brightness of the image is decreased due to blackening and graying of the surface of the moderately mildewed rice. In the standard deviation of the reaction rice image data with respect to the degree of dispersion of the mean values, the mean values of the three states are respectively: 18.101, 21.156, and 23.819, indicate that the near infrared images of rice show increasingly discrete reflectance values relative to the average during the mildew process. In smoothness, the average values of the three rice grains are: 0.005, 0.007 and 0.009, indicating that the rice from the beginning of drying, to the beginning of mildew, the image was not initially smooth, but rather was rough. In the third distance, the average values of the three states of rice are respectively: -0.050, -0.067 and-0.076, the eigenvalues being complex numbers, indicating that the histograms of all images are generally to the left, and that the near-infrared images are gradually darkened. In consistency, the average values of the three states of rice are: 0.016, 0.014 and 0.012, the overall tendency of the characteristic values appears as a downward tendency, which indicates that the degree of regularity of the near-infrared image is a downward tendency. In the information entropy, the average values of the rice in the three states are respectively: 6.147, 6.389 and 6.566, it can be seen from the calculation of the mean value of entropy that the near infrared images of rice have more and more variability, which indicates that the rice images change gradually. In the average gradient, the average value of the near infrared image parameters of the rice in three states is increased compared with that in the average gradient, which shows that although the surface of the rice starts to be gray after being mildewed and has a small part of the surface of the rice and is wrapped by mold, the definition of the rice image has a slight rising trend. In the fractal dimension for judging the complexity of the image, the near-infrared images of all samples show a similar and stable state.
2.2 frequency analysis of near-Infrared image data
When the three varieties of the Muscovitum, the early-scented rice and the colored rice are in different mildewed states, mildew groups are randomly distributed on the surfaces of grains, so that the frequency change of the reflection value of the near infrared spectrum image of the mildewed rice is caused. The histogram can count the number of pixel points with the same density in the spectral image, and the statistical information contained in the image is described in a simple mode, so that the quantitative research mode is favorable for overcoming the subjective bias brought by qualitative analysis. The histogram distribution data of the near infrared image of the mildewed rice provides information of the distribution of the reflection value of each pixel of the image between the minimum value and the maximum value, and the skewness and the kurtosis of the histogram represent the shape characteristics of the histogram. The skewness reflects the situation that the near infrared spectrum reflectance value distribution in the image data deviates from symmetry, and if the value of the skewness is positive, the distribution shows a longer tail on the right side, and if the value of the skewness is negative, the distribution has a longer tail on the left side. The kurtosis represents the distribution tendency of the near infrared spectrum reflection values in the histogram, the distribution tendency is gathered near the mean value or dispersed at the tail end, when the kurtosis is positive (narrow peak), the histogram form is steeper compared with the normal distribution, the histogram distribution is gathered near the mean value, and the homogeneity of the near infrared spectrum image reflection values of the mildewed paddy is better; when the wave peak is wider and lower, the distribution form of the histogram is more gentle than that of the corresponding normal distribution form, the median distribution of the histogram is more dispersed, and the heterogeneity of the near infrared spectrum image reflection value of the mildewed rice is more obvious.
Therefore, in this document, a histogram technique is applied to further analyze the frequency distribution characteristics of the spectral reflectance values of different degrees of mildew of rice, extract the frequency characteristics of the near infrared spectrum reflectance values in the effective region of the near infrared image, and calculate a histogram (according to the mathematical statistical method of formula 9) formed by the reflectance value distribution frequencies of the near infrared spectrum image of the mildew rice, as shown in fig. 3.
In the rice histogram with different mildew degrees in fig. 3, the horizontal axis represents the pixel reflection values of the images, the pixel reflection values of all the images are concentrated in the range of 0.2-0.8, the vertical axis of the histogram represents the number of the pixel reflection values, and all the near-infrared images have 160 × 160 pixel points. When the histogram of the near infrared image of the rice is analyzed (as shown in fig. 3), it can be seen from the graph that the peak value of the histogram of the healthy rice appears around 0.6, the overall morphology of the histogram is biased to the middle right part of the coordinate system, and the overall histogram morphology of the rice at the early stage of mildew is uniformly distributed towards two sides in the middle of the x coordinate. After the rule is found, on the basis of a rice image histogram, the reflection value distribution frequency of a near infrared spectrum image with the step length of 0.2-0.8 being 0.1 six continuous intervals, namely 0.2-0.3, 0.3-0.4, 0.4-0.5, 0.5-0.6, 0.6-0.7 and 0.7-0.8, is extracted. The calculation formula for calculating the reflection value distribution frequency of the near infrared spectrum image of each interval in the rice near infrared image histogram is as follows:
Figure BDA0002811884660000081
wherein v is(i,i+0.1)Expressing the probability of a pixel point falling in a certain interval in the near infrared image histogram of the rice, p(i,i+0.1)The number of the pixel points in the interval is represented,
Figure BDA0002811884660000082
the number of pixels of the whole image is obtained.
After the calculation of the pixel interval frequency of 600 samples, it can be seen that dry rice (healthy rice) is distributed with scattered pixel points in the interval of 0.2-0.3, and for rice with slight and moderate mildew, more pixel points are distributed in the interval. The near infrared image of the dry rice is distributed with more pixel points in the range of 0.7-0.8, while the distribution is relatively reduced for the mildewed rice, and some images are even 0. Overall, this indicates that the color of the dry rice is clear, the phenotype of the rice changes after the mildew occurs, the rice is not clear in the normal state, and the histogram of the image shifts to the left overall, that is, to the direction of smaller pixel reflection value, due to the graying and darkness of the surface.
3 establishing rice mildew identification BP neural network model
3.1 architecture of neural networks
When the rice is mildewed, a nonlinear mapping relation which is difficult to express by an accurate mathematical model exists between the expressed near infrared spectrum characteristics and the mildewing degree. Because the BP neural network has the self-adaptive learning and inductive reasoning capability and can approach a nonlinear function with any specified precision, the feedforward neural network (BP) is applied to the method for detecting different mildewed states of rice. The three-layer structure for constructing the BP neural network is 14-60-3 type, as shown in figure 4. The 3-layer nodes of the neural network structure of fig. 4 are respectively: the device comprises an input layer, a hidden layer and an output layer, wherein all the layers are in a full interconnection mode, and the same layers are not connected with one another.
Because the numerical value difference of the input characteristic value data is large, in order to enable the high-dimensional standard value of the characteristic vector to reach the standard and uniform, the multi-dimensional characteristic vector of the spectrogram image data is subjected to normalization pretreatment:
Figure BDA0002811884660000091
in the formula, x (i, j) is a vector for normalizing index characteristic value, and xmax(j) The maximum value of the jth index value; 1, 2., 200; j is 1, 2.
The input layer of the neural network model is 14 nodes, which are respectively the 8 texture features of the mildewed rice and the interval of the reflection value distribution frequency of 6 near infrared spectrum images (namely 0.2-0.3, 0.3-0.4, 0.4-0.5, 0.5-0.6, 0.6-0.7 and 0.7-0.8). Let the input vector be x ∈ R14Wherein x ═ x1,x2,…,x14)TThe connection weight between the input layer and the hidden layer is wijThe threshold value is thetajThen the jth input from the input layer to the hidden layer is:
Figure BDA0002811884660000092
defining the output vector v ∈ R of the hidden layer60Then v ═ v1,v2,…,v60)TIf f is the activation function, the hidden layer is the firstThe j outputs are:
Figure BDA0002811884660000093
wherein the function is activated
Figure BDA0002811884660000094
The output vector of the neural network model is y ∈ R3,y=(y1,y2,y3) Setting the connection weight from the hidden layer to the output layer to be omegajkThe threshold value is
Figure BDA0002811884660000095
Then the output y of the kth node of the output layerkThe calculation formula is as follows:
Figure BDA0002811884660000096
thus, a feedforward neural network model for identifying the degree of rice mildew is established.
3.2 learning Algorithm for neural networks
The network model learning algorithm is a teacher learning method, and the learning process is to adjust parameters such as each connection weight and a threshold value of the network according to a given gradient descent algorithm, so that the error between the network output and an actual value can reach the target precision. If the number of learning samples is P (P is 540), the global error E of P samples is:
Figure BDA0002811884660000101
wherein the content of the first and second substances,
Figure BDA0002811884660000102
which is indicative of a desired output value,
Figure BDA0002811884660000103
to representOutput calculated by the network; p1, 2,. said, P; k is 1,2, 3. If note wij、θj、ωjk
Figure BDA0002811884660000104
If the parameter is a parameter to be adjusted, the tth learning rule is as follows:
Figure BDA0002811884660000105
in the formula, η represents a learning rate, and α is an inertia coefficient.
The feedforward neural network parameter updating rule for identifying the rice mildew degree can be obtained by applying the formulas (14) to (15).
3.3 application of Rice mildew detection model
3.3.1 training network architecture parameters
In the different mildew states of the Muscovitum, early fragrance and color rice, 180 groups of healthy, early-mildew and moderate-mildew rice data are selected, and 540 groups of characteristics are taken as training samples in total. During actual training of the network, the target accuracy is set to 0.06, the learning speed is set to 0.8, and the maximum learning frequency is set to 30000. The BP neural network has 28455 iterations, meets the set precision error of 0.06, has high convergence rate and stability, and meets the limit requirement set by the neural network.
3.3.2 model simulation applications
The detection process of rice mildew based on the trained feedforward neural network comprises the following steps: 1) collecting NIR images of rice in different mildewed states and preprocessing data; 2) calculating the texture characteristics (namely the mean value, the standard deviation, the smoothness, the third-order distance, the consistency, the information entropy, the average gradient and the fractal dimension of the NIR image) of the NIR image and the frequency domain (namely the interval of the distribution frequency of the reflection values of the NIR image, namely 0.2-0.3, 0.3-0.4, 0.4-0.5, 0.5-0.6, 0.6-0.7 and 0.7-0.8) of the near infrared spectrum image) to total 14-dimensional digital characteristics; 3) inputting the 14-dimensional digital vectors into a trained neural network, and calculating a forward output value of the network model; 4) analyzing the network output value to the rice mildew degree coding vector and outputting a detection result. The specific flow is shown in fig. 5.
In all samples of different mildew states of the three varieties of the Muscovitum, early fragrance and colored rice, 20 groups of the rest healthy, early-mildew and moderate-mildew rice data are selected, 60 groups of data are counted as test samples, and 3.3.1 sections of trained rice mildew detection models are tested. In the simulation test process, the decoding mapping rule of the binary code of the actual input value of the BP neural network corresponding to the rice health state is as follows: when the calculated value Y of the network output layer nodemax(y1,y2,y3)=y1Then y is11, the other nodes are 0, the sample code corresponding to the NIR imaging data is 001, and the rice sample is in a healthy state; when the calculated value Y of the network output layer nodemax(y1,y2,y3)=y2Then y is2The remaining nodes are 0, the sample code corresponding to NIR imaging data is 010, which indicates that the rice sample is in a slightly moldy state; when the calculated value Y of the network output layer nodemax(y1,y2,y3)=y3Then y is3The remaining nodes are 0, and the sample code for NIR imaging data is 100, indicating a rice sample with moderate mildew status. From the identification result of the rice mildew degree, the average value of the error between the calculated network output value and the expected output value of the BP neural network is 0.52139, the variance is 0.13782, and the standard deviation of the error is 0.37123, so as to reflect the discrete degree of the obtained data, and the obtained result is more concentrated on the whole. The number of samples for predicting central healthy rice, early-stage mildewed rice and rice in mildewing which are wrong is 2, 2 and 0, the identification accuracy rates are 90 percent, 90 percent and 100 percent respectively, the number of the samples which do not accord with the expected output prediction sample number is 17, 32, 34 and 37 respectively, and for three states of dry rice, slightly mildewed rice and moderately mildewed rice in 60 groups of test samples, the total identification rate for the health condition of the rice is 93.33 percent based on a BP neural network identification model.
4 conclusion
When this paper takes place to milden and rot to corn warehousing and transportation process, traditional corn milden and rot testing process is loaded down with trivial details and consuming time longer not enough, has provided the corn milden and rot degree detection model based on near infrared spectrum image processing technique and neural network, realizes the new method of corn milden and rot degree nondestructive test, can provide technical support for the automation of storage corn milden and rot degree fast.
(1) The texture characteristics (mean value, standard deviation, smoothness, third-order distance, consistency, information entropy, average gradient and fractal dimension) of a near-infrared image and frequencies (0.2-0.3, 0.3-0.4, 0.4-0.5, 0.5-0.6, 0.6-0.7 and 0.7-0.8) of 6 intervals of pixels are extracted by combining a digital image processing technology with a spectral image analysis method, 14 characteristic values are counted, and effective and reliable characteristic parameters are provided for rice mildew detection.
(2) According to the method, a feature vector of an NIR image is extracted by research, a mapping model between the rice mildew degree and the near infrared image features is established by utilizing a feedforward neural network (BP) self-adaptive reasoning mechanism, the neural network structure is 14-60-3, the correlation coefficient R between the input and the output of the trained neural network is 0.85, the detection accuracy rate of the rice mildew condition reaches 93.33%, and the problem of mathematical modeling of the nonlinear mapping relation between the rice mildew degree and the NIR spectral imaging feature value is solved.
Comparative example 1
The BP neural network test method proposed in example 1 was experimentally compared with a Radial Basis Function (RBF) under the same conditions as the experimental sample of example 1, and the results are shown in the following table:
comparison of performance parameters for different methods of mildew identification
Figure BDA0002811884660000121
As can be seen from the above table, under the condition that the network target accuracies of the two kinds of rice mildew identification models are the same, the accuracy rate obtained by adopting the BP network training method is higher, the accuracy rate obtained by adopting the radial basis function neural network to perform the simulation test is only 63.66%, and the root mean square errors of the BP neural network and the RBF neural network are 0.04626 and 0.18627 respectively. And the BP network structure is simpler, the number of parameter transmission layers is less, and the BP neural network has obvious advantages in prediction accuracy, so that the rice mildew identification model based on the BP neural network has better expressive force and meets the requirement on accuracy.
Although the invention has been described in detail hereinabove with respect to a general description and specific embodiments thereof, it will be apparent to those skilled in the art that modifications or improvements may be made thereto based on the invention. Accordingly, such modifications and improvements are intended to be within the scope of the invention as claimed.

Claims (7)

1. A rice mildew degree detection method adopting near infrared spectrum image features is characterized by comprising the following steps:
acquiring near infrared spectrum image data of rice in different known mildew states;
acquiring image characteristics of the near infrared spectrum image by taking the near infrared spectrum image data as a research object;
establishing a mapping model between the rice mildew degree and the image characteristics of the near-infrared image thereof by utilizing a feedforward neural network (BP) self-adaptive reasoning mechanism;
acquiring near infrared spectrum image data of the paddy to be detected; obtaining the image characteristics of the near infrared spectrum image of the paddy to be detected; and obtaining the mildew state of the paddy to be detected by using the mapping model.
2. The method for detecting the degree of rice mildew employing near infrared spectral image features as claimed in claim 1, wherein the varieties of rice are selected from the group consisting of Muscovitum, early fragrant, and colored rice.
3. The method for detecting the degree of rice mildew using near infrared spectral image features as claimed in claim 1, wherein the rice mildew state comprises: healthy rice, mild and moderate mildew.
4. The method for detecting the degree of rice mildew employing near infrared spectral image features as claimed in claim 1, wherein the near infrared spectral image data is collected at a near infrared wavelength of 700-900nm and a bandwidth of 30-50 nm;
optionally, the near infrared spectral image data is collected at a near infrared wavelength of 790nm and a bandwidth of 40 nm.
5. The method for detecting rice mildew degree according to the near infrared spectrum image characteristics, as claimed in claim 1, wherein the image characteristics of the near infrared spectrum image include texture characteristics and reflection value distribution frequency of the near infrared spectrum image;
wherein the texture features comprise a mean, a standard deviation, smoothness, a third-order distance, consistency, information entropy, a mean gradient and a fractal dimension of the near infrared spectrum image;
the interval of the reflection value distribution frequency of the near infrared spectrum image is as follows: 0.2 to 0.3, 0.3 to 0.4, 0.4 to 0.5, 0.5 to 0.6, 0.6 to 0.7, 0.7 to 0.8.
6. The method for detecting the degree of rice mildew employing near infrared spectral image features as claimed in claim 1, wherein the three-layer structure of the constructed BP neural network is of type 14-60-3; the 3 layers of nodes of the neural network structure are respectively as follows: the device comprises an input layer, a hidden layer and an output layer, wherein all the layers are in a full interconnection mode, and the same layers are not connected with one another.
7. The method for detecting the degree of rice mildew employing near infrared spectral image features as claimed in claim 1, wherein the established model for mapping between the degree of rice mildew and the image features of its near infrared spectral image is a neural network model, whose input layer is 14 nodes, which are respectively the 8 texture features of the mildewed rice and the reflection value distribution frequency of 6 near infrared spectral images;
wherein the texture features are a mean value, a standard deviation, smoothness, a third-order distance, consistency, information entropy, an average gradient and a fractal dimension of the near infrared spectrum image;
the interval of the reflection value distribution frequency of the near infrared spectrum image is as follows: 0.2-0.3, 0.3-0.4, 0.4-0.5, 0.5-0.6, 0.6-0.7, 0.7-0.8;
let the input vector be x ∈ R14Wherein x ═ x1,x2,…,x14)TThe connection weight between the input layer and the hidden layer is wijThe threshold value is thetajThen the jth input from the input layer to the hidden layer is:
Figure FDA0002811884650000021
defining the output vector v ∈ R of the hidden layer60Then v ═ v1,v2,…,v60)TAnd f is the activation function, the jth output of the hidden layer is:
Figure FDA0002811884650000022
wherein the function is activated
Figure FDA0002811884650000023
The output vector of the neural network model is y ∈ R3,y=(y1,y2,y3) Setting the connection weight from the hidden layer to the output layer to be omegajkThe threshold value is
Figure FDA0002811884650000024
Then the output y of the kth node of the output layerkThe calculation formula is as follows:
Figure FDA0002811884650000025
CN202011399095.0A 2020-12-02 2020-12-02 Rice mildew degree detection method adopting near infrared spectrum image features Pending CN112507851A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011399095.0A CN112507851A (en) 2020-12-02 2020-12-02 Rice mildew degree detection method adopting near infrared spectrum image features

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011399095.0A CN112507851A (en) 2020-12-02 2020-12-02 Rice mildew degree detection method adopting near infrared spectrum image features

Publications (1)

Publication Number Publication Date
CN112507851A true CN112507851A (en) 2021-03-16

Family

ID=74968192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011399095.0A Pending CN112507851A (en) 2020-12-02 2020-12-02 Rice mildew degree detection method adopting near infrared spectrum image features

Country Status (1)

Country Link
CN (1) CN112507851A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114993993A (en) * 2022-05-25 2022-09-02 北京远舢智能科技有限公司 Tobacco leaf mildew detection method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114993993A (en) * 2022-05-25 2022-09-02 北京远舢智能科技有限公司 Tobacco leaf mildew detection method and device

Similar Documents

Publication Publication Date Title
Sunli et al. Non‐destructive detection for mold colonies in rice based on hyperspectra and GWO‐SVR
Capizzi et al. Automatic classification of fruit defects based on co-occurrence matrix and neural networks
Zareiforoush et al. A hybrid intelligent approach based on computer vision and fuzzy logic for quality measurement of milled rice
CN108663339B (en) On-line detection method for mildewed corn based on spectrum and image information fusion
Kurtulmuş et al. Classification of pepper seeds using machine vision based on neural network
Ganatra et al. A survey on diseases detection and classification of agriculture products using image processing and machine learning
Zhang et al. Noise reduction in the spectral domain of hyperspectral images using denoising autoencoder methods
Feng et al. Detection of subtle bruises on winter jujube using hyperspectral imaging with pixel-wise deep learning method
Chen et al. Nondestructive measurement of total volatile basic nitrogen (TVB-N) content in salted pork in jelly using a hyperspectral imaging technique combined with efficient hypercube processing algorithms
Kaya et al. Towards a real-time sorting system: Identification of vitreous durum wheat kernels using ANN based on their morphological, colour, wavelet and gaborlet features
Iraji Comparison between soft computing methods for tomato quality grading using machine vision
Concepcion et al. Tomato septoria leaf spot necrotic and chlorotic regions computational assessment using artificial bee colony-optimized leaf disease index
Hadimani et al. Development of a computer vision system to estimate the colour indices of Kinnow mandarins
Wang et al. Shelf-life prediction of ‘Gros Michel’bananas with different browning levels using hyperspectral reflectance imaging
CN113222836A (en) Hyperspectral and multispectral remote sensing information fusion method and system
CN112507851A (en) Rice mildew degree detection method adopting near infrared spectrum image features
CN114965346A (en) Kiwi fruit quality detection method based on deep learning and hyperspectral imaging technology
Liu et al. Rapid discrimination of high-quality watermelon seeds by multispectral imaging combined with chemometric methods
BEHROOZI et al. Application of machine vision in modeling of grape drying process
Verdú et al. Laser scattering imaging combined with CNNs to model the textural variability in a vegetable food tissue
Ghamari Classification of chickpea seeds using supervised and unsupervised artificial neural networks
Abirami et al. Classification of fruit diseases using feed forward back propagation neural network
Sumathi Insect detection in rice crop using Google code lab
Kavdır et al. Classification of olives using FT-NIR spectroscopy, neural networks and statistical classifiers
Hsieh et al. Separating Septicemic and Normal Chicken Livers by Visible/near–infrared Spectroscopy and Back–propagation Neural Networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination