Soybean seed quality detection method based on rapid spatial frequency domain imaging technology

Through fast spatial frequency domain imaging technology and single integral sphere system, combined with image processing and neural network model, the problem of internal pest detection in soybean seeds is solved, and rapid and non-destructive detection efficiency and intelligent development are achieved, providing soybean planting and testing fields. Important technical support.

CN119246527AInactive Publication Date: 2025-01-03NANJING AGRICULTURAL UNIVERSITY
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411416078.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to detect internal pest damage in soybean seeds quickly and non-destructively, affecting quality and yield, and has high detection costs and lacks intelligent development.

Method used

Fast spatial frequency domain imaging technology is used to determine the classification model of soybean seed pest rating, and the optical characteristic parameters are obtained using a single integral sphere system and an inverse multiplication algorithm. Combined with image preprocessing and three-phase demodulation method, the acquisition of soybean seed reflection images and Error analysis, establish SVM, GRNN, and MLR models for pest rating classification.

Benefits of technology

It realizes rapid identification of internal seed damage, reduces the labor cost of breeding excellent soybean varieties, improves detection efficiency, promotes the intelligent development of soybean insect resistance research, and provides fast, non-destructive and non-contact detection technology for the field of seed detection. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119246527A_ABST
    Figure CN119246527A_ABST
Patent Text Reader

Abstract

The invention provides a soybean seed quality detection method based on a rapid spatial frequency domain imaging technology, which comprises the following steps: S1, determining a soybean seed insect pest grade classification model: S1.1, obtaining an insect pest damage area of a soybean seed; s1.2, the damage area of the germinated soybean seeds is obtained, and grading is conducted according to the proportion of the damage area of the germinated soybean seeds; s1.3, three models of SVM, GRNN and MLR are established, parameters of the three models, namely kernel, C, sigma and alpha, are optimized and adjusted through the SVM, the GRNN and the MLR by using a dobby machine, and a soybean seed pest grade classification model is constructed by taking X as a pest damage area, type and absorption coefficient array and Y as training input data of damage area proportion grades of corresponding varieties after germination; the invention provides a quicker, lossless and non-contact detection technology for the field of seed quality detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of soybean quality detection, and in particular to a soybean seed quality detection method based on fast spatial frequency domain imaging technology. Background Art

[0002] Soybean is an important grain and oil crop in the world. In addition to containing trace elements and minerals such as calcium, iron, and protein, it is also rich in nutrients such as lecithin, unsaturated fatty acids, and plant sterols. However, soybeans are very vulnerable to insect pests during their growth. In addition to damaging the plants by biting or poking, the toxins contained in their mouthparts can easily cause necrosis of the internal tissues of the plants, which not only affects the quality of the soybean seeds, but also often causes a significant reduction in crop yields, seriously threatening global food production. Therefore, it is very important to conduct rapid and non-destructive testing of soybean seeds, which helps to screen out varieties with internal quality defects and breed excellent insect-resistant varieties. Summary of the invention

[0003] In view of the deficiencies in the prior art, the present invention aims to provide a soybean seed quality detection method based on fast spatial frequency domain imaging technology, which can solve the existing problems.

[0004] In order to achieve the above object, the technical solution of the present invention is as follows:

[0005] The present invention is realized by the following technical scheme: a soybean seed quality detection method based on fast spatial frequency domain imaging technology, a soybean seed quality detection method based on fast spatial frequency domain imaging technology, comprising

[0006] S1. Determine the soybean seed pest classification model, including:

[0007] S1.1. Obtain the insect damage area of ​​soybean seeds, including:

[0008] Based on the absorption coefficient, reduced scattering coefficient and germination rate of soybean seeds, the characteristic wavelength and optimal spatial frequency required for the spatial frequency domain imaging technology experiment are obtained;

[0009] Based on the experimental characteristic wavelength and the optimal spatial frequency, the reflection image of soybean seeds is forward acquired according to the spatial frequency domain imaging technology;

[0010] The diffuse emission image of soybean seeds is obtained by image preprocessing and three-phase demodulation according to the reflection image, and the insect damage area inside the soybean seeds is determined;

[0011] The soybean seed insect damage area was calculated using ImageJ;

[0012] The optical characteristic parameters of soybeans were obtained through inverse inversion of spatial frequency domain imaging technology and single integrating sphere experiment, and error analysis was performed.

[0013] S1.2, obtaining the damaged area of ​​soybean seeds after germination, and classifying them according to the proportion of damaged area after germination;

[0014] S1.3, establish three models of SVM, GRNN and MLR, optimize and adjust the parameters of the three models: (kernel, C), sigma and alpha by SVM, GRNN, MLR and multi-armed bandit machine, and construct a soybean seed pest grade classification model with X as the array of pest damage area, species and absorption coefficient and Y as the percentage of the damage area of ​​the corresponding variety after germination as training input data;

[0015] S2. Determine the insect damage area, type and absorption coefficient of the soybean seeds to be tested according to S1.1; input the soybean seed insect pest grade classification model; the model outputs the soybean seed insect pest grade to determine the quality of the soybean seeds to be tested.

[0016] Furthermore, the characteristic wavelength and optimal spatial frequency required for the spatial frequency domain imaging technology experiment are obtained based on the absorption coefficient, reduced scattering coefficient and germination rate of soybean seeds, including:

