Infrared-based method for detecting oil content of rice
By constructing a morphological scattering coupling index and optimizing the spectral preprocessing with an adaptive wavelet denoising threshold, the problem of low oil content detection accuracy in slender rice grains was solved, achieving high-precision and stable oil content detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RICE RES INST GUANGDONG ACADEMY OF AGRI SCI
- Filing Date
- 2026-03-27
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies are insufficient to meet the high-precision requirements for oil content detection in slender-grained rice. Traditional methods, due to fixed threshold noise reduction, cannot effectively preserve weak oil characteristic signals, resulting in low detection accuracy and poor stability.
By constructing a morphological scattering coupling index, dynamically adjusting the wavelet denoising threshold, and combining it with an effective signal-to-noise ratio gain index, the spectral preprocessing process is adaptively optimized to obtain high-quality target spectral data and input it into a quantitative regression model, thereby achieving accurate detection of oil content.
It significantly improves the accuracy and system stability of oil content detection in slender-grained rice, solves the detection bottleneck caused by differences in particle morphology, and balances sensitivity and fidelity.
Smart Images

Figure CN121917488B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural product testing technology, specifically relating to an infrared-based method for detecting the oil content in rice. Background Technology
[0002] Near-infrared spectroscopy, with its advantages of being non-destructive, rapid, and efficient, has been widely used in agricultural product quality testing, becoming the mainstream method for quantitative and qualitative analysis of components in grains, oils, fruits, vegetables, and cash crops. Traditional near-infrared spectroscopy analysis theory is largely based on the ideal assumption of homogeneous and regularly shaped sample particles, simplifying particles into spheres or near-sphere models. Furthermore, it commonly employs preprocessing methods such as standard normal variable transformation and multivariate scattering correction in the data processing stage, attempting to weaken or eliminate interference from physical scattering of the sample.
[0003] However, existing methods are insufficient to meet the high-precision requirements for detecting oil content in specific varieties of slender-grained rice. The length-to-width ratio of these rice grains is generally greater than 3, and their physical geometry differs significantly from that of conventional round-grained rice. Infrared light undergoes complex and non-uniform optical path and scattering path during penetration, reflection, and transmission, resulting in a noticeably irregular scattering effect. Furthermore, rice oil is highly concentrated in the germ and aleurone layer, with extremely low overall content and weak corresponding spectral characteristic signals. These signals are easily overwhelmed by severe baseline drift caused by differences in grain morphology, system noise, and random scattering interference, severely reducing the accuracy and stability of oil content prediction.
[0004] Current wavelet transform denoising methods often employ globally fixed thresholds, failing to incorporate the physical morphology of the samples into the algorithm and thus unable to adaptively match the spectral signal characteristics of slender-grained rice. This presents significant limitations in practical applications: a threshold that is too low results in incomplete removal of scattering noise, leaving baseline interference significant; a threshold that is too high leads to over-filtering, causing weak but crucial oil characteristic peaks to be misjudged as noise and filtered out, drastically reducing model accuracy and robustness. Therefore, there is an urgent need for a detection method that can couple the physical morphological characteristics of rice grains and adaptively optimize the spectral preprocessing workflow to specifically address the technical challenges of low accuracy and poor stability in oil detection of slender-grained rice. Summary of the Invention
[0005] This invention provides an infrared-based method for detecting the oil content in rice, which solves the technical problems of low detection accuracy caused by severe infrared spectral scattering due to the slender shape of rice grains and the difficulty in preserving weak oil characteristic signals by using fixed threshold noise reduction.
[0006] This invention provides an infrared-based method for detecting oil content in rice, comprising the following steps:
[0007] S1. Acquire the infrared spectral data and projection image of the rice sample to be tested, and calculate the average length, average width, spectral baseline shift, and total absorbance across the entire wavelength band of the rice sample to be tested.
[0008] S2. Based on the ratio of average length to average width, the spectral baseline shift, and the total absorbance across the entire band, a morphological scattering coupling index is constructed, and the adaptive wavelet denoising threshold is calculated using the morphological scattering coupling index.
[0009] S3. The infrared spectral data is denoised using an adaptive wavelet denoising threshold. The effective signal-to-noise ratio gain index is calculated to determine the optimal correction factor. Feature extraction optimization is performed on the denoised spectral data to obtain the target spectral data.
[0010] S4 inputs the target spectral data into a pre-trained quantitative regression model and outputs the oil content of the rice sample to be tested, thus achieving accurate detection of the oil content of rice.
[0011] The advantages are as follows: This invention simultaneously acquires the infrared spectrum and projection image of rice, and innovatively constructs a morphological scattering coupling index that couples physical morphology and spectral features, solving the problem of irregular scattering interference caused by slender rice grains in traditional infrared detection. Compared with the existing technology that uses uniform and fixed preprocessing parameters, this invention can dynamically adjust the wavelet denoising threshold according to the aspect ratio and baseline offset of different rice varieties, effectively extracting weak oil content feature signals masked by physical background noise, and significantly improving the accuracy and system stability of rice oil content detection in complex grain shape scenarios.
[0012] Furthermore, the morphological scattering coupling index is constructed based on the logic of interference of physical morphology on spectral signals. Specifically, the ratio of the average length to the average width of the rice sample to be tested is used as the core variable, and the spectral baseline drift and the total absorbance across the entire wavelength range are used as correction terms. The morphological scattering coupling index is positively correlated with the ratio of the average length to the average width, the spectral baseline drift, and the total absorbance across the entire wavelength range. This means that the morphological scattering coupling index is larger when the rice sample is longer and thinner, the baseline drift is greater, or the total energy level is higher, thus characterizing the stronger the spectral interference caused by the physical morphology of the current sample.
[0013] Its effect is as follows: By using the average aspect ratio as the core variable and combining it with the energy level to construct a coupling index, this invention establishes a quantitative mapping logic between physical geometry and spectral interference intensity. Compared with the existing technology that ignores the differences in particle morphology, this invention can accurately characterize the irregular optical path changes caused by slender particles, providing scientific interference intensity feedback for subsequent adaptive denoising and ensuring targeted processing of high scattering samples.
[0014] Furthermore, the adaptive wavelet denoising threshold is calculated using the morphological scattering coupling index, specifically including:
[0015] The baseline noise level estimate is determined based on the high-frequency detail coefficients of the spectral data.
[0016] The morphological scattering coupling index is used to nonlinearly and dynamically adjust the estimate of the basic noise level to obtain the final adaptive wavelet denoising threshold.
[0017] The adjustment logic is as follows: through the mapping relationship of the hyperbolic tangent function, when the morphological scattering coupling index increases, the adjustment coefficient increases accordingly, thereby increasing the adaptive wavelet denoising threshold to enhance the denoising effect on samples with high scattering interference; when the morphological scattering coupling index is small, the adjustment coefficient tends to the basic level, so that the adaptive wavelet denoising threshold is kept at a low level to preserve weak feature signals.
[0018] Its effects are as follows: This invention utilizes the hyperbolic tangent function to perform nonlinear dynamic adjustment of the denoising threshold, realizing a tailored signal processing. Compared with the globally fixed threshold setting in the prior art, this invention can enhance the denoising power to eliminate baseline rise when facing slender rice with high scattering interference, while maintaining a low threshold to completely preserve the weak oil characteristic peaks when facing regular round rice, thus balancing the sensitivity and fidelity of detection.
[0019] Furthermore, the effective signal-to-noise ratio gain is calculated to evaluate the denoising effect and signal quality. The specific logic is as follows:
[0020] The basic signal-to-noise ratio term is constructed based on the ratio of the signal intensity of the denoised spectrum to the energy of the filtered noise.
[0021] The reciprocal of the morphological scattering coupling index is introduced as a weighting correction term;
[0022] The effective signal-to-noise ratio gain index is positively correlated with the signal intensity of the denoised spectrum and negatively correlated with the filtered noise energy and morphological scattering coupling index. Thus, under the same signal-to-noise ratio conditions, the gain weight of high scattering interference samples is reduced, and the characteristics of low interference samples are preferentially screened.
[0023] Its effect is as follows: By introducing the reciprocal of the morphological scattering coupling index as a weight correction, this invention constructs an effective signal-to-noise ratio gain index. Compared with the traditional signal-to-noise ratio evaluation, this invention can actively screen bands and samples that are less affected by physical morphology and have purer chemical characteristics during the feature extraction stage, thereby reducing the prediction bias caused by morphological differences at the source of the model and improving the robustness of the regression model.
[0024] Furthermore, the infrared spectral data of the rice samples to be tested are obtained, including: acquiring the spectrum using a Fourier transform near-infrared spectrometer in diffuse reflectance mode, scanning each sample a preset number of times and taking the average value as the original spectral data vector.
[0025] Its effect is that the present invention obtains a high signal-to-noise ratio original spectral vector by averaging multiple scans in diffuse reflection mode. Compared with single acquisition, this method can not only more comprehensively cover the surface features of rice samples, but also initially suppress random noise from the instrument end, laying a high-quality data foundation for subsequent precise denoising based on morphological coupling.
[0026] Further, the calculation of the spectral baseline shift includes: selecting a stable region in the infrared spectral data with no characteristic absorption at both ends, calculating the absolute value of the absorbance difference between the two ends of the stable region, and using the absolute value as the spectral baseline shift.
[0027] Its effect is that the present invention quantifies baseline drift by calculating the difference in absorbance between the stable regions at both ends of the spectrum, providing an intuitive means of measuring physical interference. Compared with general baseline correction, this method is specifically designed to quantify the background rise caused by particle surface scattering, so that the morphological scattering coupling index can more realistically reflect the degree to which the optical path is affected by the sample geometry.
[0028] Furthermore, the baseline noise level estimate is obtained by performing discrete wavelet decomposition on the original spectrum and taking a preset multiple of the median of the absolute values of the first-level detail coefficients; the reference constant used in the nonlinear dynamic adjustment is the mean of the morphological scattering coupling index of all samples in the historical training set.
[0029] Its effects are as follows: This invention determines the basic noise level and reference constant based on the first-level detail coefficients of discrete wavelet decomposition and the mean of the historical training set, which enhances the self-evolution ability of the algorithm. Compared with fixed parameters set by humans, this statistical estimation based on data distribution can automatically adapt to the background fluctuations of different environments and different batches of samples, making the adaptive denoising process more intelligent and automated.
[0030] Furthermore, feature extraction and optimization are performed on the denoised spectral data, including: processing the denoised spectral data using an orthogonal signal correction algorithm, and selecting the best band for establishing a regression model or determining the number of principal components for orthogonal signal correction based on the effective signal-to-noise ratio gain index.
[0031] Furthermore, the quantitative regression model is a partial least squares regression model. The input of the model is the processed target spectral data, and the output is the percentage of rice oil content.
[0032] Furthermore, an industrial macro camera or photoelectric through-beam sensor is set at the entrance of the spectral acquisition cavity. When rice grains pass through, their projected images are acquired. The length and width of each rice grain are extracted using image algorithms, and the average length and average width of the current batch of samples are calculated.
[0033] The beneficial effects are:
[0034] This invention establishes a mathematical mapping relationship between grain aspect ratio and spectral denoising threshold, overcoming morphological limitations. Addressing the severe scattering issue in infrared detection of slender-grained rice, it proposes an adaptive processing method based on the morphological scattering coupling index. The core logic involves constructing an interference index by measuring the rice's aspect ratio and spectral baseline drift, and then dynamically adjusting the wavelet denoising threshold using a hyperbolic tangent function. This method effectively preserves weak oil characteristic peaks while removing physical scattering noise, significantly improving the detection accuracy of complex-shaped samples. Unlike existing technologies with fixed preprocessing, this invention ensures the algorithm adapts to changes in sample morphology. It provides gentle, high-fidelity processing for round-grained rice and powerful denoising for slender-grained rice, balancing sensitivity and stability, and solving the technical bottleneck in near-infrared detection of slender-grained crops. Attached Figure Description
[0035] Figure 1 This is a flowchart of the infrared-based method for detecting oil content in rice according to the present invention.
[0036] Figure 2 This is a comparison diagram showing the impact of morphological scattering interference on the distribution of detection data in this invention.
[0037] Figure 3 This is a comparison chart of the actual and predicted values of the oil content detection accuracy in this invention. Detailed Implementation
[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0039] An embodiment of the infrared-based method for detecting oil content in rice provided by this invention:
[0040] like Figure 1 As shown, the infrared-based method for detecting oil content in rice includes the following steps:
[0041] S1. Acquire the infrared spectral data and projection image of the rice sample to be tested, and calculate the average length, average width, spectral baseline shift, and total absorbance across the entire wavelength band of the rice sample to be tested.
[0042] This step aims to simultaneously acquire spectral and physical morphological information of rice, providing a data foundation for subsequent correlation analysis.
[0043] Specifically, a Fourier transform near-infrared spectrometer was used to acquire the spectra of the rice samples under test in diffuse reflectance mode. The wavelength range was set to 900 nm to 1700 nm, with a resolution of 8 nm. Each sample was scanned 32 times and the average value was taken to obtain the raw spectral data vector.
[0044] Meanwhile, an industrial macro camera or photoelectric beam sensor is set at the entrance of the spectral acquisition cavity. When rice grains pass through, their projected images are acquired. The length and width of each rice grain are extracted through image algorithms, and the average length and average width of the current batch of samples are calculated.
[0045] Furthermore, the absorbance difference between the stable regions at both ends of the spectrum without characteristic absorption is selected as a characterization of physical baseline drift.
[0046] For example, suppose the average length of a batch of Guangdong silk rice samples is... mm, average width The collected spectrum has an absorbance of 0.45 at 1650 nm and an absorbance of 0.35 at 950 nm. Therefore, the baseline shift is... The sum of absorbance values across the entire wavelength range. The calculated value is 500.
[0047] By simultaneously acquiring spectral and physical morphology data, not only was the carrier information of chemical components obtained, but the geometric characteristics of the sample were also clarified, providing accurate raw data support for subsequent elimination of scattering interference caused by morphology.
[0048] S2. Based on the ratio of average length to average width, the spectral baseline shift, and the total absorbance across the entire band, a morphological scattering coupling index is constructed, and the adaptive wavelet denoising threshold is calculated using the morphological scattering coupling index.
[0049] This step is the core of the invention. By constructing a mathematical model, the degree of interference of physical morphology on spectral signals is evaluated, and the denoising parameters are dynamically adjusted accordingly.
[0050] Specifically, starting with the initial data, the analysis suggests that: the thinner and longer the rice plants, the more random the optical path scattering; the higher the spectral baseline rise, the stronger the physical background interference. To assess this interference, the following relationship was constructed:
[0051]
[0052] In the formula, The morphological scattering coupling index is a dimensionless value that represents the intensity of spectral interference caused by the physical morphology of the current sample. This indicates the average length of the rice samples in the current batch being tested; This indicates the average width of the rice samples in the current testing batch; Indicates the amount of spectral baseline shift; The total absorbance across the entire spectrum represents the total energy level; the formula includes... This is to prevent mathematical calculation errors caused by variables being 0 or negative.
[0053] Logically speaking, It is the core of the independent variable; when this ratio increases, The linear increase indicates enhanced scattering interference; and As a correction, further amplification is applied when baseline drift is large or total absorbance is abnormally high. value.
[0054] Continuing with the data from the above embodiments: , Therefore, the aspect ratio is 3.1; , The morphological scattering coupling index is then... The calculation result is: The interference index of the sample was calculated to be approximately 20.21.
[0055] In obtaining Then, the threshold is dynamically adjusted nonlinearly. First, the original spectrum is decomposed using a discrete wavelet basis with three layers (Sym8 wavelet basis) to obtain high-frequency detail coefficients. Then, the threshold is calculated based on the following formula:
[0056]
[0057] In the formula, Indicates the adaptive wavelet denoising threshold; The basic noise level estimate representing the high-frequency coefficients is typically taken as 0.6745 times the median absolute value of the first-level detail coefficients. This represents the total number of sampling points for the spectral data; This represents the reference sensitivity constant, whose value is taken from all samples in the historical training set. Mean, used for normalization; This represents the hyperbolic tangent function, used to limit the adjustment range within a reasonable range.
[0058] Logically, when When it increases, The function value tends to 1, causing the coefficients inside the parentheses to tend to 2, which means the threshold is doubled, thus strengthening the noise reduction effect.
[0059] Assumption The estimate is 0.002. Reference constant ;but ; The adjustment coefficient is Basic threshold section Adaptive wavelet denoising threshold .
[0060] As can be seen, due to the large aspect ratio of the sample, the threshold is dynamically amplified by about 1.765 times, which can more effectively filter out scattering noise.
[0061] By constructing a morphological scattering coupling index and mapping it to a denoising threshold, personalized and precise processing of rice samples with different morphologies is achieved, avoiding the problems of under-denoising or past noise caused by a fixed threshold, and can adaptively eliminate physical background interference.
[0062] S3. The infrared spectral data is denoised using an adaptive wavelet denoising threshold. The effective signal-to-noise ratio gain index is calculated to determine the optimal correction factor. Feature extraction optimization is performed on the denoised spectral data to obtain the target spectral data.
[0063] This step utilizes the calculated The wavelet coefficients are subjected to soft thresholding, and the spectrum is reconstructed through inverse wavelet transform to obtain the denoised spectral data. To further isolate optical path variations unrelated to chemical composition, orthogonal signal correction is employed. However, before performing orthogonal signal correction, the signal quality is evaluated using denoised data to determine the optimal correction factor.
[0064] The effective signal-to-noise ratio gain metric is constructed based on the following relationship:
[0065]
[0066] In the formula, This represents the effective signal-to-noise ratio gain. Indicates the denoised spectrum The variance represents the signal intensity of the denoised spectrum; This represents the sum of squares of the differences between the original spectrum and the denoised spectrum, i.e., the noise energy that has been filtered out. This represents the magnification factor, which is a constant, for example, 100, used to adjust the numerical magnitude for easier observation. This represents the morphological scattering coupling index calculated in the preceding steps.
[0067] Assuming the signal strength of the denoised spectrum Filtered noise energy Magnification factor And the aforementioned ,but .
[0068] If another sample has the same signal-to-noise ratio, but If it is only 2, then its A significantly higher value indicates a more reliable characteristic, and this index can be used to screen for the optimal band or determine the principal components for orthogonal signal correction.
[0069] By introducing a signal-to-noise ratio gain index corrected by the interference index, unreliable features that are greatly affected by physical morphology can be further eliminated during the feature extraction stage, ensuring that the signal input to the model has extremely high purity and chemical correlation.
[0070] S4 inputs the target spectral data into a pre-trained quantitative regression model and outputs the oil content of the rice sample to be tested, thus achieving accurate detection of the oil content of rice.
[0071] Using spectral data that has undergone S2 adaptive denoising and S3 optimization as input, and the actual oil content measured by laboratory standard chemical methods such as Soxhlet extraction as output, a partial least squares regression model is established.
[0072] During actual testing, the system automatically identifies rice grain shape and calculates in real time. It automatically calls the corresponding threshold processing spectrum, and inputs it into the model to obtain a high-precision percentage of oil content.
[0073] Reference Figure 2 This paper compares the impact of morphological scattering interference on the distribution of detection data. The horizontal axis represents the aspect ratio of rice grains, and the vertical axis represents the spectral characteristic deviation. Existing technologies show a clear divergence of data points from the lower left to the upper right. As the aspect ratio increases, the deviation increases significantly, indicating that existing technologies cannot resist morphological interference. The data points of the method of this invention are distributed in horizontal stripes, closely adhering to the baseline where the vertical axis is 0. Regardless of changes in the aspect ratio, the deviation remains at an extremely low level, directly demonstrating that this invention successfully decouples physical morphology from chemical detection results.
[0074] Reference Figure 3 The graph shows a comparison of oil content detection accuracy. The horizontal axis represents the actual value, and the vertical axis represents the predicted value. Existing technologies are scattered on both sides of the ideal reference line, forming a relatively wide distribution band. The present invention is tightly adhering to the reference line, forming an extremely thin straight line, which intuitively demonstrates the high accuracy and high stability of the present invention in quantitative oil content prediction.
[0075] By inputting high-quality target spectral data into the regression model, oil content prediction values unaffected by particle morphology can be obtained, enabling accurate detection of oil content in slender-grained rice and solving a detection challenge in the industry.
[0076] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.
Claims
1. An infrared-based method for detecting oil content in rice, characterized by, Includes the following steps: S1. Acquire the infrared spectral data and projection image of the rice sample to be tested, and calculate the average length, average width, spectral baseline shift, and total absorbance across the entire wavelength band of the rice sample to be tested. S2. Based on the ratio of average length to average width, the spectral baseline shift, and the total absorbance across the entire band, a morphological scattering coupling index is constructed, and the adaptive wavelet denoising threshold is calculated using the morphological scattering coupling index. The morphological scattering coupling index is constructed based on the logic of physical morphology interfering with spectral signals. Specifically, the ratio of the average length to the average width of the rice sample to be tested is used as the core variable, and the spectral baseline drift and the sum of absorbance across the entire wavelength band are used as correction terms. The morphological scattering coupling index is positively correlated with the ratio of average length to average width, the amount of spectral baseline drift, and the total absorbance across the entire wavelength range. This means that the morphological scattering coupling index is larger when the rice sample is longer and thinner, the baseline drift is greater, or the total energy level is higher, thus characterizing the intensity of spectral interference caused by the physical morphology of the current sample. The adaptive wavelet denoising threshold is calculated using the morphological scattering coupling index, including: The baseline noise level estimate is determined based on the high-frequency detail coefficients of the spectral data. The morphological scattering coupling index is used to nonlinearly and dynamically adjust the estimate of the basic noise level to obtain the final adaptive wavelet denoising threshold. The adjustment logic is as follows: through the mapping relationship of the hyperbolic tangent function, when the morphological scattering coupling index increases, the adjustment coefficient increases accordingly, thereby increasing the adaptive wavelet denoising threshold to enhance the denoising effect on samples with high scattering interference; when the morphological scattering coupling index is small, the adjustment coefficient tends to the basic level, so that the adaptive wavelet denoising threshold is kept at a low level to preserve weak feature signals. Adaptive wavelet denoising threshold is: This represents the baseline noise level estimate for the high-frequency coefficients; This represents the total number of sampling points for the spectral data; This represents the reference sensitivity constant, whose value is taken from all samples in the historical training set. Mean, used for normalization; Represents the hyperbolic tangent function; The morphological scattering coupling index is a dimensionless value that represents the intensity of spectral interference caused by the physical morphology of the current sample. S3. The infrared spectral data is denoised using an adaptive wavelet denoising threshold. The effective signal-to-noise ratio gain index is calculated to determine the optimal correction factor. Feature extraction optimization is performed on the denoised spectral data to obtain the target spectral data. S4 inputs the target spectral data into a pre-trained quantitative regression model and outputs the oil content of the rice sample to be tested, thus achieving accurate detection of the oil content of rice.
2. The infrared-based method for detecting oil content in rice according to claim 1, characterized in that, The effective signal-to-noise ratio (SNR) gain is calculated to evaluate the denoising effect and signal quality. The specific logic is as follows: The basic signal-to-noise ratio term is constructed based on the ratio of the signal intensity of the denoised spectrum to the energy of the filtered noise. The reciprocal of the morphological scattering coupling index is introduced as a weighting correction term; The effective signal-to-noise ratio gain index is positively correlated with the signal intensity of the denoised spectrum and negatively correlated with the filtered noise energy and morphological scattering coupling index. Thus, under the same signal-to-noise ratio conditions, the gain weight of high scattering interference samples is reduced, and the characteristics of low interference samples are preferentially screened.
3. The infrared-based method for detecting oil content in rice according to claim 1, characterized in that, To obtain the infrared spectral data of the rice sample to be tested, the following steps are taken: the spectrum is acquired using a Fourier transform near-infrared spectrometer in diffuse reflectance mode, and each sample is scanned repeatedly a preset number of times and the average value is taken as the original spectral data vector.
4. The infrared-based method for detecting oil content in rice according to claim 1, characterized in that, The calculation of the spectral baseline shift includes: selecting a stable region in the infrared spectral data with no characteristic absorption at both ends, calculating the absolute value of the absorbance difference between the two ends of the stable region, and using the absolute value as the spectral baseline shift.
5. The infrared-based method for detecting oil content in rice according to claim 1, characterized in that, The baseline noise level estimate is obtained by performing discrete wavelet decomposition on the original spectrum and taking a preset multiple of the median of the absolute values of the first-level detail coefficients; the reference constant used in the nonlinear dynamic adjustment is the mean of the morphological scattering coupling index of all samples in the historical training set.
6. The infrared-based method for detecting oil content in rice according to claim 1, characterized in that, Feature extraction and optimization of the denoised spectral data include: processing the denoised spectral data using an orthogonal signal correction algorithm, and selecting the best band for establishing a regression model or determining the number of principal components for orthogonal signal correction based on the effective signal-to-noise ratio gain index.
7. The infrared-based method for detecting oil content in rice according to claim 1, characterized in that, The quantitative regression model is a partial least squares regression model. The input of the model is the processed target spectral data, and the output is the percentage of rice oil content.
8. The infrared-based method for detecting oil content in rice according to claim 1, characterized in that, An industrial macro camera or photoelectric through-beam sensor is set at the entrance of the spectral acquisition cavity. When rice grains pass through, their projected images are acquired. The length and width of each rice grain are extracted using image algorithms, and the average length and average width of the current batch of samples are calculated.