[0017] The optical characteristic parameters of soybean seeds are obtained through a single integrating sphere system and a reverse multiplication algorithm: absorption coefficient and reduced scattering coefficient;

[0018] The germination rate of soybean seeds was obtained through germination experiments;

[0019] Based on the SPA algorithm, the experimental characteristic wavelength of soybean seeds is obtained and the optimal spatial frequency is determined.

[0020] Furthermore, the optical characteristic parameters of soybean seeds are obtained by using a single integrating sphere system and a reverse multiplication algorithm, including: placing a soybean seed sample to be tested close to the exit window and the incident window of the single integrating sphere on an optical slide rail, fixing the position of the sample and the single integrating sphere, controlling the spot size of the light source on the surface of the soybean seed sample by moving the position of the optical fiber light source, and in order to maximize the light intensity, determining the minimum spot size of 19 mm by a vernier caliper to conduct a single integrating sphere experiment;

[0021] The dark field spectrum, transmission and reflection reference spectra, and transmission and reflection spectra were obtained in sequence through a single integrating sphere experiment. The optical characteristic parameters of soybeans were obtained using the IAD algorithm: absorption coefficient and reduced scattering coefficient.

[0022] Further, the method of obtaining characteristic wavelengths of soybean seeds based on the SPA algorithm and determining the optimal spatial frequency includes: obtaining experimental characteristic wavelengths with the aid of the SPA algorithm based on the absorption coefficient, the reduced scattering coefficient and the germination rate. Due to the limited range of the projector wavelength, the characteristic wavelengths are 501.55nm, 615.42nm and 545.12nm;

[0023] The computer is used to control the grating monochromator to output the light source with wavelengths of 501.55nm, 615.42nm, and 545.12nm to transmit to the projector, and MatlabR2022a is used to generate the frequency fx in the range of 10 to 120 (unit: m -1 ) between three phases (0, 2π / 3 and 4π / 3), where the frequency is 10, 5 (unit: m -1 ) is used to select the optimal spatial frequency for the span; the generated sinusoidal diagram is mapped onto the soybean sample, and the optimal spatial frequency is selected and determined after image processing and image comparison display.

[0024] Furthermore, the optimal spatial frequency is 60, 75, 90 (unit: m -1 ).

[0025] Furthermore, the forward acquisition of the reflected image of the soybean seeds according to the spatial frequency domain imaging technology based on the acquired experimental characteristic wavelength and the optimal spatial frequency includes: transmitting the three characteristic wavelengths to the projector together, installing a polarizing plate in front of the projector lens to eliminate the mirror reflection of the smooth surface of the soybean seeds, the camera and the projector are 10° in the vertical direction, and the dark field image and the whiteboard image are collected in sequence; by adding a filter in front of the camera lens, the sinusoidal diagrams of three frequencies and three phases are projected onto the surface of the insect-infested bean seeds, and the reflected images of the soybean seeds at the three characteristic wavelengths are acquired in sequence.

[0026] Furthermore, the method of obtaining the diffuse emission image of soybean seeds by image preprocessing and three-phase demodulation method according to the reflected image to determine the internal insect damage area includes:

[0027] Perform image uniformity correction on the collected reflection image, and the calculation formula is as follows:

[0028]

[0029]

[0030] Among them, I relatively is the image intensity after black and white correction, I source is the image intensity before correction, I bright is the image intensity of the reference white plate, I dark is the dark field image intensity;

[0031] The region of interest (ROI) is extracted for the black and white corrected image, and the region of interest is set to 653≤x≤950, 341≤y≤562 and extracted; the image is smoothed, and a Gaussian low-pass filter is used to retain the low-frequency information of the image and eliminate the noise of the high-frequency segmentation. The kernel size is selected as 3*3;

[0032] The soybean reflectance image is processed using the three-phase demodulation method:

[0033] I(x,f x )=I DC (x,f x )+I AC (x,f x )

[0034] In the formula, I AC (x,f x ) and I DC (x,f x ) represent the reflection intensity of the AC image and the DC image respectively; the DC component is only related to the light source intensity and is not affected by the spatial frequency, while the AC component is not only related to the light source intensity but also to the projection frequency; based on the diffuse reflection image, the DC and AC are separated using the following equation:

[0035]

[0036]

[0037]

[0038] Where I1, I2 and I3 are the diffuse reflection image intensities obtained when the phase is 0, 2π / 3 and 4π / 3 respectively, M AC (x,f x ) is the amplitude envelope of diffuse reflection photon density; in order to make the image contrast stronger, a ratio image is introduced, and its calculation formula is as follows:

[0039]

[0040] Where γ is a proportional image, and the value of each pixel is between 0 and 1.

[0041] Furthermore, the optical characteristic parameters of soybeans are obtained by inverse inversion of spatial frequency domain imaging technology and single integrating sphere experiment, and error analysis is performed, including:

[0042] Choose a healthy bean variety with known optical characteristic parameters as a reference measurement, and use the diffuse reflection formula of the medium surface:

[0043]

[0044] Where: is the proportional constant, R eff ≈0.0636n+0.668+0.71 / n-1.44 / n 2 is the effective reflection coefficient, n is the tissue refractive index, a′=μ′ / μ tr is the reduced albedo; the diffuse reflectance R of the reference sample is calculated ref (f x ), and obtain the diffuse reflectance of the sample to be tested after correction as:

[0045]

[0046] In the formula, R ref (f x ) is the diffuse reflectance of the reference sample, M ACref (x,f x ) is the amplitude envelope of the diffuse reflection intensity of the reference sample, M AC (x,f x ) is the amplitude envelope of the diffuse reflection intensity of the sample to be tested; after the diffuse reflection of the sample to be tested is corrected, the diffuse reflection formula of the medium surface is nonlinearly fitted using the following equation to obtain μ a and μ′ s :

[0047]

[0048] R eff ≈0.0636n+0.668+0.71 / n-1.44 / n 2

[0049]

[0050] μ tr =μ a +μ′ s

[0051] In the formula, A is the proportional constant, R is eff is the effective reflection coefficient, n is the sample refractive index, μ′ sff is the reduced attenuation coefficient, μ tr is the total attenuation coefficient.

[0052] Furthermore, Macro-Recal l, F1-Score and Accuracy are used to evaluate the accuracy and performance of the three models.

[0053] A computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to perform a soybean seed quality detection method based on fast spatial frequency domain imaging technology

[0054] Compared with the prior art, the beneficial effects of the present invention include:

[0055] The invention adopts fast spatial frequency domain imaging technology to detect soybean seed quality. The fast spatial frequency domain imaging technology is a method that can timely identify internal damage of seeds, effectively detect internal tissue quality problems, reduce the labor cost of breeding excellent soybean varieties, improve the efficiency of soybean planting, promote the intelligent development of seed detection field and soybean insect resistance research, and also provide research ideas for the development of other agricultural product detection, which has important practical significance, scientific significance and application value; in addition, the invention can also obtain optical characteristic parameters of soybean tissue through a single integrating sphere system and a reverse multiplication algorithm and analyze the relationship between the absorption coefficient and the reduced scattering coefficient of soybean seeds, and explore the influence of insect pests on the optical characteristics of soybean seeds;

[0056] Therefore, the present invention introduces spatial frequency domain imaging technology into the field of seed detection. Based on the optical properties of soybean tissue and germination rate, spatial frequency domain imaging technology is used to obtain soybean diffuse reflection images, thereby intuitively displaying the degree of sub-surface damage of soybeans and exploring the changes in the optical properties of insect-infested bean seeds, providing a faster, non-destructive and non-contact detection technology for the field of seed quality detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The disclosure of the present invention is described with reference to the accompanying drawings. It should be understood that the drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present invention. Among them:

[0058] Figure 1 It is a schematic diagram of the overall process of the soybean seed quality detection method based on the fast spatial frequency domain imaging technology of the present invention;

[0059] Figure 2 The figure is a schematic diagram of the process of obtaining the insect damage area of ​​soybean seeds according to the embodiment of the present invention. DETAILED DESCRIPTION

[0060] It is easy to understand that according to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can propose a variety of interchangeable structural modes and implementation modes. Therefore, the following specific implementation modes and drawings are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as the whole of the present invention or as a limitation or restriction to the technical solution of the present invention.

[0061] The present invention discloses a soybean seed quality detection method based on fast spatial frequency domain imaging technology, the soybean seed quality detection method comprises the following steps: Figure 1 As shown,

[0062] S1. Determine the soybean seed pest classification model, including:

[0063] S1.1. Obtain the insect damage area of ​​soybean seeds; Figure 2 As shown, including:

[0064] S1.11. Based on the absorption coefficient, reduced scattering coefficient and germination rate of soybean seeds, the characteristic wavelength and optimal spatial frequency required for the spatial frequency domain imaging technology experiment are obtained; specifically, including:

[0065] The optical characteristic parameters of healthy soybean seeds, including absorption coefficient and reduced scattering coefficient, were obtained through a single integrating sphere system and a reverse multiplication algorithm. The specific operation steps were as follows: the healthy soybean seed sample to be tested was placed close to the exit window and incident window of the single integrating sphere on the optical slide rail, and the position of the soybean seed sample and the single integrating sphere were fixed. The spot size of the light source on the surface of the soybean seed sample was controlled by moving the position of the fiber optic light source. In order to maximize the light intensity, a vernier caliper was used to determine that the minimum spot size was 19 mm to conduct a single integrating sphere experiment. The dark field spectrum, transmission and reflection reference spectrum, and transmission and reflection spectrum were obtained in turn through the single integrating sphere experiment, and the optical characteristic parameters of soybean seeds, including absorption coefficient and reduced scattering coefficient, were obtained using the IAD algorithm.

[0066] The specific experimental operation is as follows: prepare soybean seed samples, divide them into pest-infested bean seeds and healthy bean seeds, and select hidden pest-infested bean seeds from the pest-infested bean seeds. Before the experiment, use a sodium hypochlorite solution with a concentration of 1000 mg / L to clean the bacteria on the surface of the bean seeds, then use distilled water to clean the sodium hypochlorite solution on the surface of the bean seeds and place them in an air-drying room to air dry;

[0067] A single integrating sphere system was built, and the experiment was repeated three times for the same bean variety to observe the difference between the data. If the difference was too large, the measurement experiment would be continued. The single integrating sphere experiment was conducted in a dark room. Before the experiment, the halogen tungsten light source was turned on and preheated for 5 to 10 minutes to minimize the experimental error caused by the instability of the light source intensity.

[0068] The total transmittance and total reflectance of soybeans are obtained by sequentially acquiring a dark field spectrum, a transmission reference spectrum, a transmission spectrum, a reflection reference spectrum, and a reflection spectrum, and according to a formula;

[0069] Through the reverse multiplication algorithm, the optical characteristic parameters of soybeans are determined based on their transmittance and reflectivity: absorption coefficient and reduced scattering coefficient. The changes of the optical characteristic parameters of soybean varieties under the influence of insect pests are analyzed to determine the overall insect resistance of soybeans.

[0070] IDA (Iterative Deepening A*) is a heuristic search algorithm for solving path search problems, which combines the iterative deepening strategy of depth-first search and the optimality guarantee of A* search. The reverse IDA algorithm (sometimes called Backward IDA or Reverse IDA) is a variant in which the search starts from the target node and proceeds backwards to the start node, similar to the forward IDA search from the start node to the target node.

[0071] The germination rate of soybean seeds is obtained through germination experiments, including randomly selecting some healthy soybean seeds from soybean seed samples for germination experiments, counting the germinated seeds after one week, and determining their germination rate;

[0072] Based on the SPA algorithm, the experimental characteristic wavelength and optimal spatial frequency of soybean seeds are obtained; based on the absorption coefficient, reduced scattering coefficient and germination rate of healthy soybean seeds, the SPA algorithm (Simultaneous Perturbation Stochastic Approximation, an optimization algorithm, is mainly used to solve nonlinear optimization problems, especially those with high-dimensional or complex objective functions. The core idea of ​​the SPA algorithm is simultaneous perturbation (Simultaneous Perturbation), that is, in each iteration, a set of directions are randomly selected to perturb the parameters, and then the direction of parameter update is estimated according to the value of the objective function), the operation matrix behavior is sample, the column is band, the wavelength range is 450nm~950nm, and it is divided into 518 objects. The initial iteration vector is the soybean seed vitality index, the matrix residual vector is the reflectivity and transmittance corresponding to different bands, and the step size is selected as 1. Through the SPA algorithm experiment, 13 characteristic wavelengths are obtained: 501.55nm, 798.08nm, 712.34nm, 813.91nm, 615.42nm, 545.12nm, 884.94nm, 784.02nm, 765.12nm, 833.29nm, 821.31nm, 824.08nm, and 537.9nm.

[0073] Since the wavelength range of the DLP6500 projector is 420-700 nm, and in order to achieve better experimental results within a wavelength range, characteristic wavelengths of 501.55 nm, 545.12 nm and 537.9 nm are preferred as experimental wavelengths for subsequent spatial frequency domain imaging experiments.

[0074] The computer was used to control the grating monochromator to output the light source with wavelengths of 501.55nm, 545.12nm and 537.9nm from the projector, and the three-phase with a frequency of 10-120 was projected onto the surface of the soybean sample. A filter was placed in front of the detector to obtain the reflection image of soybean at different characteristic wavelengths. That is, the computer was used to control the grating monochromator to output the light source with wavelengths of 501.55nm, 615.42nm and 545.12nm to the DLP6500 projector, and the frequency fx was generated in the range of 10-120 (unit: m -1 ) between three phases (0, 2π / 3 and 4π / 3), where the frequency is 10, 5 (unit: m -1 ) is the span to select the best spatial frequency. The generated sinusoidal graph is mapped on the soybean sample. After image processing and image comparison, the optimal spatial frequency is selected to clearly display the sub-surface insect damage area of ​​the soybean sample; through image preprocessing and three-phase demodulation, the three spatial frequencies of 60, 75, and 90 (unit: m -1 ), which can clearly display the sub-surface insect damage area of ​​soybean samples.

[0075] S1.12, based on the experimental characteristic wavelength and the optimal spatial frequency, forwardly acquire the reflection image of soybean seeds according to the spatial frequency domain imaging technology;

[0076] The three characteristic wavelengths (501.55nm, 615.42nm, 545.12nm) are transmitted to the projector together. A polarizer is installed in front of the projector lens to eliminate the mirror reflection of the smooth surface of the soybean seeds. The camera and the projector are 10° vertically, and the dark field image and the whiteboard image are collected in turn. By adding a filter in front of the camera lens, three frequencies (60nm -1 、75m -1 、90m -1 ) three phase sinusoidal diagrams are projected onto the surface of insect-infested bean seeds, and soybean reflection images of three characteristic wavelengths are obtained in turn.

[0077] Specifically, during the experiment, the projector was placed directly above the sample table, the camera and projector were fixed on the bracket at an angle of 15°, polarizers were installed in front of the projector and camera to eliminate the influence of scattering, the halogen lamp cold light source was transmitted to the WDG single-grating spectrometer through optical fiber and the specific wavelength was controlled by a computer and transmitted to the projector through optical fiber, a sinusoidal diagram was generated by another computer and transmitted to the projector, and a soybean seed quality detection method based on fast spatial frequency domain imaging technology was developed in the computer.

[0078] S1.13, obtaining a diffuse emission image of soybean seeds by image preprocessing and three-phase demodulation method based on the reflected image, and determining the internal insect damage area;

[0079] Specifically, the spatial frequency domain imaging technology experiment was conducted through the characteristic wavelength and the optimal spatial frequency. Due to the problems of high noise, large data volume, and inconsistent data levels in the initially collected soybean images, in order to eliminate the difference in light intensity at different experimental times and stabilize the reflectivity change trend of the image, the collected images were corrected for image uniformity;

[0080] In order to reduce the amount of data processing and improve the accuracy of data processing, the region of interest (ROI) is extracted for the black and white corrected graphics. The region of interest is set as 653≤x≤950, 341≤y≤562 and extracted. The extracted image not only has an increased resolution, but also has an increased proportion of bean species in the image. Finally, the image is smoothed, and a Gaussian low-pass filter is used to retain the low-frequency information of the image and eliminate the noise of the high-frequency segmentation. The kernel size is selected as 3*3;

[0081] The three-phase image demodulation is performed on the reflection image of the sample surface. By separating the DC and AC in the diffuse reflection image, the amplitude envelope of the diffuse reflection photon density is obtained, and the proportional image is introduced to clearly show the internal damage of the bean seeds.

[0082] The specific processing formula is: perform image uniformity correction on the collected reflection image, and the calculation formula is as follows:

[0083]

[0084]

[0085] Among them, I relatively is the image intensity after black and white correction, I source is the image intensity before correction, I bright is the image intensity of the reference white plate, I dark is the dark field image intensity;

[0086] For the black and white corrected image, the region of interest (ROI) is extracted, and the region of interest is set to 653≤x≤950, 341≤y≤562 and extracted. The image is smoothed, and a Gaussian low-pass filter is used to retain the low-frequency information of the image and eliminate the noise of the high-frequency segmentation. The kernel size is selected as 3*3;

[0087] The soybean reflectance image is processed using the three-phase demodulation method:

[0088] I(x,f x )=I DC (x,f x )+IAC (x,f x )

[0089] In the formula, I AC (x,f x ) and I DC (x,f x ) represent the reflection intensity of the AC image and the DC image respectively. The DC component is only related to the light source intensity and is not affected by the spatial frequency, while the AC component is not only related to the light source intensity but also to the projection frequency. Based on the diffuse reflection image, the DC and AC are separated using the following equation:

[0090]

[0091]

[0092]

[0093] In the formula, I1, I2, and I3 are phases respectively. The diffuse reflection image intensity obtained when M AC (x,f x ) is the amplitude envelope of diffuse reflection photon density. In order to make the image contrast stronger, a ratio image is introduced, and its calculation formula is as follows:

[0094]

[0095] In the formula, γ is a proportional image, and the value of each pixel is between 0 and 1, which has a better imaging effect.

[0096] S1.14. Calculate the soybean seed insect damage area based on ImageJ; calculate the ratio of the soybean seed damage area to the overall area and use the data as the input of the neural network model. ImageJ is a powerful open source software platform for image processing and analysis.

[0097] S1.15. Obtain the optical characteristic parameters of soybeans through inverse inversion of spatial frequency domain imaging technology and single integrating sphere experiment, and perform error analysis. Specifically, in order to reduce the influence of system response on the measurement results, a healthy bean variety with known optical characteristic parameters is selected for reference measurement, and the diffuse reflectance of the sample to be tested after correction is deduced by obtaining the diffuse reflectance of the reference sample. The absorption coefficient and reduced scattering coefficient of the soybean sample are obtained by nonlinear fitting.

[0098] The optical characteristic parameters of bean seeds obtained by reverse inversion of spatial frequency domain imaging experiments were compared with those obtained by a single integrating sphere, and the feasibility of the experimental algorithm was effectively verified.

[0099] The specific operation is: select a healthy bean variety with known optical characteristic parameters for reference measurement, and use the diffuse reflection formula of the medium surface:

[0100]

[0101] Where: is the proportional constant, R eff ≈0.0636n+0.668+0.71 / n-1.44 / n 2 is the effective reflection coefficient, n is the tissue refractive index, a′=μ′ / μ tr is the reduced albedo. The diffuse reflectance R of the reference sample is calculated ref (f x ), and obtain the diffuse reflectance of the sample to be tested after correction as:

[0102]

[0103] In the formula, R ref (f x ) is the diffuse reflectance of the reference sample, M AC,ref (x,f x ) is the amplitude envelope of the diffuse reflection intensity of the reference sample, M AC (x,f x ) is the amplitude envelope of the diffuse reflection intensity of the sample to be tested. After the diffuse reflection of the sample to be tested is corrected, the diffuse reflection formula of the medium surface is nonlinearly fitted using the following equation to obtain μ a and μ′ s :

[0104]

[0105] R eff ≈0.0636n+0.668+0.71 / n-1.44 / n 2

[0106]

[0107] μ tr =μ a +μ′ s

[0108] Where: A is the proportional constant, R eff is the effective reflection coefficient, n is the sample refractive index, μ′ eff is the reduced attenuation coefficient, μ tr is the total attenuation coefficient.

[0109] S1.2. Obtain the damaged area of ​​soybean seeds after germination, and classify them according to the proportion of the damaged area after germination; conduct germination experiments on insect-infested bean seeds and use ImageJ to obtain the damaged area after germination, and classify the damaged area of ​​the bean seeds into a grade.

[0110] S1.3, establish three models of SVM, GRNN and MLR, optimize and adjust the parameters of the three models: (kernel, C), sigma and alpha by SVM, GRNN, MLR and multi-armed bandit machine, and construct a soybean seed pest grade classification model with X as the array of pest damage area, species and absorption coefficient and Y as the percentage of the damage area of ​​the corresponding variety after germination as training input data;

[0111] Among them, SVM (Support Vector Machine) is a supervised learning model, mainly used for classification and regression analysis; its basic idea is to find a hyperplane that maximizes the interval between two types of data. The key points of SVM include: Maximum Margin Classifier: SVM tries to find an optimal hyperplane that can maximize the distance between positive and negative samples, that is, maximize the interval. Kernel Technique: For nonlinearly separable problems, SVM maps data to a high-dimensional space through a kernel function, making the problem that was originally nonlinearly separable in a low-dimensional space linearly separable. Soft margin: In practical applications, data is often not completely linearly separable. SVM introduces slack variables and penalty parameters C to allow some sample points to be on the wrong side, but they will be penalized.

[0112] GRNN (General Regression Neural Network) is a feedforward neural network, mainly used to solve regression problems. The core of GRNN is the radial basis function (RBF), which has the advantages of fast training speed and no need for iterative weight calculation, but is sensitive to outliers. The working principle of GRNN includes: Radial basis function: using Gaussian function as activation function, its output depends on the distance between the input and the center point. Simple training process: The weight of GRNN can be directly determined by the least squares method, without the need for back propagation to adjust the weight. Smoothing factor σ: determines the generalization ability and smoothness of the network. Too small will lead to overfitting, and too large may lead to underfitting.

[0113] MLR (Multiple Linear Regression) is a statistical method used to predict the relationship between a dependent variable and one or more independent variables. MLR assumes that there is a linear relationship between the independent and dependent variables, and the goal is to minimize the sum of squares of the prediction errors. Its main features are: Linear relationship: The model assumes that there is a linear relationship between the independent and dependent variables, which can be expressed as y=b0+b1x1+b2x2+...+e, where b0 is the intercept, bi is the regression coefficient, and e is the error term. Least Squares Method: The regression coefficient is estimated by minimizing the residual sum of squares, that is, finding a set of coefficients that minimizes the sum of squares of the prediction errors of all observations. Multicollinearity: There may be correlation between the independent variables, which is called multicollinearity, which will affect the estimation of the regression coefficient and needs to be diagnosed through indicators such as VIF (variance inflation factor).

[0114] The soybean classification model is constructed with training input data (for example, X is an array recording the bean pest damage area, type and absorption coefficient of 300 soybean seeds (300x3), and Y is an array of the damage area percentage level of the corresponding variety after germination (300x1), expressed as integers). For each prediction model, 80% of the samples are randomly selected as the training set and 20% of the samples are used as the test set. The parameters of the three models: (kernel, C), sigma and alpha are optimized and adjusted by the multi-armed bandit. Macro-Recall (Mean Average Recall Overlap-Recall), F1-Score and Accuracy are used to evaluate the model performance; among them: Macro-Recall is the macro average recall rate, which is suitable for multi-classification problems. It averages the recall rate of each category, regardless of the size difference between categories, so it is more fair on the dataset with imbalanced categories. F1-Score is the harmonic average of precision and recall. It combines precision and recall and is suitable for scenarios where both false positives and false negatives need to be considered. Accuracy is one of the most intuitive evaluation indicators, defined as the ratio of the number of correct predictions to the total number of predictions. Accuracy is more applicable when the data set is balanced, but may not fully reflect the performance of the model in scenarios with unbalanced categories.

[0115] In agricultural product detection, it is more desirable to avoid misdetecting unhealthy seeds as healthy seeds than misdetecting healthy seeds as unhealthy seeds, so Macro-Recall is a more important indicator in the model indicators. Therefore, in this embodiment, Macro-Recall is relatively low before the neural network model parameters are optimized, and after reinforcement learning optimization, the RL-SVM classification model has the best effect.

[0116] S2. Determine the insect damage area, type and absorption coefficient of the soybean seeds to be tested according to S1.1; input the soybean seed insect pest grade classification model; the model outputs the soybean seed insect pest grade to determine the quality of the soybean seeds to be tested.

[0117] After obtaining the soybean seed pest grade model, when the quality of the soybean seeds to be tested needs to be determined, the pest damage area of ​​the soybean seeds to be tested needs to be obtained according to S1.1 above and then input into the model, and then the quality of the soybean seeds can be judged according to the output pest grade.

[0118] In the present invention, the absorption coefficient and reduced scattering coefficient of soybean are obtained by measuring the reflectivity and transmittance of healthy soybeans through a single integrating sphere experiment, and the absorption coefficient and reduced scattering coefficient of healthy bean seeds are obtained based on an IAD algorithm; the germination rate of soybean seeds is obtained by conducting a germination test on healthy bean seeds; spatial frequency domain imaging technology is used, and in a forward experiment, pest-infested bean seeds with internal damage are used for internal damage detection, and in a reverse experiment, healthy bean seeds and pest-infested bean seeds are used.

[0119] The invention adopts fast spatial frequency domain imaging technology to detect soybean seed quality. The fast spatial frequency domain imaging technology is a method that can timely identify internal damage of seeds, effectively detect internal tissue quality problems, reduce the labor cost of breeding excellent soybean varieties, improve the efficiency of soybean planting, promote the intelligent development of seed detection field and soybean insect resistance research, and also provide research ideas for the development of other agricultural product detection, which has important practical significance, scientific significance and application value; in addition, the invention can also obtain optical characteristic parameters of soybean tissue through a single integrating sphere system and a reverse multiplication algorithm and analyze the relationship between the absorption coefficient and the reduced scattering coefficient of soybean seeds, and explore the influence of insect pests on the optical characteristics of soybean seeds;

[0120] Therefore, the present invention introduces spatial frequency domain imaging technology into the field of seed detection. Based on the optical properties of soybean tissue and germination rate, spatial frequency domain imaging technology is used to obtain soybean diffuse reflection images, thereby intuitively displaying the degree of sub-surface damage of soybeans and exploring the changes in the optical properties of insect-infested bean seeds, providing a faster, non-destructive and non-contact detection technology for the field of seed quality detection.

[0121] The invention discloses a computer-readable storage medium on which a computer program is stored. The computer program is executed by a processor to implement a soybean seed quality detection method based on a fast spatial frequency domain imaging technology.

[0122] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0123] In the description of this patent, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", and "set" should be understood in a broad sense, for example, it can be fixedly connected or set, or it can be detachably connected or set, or connected or set in one piece. For ordinary technicians in this field, the specific meanings of the above terms in this patent can be understood according to specific circumstances.

[0124] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "several" is two or more, unless otherwise clearly and specifically defined.

[0125] The technical scope of the present invention is not limited to the contents in the above description. Those skilled in the art can make various deformations and modifications to the above embodiments without departing from the technical idea of ​​the present invention, and these deformations and modifications should all fall within the protection scope of the present invention.

Claims

1. A soybean seed quality detection method based on fast spatial frequency domain imaging technology, characterized in that: include S1. Determine the soybean seed pest classification model, including: S1.

1. Obtain the insect damage area of ​​soybean seeds, including: Based on the absorption coefficient, reduced scattering coefficient and germination rate of soybean seeds, the characteristic wavelength and optimal spatial frequency required for the spatial frequency domain imaging technology experiment are obtained; Based on the experimental characteristic wavelength and the optimal spatial frequency, the reflection image of soybean seeds is forward acquired according to the spatial frequency domain imaging technology; The diffuse emission image of soybean seeds is obtained by image preprocessing and three-phase demodulation according to the reflection image, and the insect damage area inside the soybean seeds is determined; The soybean seed insect damage area was calculated using ImageJ; The optical characteristic parameters of soybeans were obtained through inverse inversion of spatial frequency domain imaging technology and single integrating sphere experiment, and error analysis was performed. S1.2, obtaining the damaged area of ​​soybean seeds after germination, and classifying them according to the proportion of damaged area after germination; S1.3, establish three models of SVM, GRNN and MLR, optimize and adjust the parameters of the three models: (kernel, C), sigma and alpha by SVM, GRNN, MLR and multi-armed bandit machine, and construct a soybean seed pest grade classification model with X as the array of pest damage area, species and absorption coefficient and Y as the percentage of the damage area of ​​the corresponding variety after germination as training input data; S2. Determine the insect damage area, type and absorption coefficient of the soybean seeds to be tested according to S1.1; input the soybean seed insect pest grade classification model; the model outputs the soybean seed insect pest grade to determine the quality of the soybean seeds to be tested.

2. The soybean seed quality detection method based on fast spatial frequency domain imaging technology according to claim 1, characterized in that: The method of obtaining the characteristic wavelength and the optimal spatial frequency required for the spatial frequency domain imaging technology experiment based on the absorption coefficient, the reduced scattering coefficient and the germination rate of soybean seeds includes: The optical characteristic parameters of soybean seeds are obtained through a single integrating sphere system and a reverse multiplication algorithm: absorption coefficient and reduced scattering coefficient; The germination rate of soybean seeds was obtained through germination experiments; Based on the SPA algorithm, the experimental characteristic wavelength of soybean seeds is obtained and the optimal spatial frequency is determined.

3. The soybean seed quality detection method based on fast spatial frequency domain imaging technology according to claim 2 is characterized in that: The method of obtaining optical characteristic parameters of soybean seeds by using a single integrating sphere system and a reverse multiplication algorithm comprises: placing a soybean seed sample to be tested close to an exit window and an entrance window of a single integrating sphere on an optical slide rail, fixing the positions of the sample and the single integrating sphere, controlling the spot size of the light source on the surface of the soybean seed sample by moving the position of the optical fiber light source, and determining the minimum spot size of 19 mm by a vernier caliper to perform a single integrating sphere experiment in order to maximize the light intensity; The dark field spectrum, transmission and reflection reference spectra, and transmission and reflection spectra were obtained in sequence through a single integrating sphere experiment. The optical characteristic parameters of soybeans were obtained using the IAD algorithm: absorption coefficient and reduced scattering coefficient.

4. The soybean seed quality detection method based on fast spatial frequency domain imaging technology according to claim 2 is characterized in that: The method of obtaining characteristic wavelengths of soybean seeds based on the SPA algorithm and determining the optimal spatial frequency includes: obtaining experimental characteristic wavelengths with the aid of the SPA algorithm according to the absorption coefficient, the reduced scattering coefficient and the germination rate. Due to the limited range of the projector wavelength, the characteristic wavelengths are 501.55 nm, 615.42 nm and 545.12 nm; The computer is used to control the grating monochromator to output the light source with wavelengths of 501.55nm, 615.42nm, and 545.12nm to transmit to the projector, and MatlabR2022a is used to generate the frequency fx in the range of 10 to 120 (unit: m -1 ) between three phases (0, 2π / 3 and 4π / 3), where the frequency is 10, 5 (unit: m -1 ) is used to select the optimal spatial frequency for the span; the generated sinusoidal diagram is mapped onto the soybean sample, and the optimal spatial frequency is selected and determined after image processing and image comparison display.

5. The soybean seed quality detection method based on fast spatial frequency domain imaging technology according to claim 4 is characterized in that: The optimal spatial frequencies are 60, 75, 90 (unit: m -1 ).

6. The soybean seed quality detection method based on fast spatial frequency domain imaging technology according to claim 4 is characterized in that: The method forwardly acquires the reflected image of soybean seeds according to the spatial frequency domain imaging technology based on the acquired experimental characteristic wavelength and the optimal spatial frequency, including: transmitting three characteristic wavelengths to a projector together, installing a polarizing plate in front of the projector lens to eliminate the mirror reflection of the smooth surface of the soybean seeds, the camera and the projector are 10 degrees in the vertical direction, and the dark field image and the whiteboard image are collected in sequence; by adding a filter in front of the camera lens, the sinusoidal diagrams of three frequencies and three phases are projected on the surface of the pest bean seeds, and the reflected images of the soybean seeds at the three characteristic wavelengths are acquired in sequence.

7. The soybean seed quality detection method based on fast spatial frequency domain imaging technology according to claim 1 is characterized in that: the diffuse emission image of the soybean seed is obtained by image preprocessing and three-phase demodulation method according to the reflection image to determine the internal insect damage area; comprising: Perform image uniformity correction on the collected reflection image, and the calculation formula is as follows: Among them, I relatively is the image intensity after black and white correction, I source is the image intensity before correction, I bright is the image intensity of the reference white plate, I dark is the dark field image intensity; The region of interest (ROI) is extracted for the black and white corrected image, and the region of interest is set to 653≤x≤950, 341≤y≤562 and extracted; the image is smoothed, and a Gaussian low-pass filter is used to retain the low-frequency information of the image and eliminate the noise of the high-frequency segmentation. The kernel size is selected as 3*3; The soybean reflectance image is processed using the three-phase demodulation method: I(x,f x )=I DC (x,f x )+I AC (x,f x ) In the formula, I AC (x,f x ) and I DC (x,f x ) represent the reflection intensity of the AC image and the DC image respectively; the DC component is only related to the light source intensity and is not affected by the spatial frequency, while the AC component is not only related to the light source intensity but also to the projection frequency; based on the diffuse reflection image, the DC and AC are separated using the following equation: Where I1, I2 and I3 are the diffuse reflection image intensities obtained when the phase is 0, 2π / 3 and 4π / 3 respectively, M AC (x,f x ) is the amplitude envelope of diffuse reflection photon density; in order to make the image contrast stronger, a ratio image is introduced, and its calculation formula is as follows: Where γ is a proportional image, and the value of each pixel is between 0 and 1.

8. The soybean seed quality detection method based on fast spatial frequency domain imaging technology according to claim 1 is characterized in that: the optical characteristic parameters of soybeans are obtained by inverse inversion of spatial frequency domain imaging technology and single integrating sphere experiment, and error analysis is performed, including: Choose a healthy bean variety with known optical characteristic parameters as a reference measurement, and use the diffuse reflection formula of the medium surface: Where: is the proportional constant, R eff ≈0.0636n+0.668+0.71 / n-1.44 / n 2 is the effective reflection coefficient, n is the tissue refractive index, a′=μ′ / μ tr is the reduced albedo; the diffuse reflectance R of the reference sample is calculated ref (f x ), and obtain the diffuse reflectance of the sample to be tested after correction as: In the formula, R ref (f x ) is the diffuse reflectance of the reference sample, M AC,ref (x,f x ) is the amplitude envelope of the diffuse reflection intensity of the reference sample, M AC (x,f x ) is the amplitude envelope of the diffuse reflection intensity of the sample to be tested; after the diffuse reflection of the sample to be tested is corrected, the diffuse reflection formula of the medium surface is nonlinearly fitted using the following equation to obtain μ a and μ′ s : R eff ≈0.0636n+0.668+0.71 / n-1.44 / n 2 m tr =μ a +μ′ s Where A is the proportional constant, R eff is the effective reflection coefficient, n is the sample refractive index, μ′ eff is the reduced attenuation coefficient, μ tr is the total attenuation coefficient.

9. The soybean seed quality detection method based on fast spatial frequency domain imaging technology according to claim 1 is characterized in that: it also includes using Macro-Recall, F1-Score and Accuracy to evaluate the accuracy and performance of the three models.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: the computer program is executed by a processor to implement the soybean seed quality detection method based on fast spatial frequency domain imaging technology as described in any one of items 1-9.

Citation Information

Patent Citations

  • Nondestructive testing method for subcutaneous recessive injury of peach

    CN115294095A

  • Cigarette defect detection method and device

    CN116756372A

  • Metal shaft surface defect identification method and system based on deep learning

    CN116862914A