A fine inversion method for wheat rhizosphere soil nitrogen content based on hyperspectral imaging technology
Patent Information
- Application Number
- CN202611076643.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-23
AI Technical Summary
[0005]综上所述,现有技术缺乏在室内培养条件下,能够在不破坏根土原位结构的前提下,有效克服根际微域复杂干扰、实现关键生育期连续原位扫描与氮素空间精细分布量化的综合手段
本发明以小麦根际土壤剖面为研究对象,结合高光谱技术,依托无损原位培养装置获取小麦关键生育期根际土壤剖面的高光谱图像,并对采集得到的原始高光谱图像进行白板/暗电流辐射校正,以消除光照不均、系统响应差异及暗电流噪声对反射率提取的影响,获得相对反射率图像;随后采用ENVI 5.6软件对相对反射率图像进行几何校正,使图像像元与根际土壤剖面的实际空间位置相匹配;针对根际剖面中小麦根系像元对土壤光谱提取造成的干扰,基于R1300/R1461双波段反射率比值阈值法的根系像元识别,并在MATLABR2020a中将根系像元赋值为空值以完成根系掩膜处理,从而获得剔除根系干扰后的土壤原始光谱;通过对校正掩膜处理后的原始光谱进行多种数学变换,建立最优参数反演模型,实现了对小麦根际土壤含量空间分布的精细、动态反演。
Smart Images

Figure CN122961923A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of soil property detection technology, and in particular relates to a method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology. Background Technology
[0002] Wheat is an important food crop in my country, and its growth, development, yield, and quality are closely dependent on the nitrogen supply from the rhizosphere soil. As the core micro-domain of interaction between plant roots, soil, and microorganisms, the rhizosphere exhibits significantly different nitrogen speciation and spatial distribution characteristics compared to non-rhizosphere soils. Accurately obtaining the spatial distribution gradient of soil nitrogen within the rhizosphere micro-domain and elucidating its dynamic evolution during different key growth stages of wheat is crucial for revealing the mechanism of crop nutrient absorption and achieving precision fertilization. However, existing detection technologies face the following insurmountable technical bottlenecks when dynamically and accurately quantifying the "rhizosphere micro-domain": First, traditional destructive sampling cannot preserve the in-situ structure, thus disrupting the spatiotemporal continuous tracing of the same profile. Currently, agricultural research on rhizosphere nitrogen detection mainly relies on destructive sampling (such as rhizosphere soil shaking) combined with laboratory chemical extraction. This destructive sampling method not only completely destroys the original matrix state and root structure of the soil, leading to confusion between rhizosphere and non-rhizosphere soil, but also masks the extremely steep nutrient consumption or enrichment gradient within millimeters of the root surface. More seriously, physical sampling makes it impossible to conduct continuous time-series observations of key wheat growth stages (such as tillering, jointing, and grain-filling stages) at the same physical location, preventing researchers from obtaining the true dynamic evolution trajectory of nitrogen as the root system grows and develops.
[0003] Secondly, existing hyperspectral inversion techniques lack in-situ observation methods, making it difficult to achieve continuous dynamic quantification at the microscale. In recent years, hyperspectral imaging technology has been introduced into soil nutrient detection due to its advantages of speed, non-destructiveness, and imaging capabilities. However, most existing soil nitrogen hyperspectral imaging detections target surface soil samples or collected profile samples. When facing microscopic rhizosphere research, existing technologies lack effective observation methods specifically for in-situ indoor cultivation (such as the lack of observation mechanisms for non-destructive exposure of the rhizosphere profile), making it impossible to directly obtain hyperspectral images of deep soil profiles without damaging the root-soil interface. This results in most existing detections remaining at a "static" level, failing to realize the potential of hyperspectral imaging technology for in-situ dynamic monitoring.
[0004] Finally, the rhizosphere microdomain experiences severe spectral background interference, making it difficult for conventional linear inversion strategies to resolve complex overlapping signals. Wheat rhizosphere soil, as a highly complex micromatrix, is influenced by the combined effects of root systems, high concentrations of root exudates, and dramatic water gradients. During in-situ hyperspectral scanning, these complex physicochemical factors lead to extremely severe nonlinear interference, causing the weak spectral response of nitrogen to be submerged or shifted. Existing studies, such as dimensionality reduction and band selection, extract local characteristic bands, but in this highly heterogeneous microenvironment, key coupling feature information is easily missed. Therefore, it is urgent to introduce sophisticated spectral preprocessing strategies to effectively filter out background interference, addressing the unique strong noise mechanism of the rhizosphere. Furthermore, while preserving complete spectral information across all bands, it is crucial to deeply couple machine learning algorithms with high-dimensional nonlinear mapping capabilities (such as LS-SVM and RF) to achieve continuous in-situ scanning of the rhizosphere microdomain during key growth stages and accurate quantification of the fine spatial distribution of nitrogen.
[0005] In summary, current technologies lack a comprehensive approach that, under indoor cultivation conditions, can effectively overcome complex interferences in the rhizosphere microdomain and achieve continuous in-situ scanning and precise spatial distribution quantification of nitrogen during key growth stages without disrupting the in-situ structure of the root soil. Therefore, there is an urgent need to develop a high-precision hyperspectral inversion method specifically tailored for wheat rhizosphere research. This method aims to overcome the limitations of traditional destructive sampling and static macroscopic detection, and meet the pressing needs of modern precision agriculture for research on the mechanisms of efficient nitrogen fertilizer utilization. Summary of the Invention
[0006] To address the aforementioned technical problems, this invention proposes a refined inversion method for nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology. This method can detect the spatial distribution of soil nitrogen content at different depths in the wheat rhizosphere. The design overcomes the limitations of traditional destructive sampling, effectively surviving complex background interference in the rhizosphere microdomain. It achieves accurate and dynamic quantification of the spatial gradient of nitrogen during key growth stages while preserving full-band spectral information. The "soil nitrogen" mentioned in this invention includes various forms of nitrogen present in the soil, such as total nitrogen, available nitrogen, nitrate nitrogen, and ammonium nitrogen. Total nitrogen refers to the total amount of nitrogen in the soil, mainly including organic nitrogen and inorganic nitrogen. Inorganic nitrogen mainly includes ammonium nitrogen, nitrate nitrogen, and nitrite nitrogen. Furthermore, available nitrogen, as an important indicator of the potential available nitrogen in the soil that can be utilized by crops, reflects the nitrogen content that can be released from some organic and inorganic nitrogen under alkaline conditions. Nitrate nitrogen and ammonium nitrogen are among the main forms of inorganic available nitrogen in the soil.
[0007] The method of this invention is applicable to the inversion analysis of nitrogen, such as total nitrogen, available nitrogen, and nitrate nitrogen. Given the consistency of different nitrogen forms in the hyperspectral inversion process, model construction method, and spatial mapping method, unless otherwise specified, the following explanation uses the inversion of soil available nitrogen content as an example, but this does not limit the scope of protection of this invention. This invention is also applicable to the fine inversion of other nitrogen forms such as total nitrogen and nitrate nitrogen in soil.
[0008] To achieve the above objectives, this invention provides a method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology, comprising: Hyperspectral images of wheat rhizosphere soil profiles were acquired using a non-destructive in-situ culture device during key growth stages of wheat. Perform white reference / dark reference radiometric correction on the hyperspectral image to obtain a reflectance image; The reflectance image is geometrically corrected, and the geometrically corrected reflectance image is then subjected to root masking processing. Based on the sampling depth and location of the soil samples, regions of interest were delineated in the reflectance images after geometric correction and root masking, and the average spectrum of each region of interest was extracted. The average spectrum was matched with the measured nitrogen content of the corresponding stratified soil samples to construct a spectral-nitrogen dataset. A machine learning model was trained using the aforementioned spectral-nitrogen dataset, and the optimal combination of spectral preprocessing method and machine learning model was selected through model performance evaluation to obtain the nitrogen inversion model. Based on the nitrogen inversion model, the pixel-level spectrum in the reflectance image to be inverted is predicted to obtain the predicted nitrogen content value corresponding to each effective soil pixel. The predicted nitrogen content values are arranged according to the original spatial coordinates of the corresponding pixels to obtain the spatial distribution results of nitrogen content in the rhizosphere soil profile. Based on the spatial distribution results, a nitrogen visualization image is generated to achieve a fine inversion and spatial representation of nitrogen content in wheat rhizosphere soil.
[0009] Optionally, the method for obtaining the reflectance image is as follows: R = (Raw - Dark) / (White - Dark); Where R is reflectance, Raw is the original image, Dark is the dark current image, and White is the white reference image; The reflectance image is used to characterize the relative reflectance information of each pixel in the rhizosphere soil profile at different spectral bands.
[0010] Optionally, the measured values of nitrogen content in soil samples may include: After the hyperspectral image acquisition was completed, soil samples were collected from top to bottom at 2.5 cm depth intervals. The nitrogen content of soil samples from each layer was determined by chemical analysis methods such as alkaline diffusion method. The measured values of the soil nitrogen content were obtained and used as label values in the model training and model validation process. The measured values were matched with the average spectra extracted at the corresponding sampling depth and sampling location to construct a spectral-nitrogen dataset.
[0011] Optionally, a machine learning model is trained using the aforementioned spectral-nitrogen dataset, and the optimal combination of spectral preprocessing method and optimal machine learning model is selected through model performance evaluation to obtain a nitrogen inversion model, including: Monte Carlo outlier removal was performed on the spectral-nitrogen dataset. The samples after outlier removal were sorted from smallest to largest according to the measured soil nitrogen content and divided into a modeling set and a prediction set according to a preset ratio. The processed dataset was subjected to six spectral preprocessing methods, including absorbance transformation, first-order derivative, second-order derivative, multivariate scattering correction, standard normal transformation, and Savitzky-Golay smoothing. Using preprocessed spectral data as input and measured nitrogen content as output, the machine learning model is trained to obtain the nitrogen inversion model. The machine learning model includes a partial least squares regression model, a least squares support vector machine regression model, and a random forest regression model.
[0012] Optionally, arranging the predicted nitrogen content values according to the original spatial coordinates of the corresponding pixels to obtain the spatial distribution results of nitrogen content in the rhizosphere soil profile includes: The processed rhizosphere soil profile reflectance image is used as the image to be inverted. The spectral curves of the soil pixels are extracted and input into the nitrogen inversion model to obtain the predicted nitrogen content of the corresponding pixels. The predicted nitrogen content values of each soil pixel are arranged according to their original spatial coordinates to generate a two-dimensional matrix of rhizosphere soil profile nitrogen content distribution results. The two-dimensional matrix is visualized to generate a visualization image of nitrogen content in the rhizosphere soil profile, which is used to characterize the spatial distribution characteristics of nitrogen content in the depth and horizontal directions in the wheat rhizosphere soil profile.
[0013] Compared with the prior art, the present invention has the following advantages and technical effects: This invention focuses on wheat rhizosphere soil profiles. Using hyperspectral technology and a non-destructive in-situ culture device, hyperspectral images of the rhizosphere soil profiles during key wheat growth stages are acquired. The raw hyperspectral images are then subjected to whiteboard / dark current radiometric correction to eliminate the effects of uneven illumination, system response differences, and dark current noise on reflectance extraction, resulting in relative reflectance images. Subsequently, ENVI 5.6 software is used to perform geometric correction on the relative reflectance images, ensuring that the image pixels match the actual spatial positions of the rhizosphere soil profile. To address the interference caused by wheat root pixels in the rhizosphere profile on soil spectral extraction, a method based on R... 1300 / R 1461 Root pixel identification was performed using the dual-band reflectance ratio threshold method. In MATLAB R2020a, root pixels were assigned null values to complete root masking, thereby obtaining the original soil spectrum after removing root interference. By performing various mathematical transformations on the original spectrum after masking, an optimal parameter inversion model was established, realizing a fine and dynamic inversion of the spatial distribution of wheat rhizosphere soil content.
[0014] This invention utilizes hyperspectral imaging technology to acquire continuous spectral and spatial location information of wheat rhizosphere soil profiles. It enables the rapid retrieval of nitrogen content in wheat rhizosphere soil and generates nitrogen spatial distribution maps and dynamic visualization results. This method overcomes the shortcomings of traditional laboratory chemical analysis, such as long detection cycles, high destructiveness, and difficulty in characterizing rhizosphere spatial heterogeneity. It also overcomes the limitations of conventional spectral detection in terms of limited spatial resolution and difficulty in accurately depicting the nitrogen distribution characteristics of the rhizosphere profile. This provides technical support for dynamic monitoring of rhizosphere nitrogen and precise water and fertilizer management at different growth stages of wheat. Attached Figure Description
[0015] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. Specifically, the soil nitrogen inversion results shown in the drawings are illustrated using alkaline-available nitrogen as an example; however, the method of this invention is equally applicable to the inversion analysis of total nitrogen and nitrate nitrogen. The content of the drawings should not be construed as limiting the scope of protection of this application. In the drawings: Figure 1 This is a flowchart of a method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology according to an embodiment of the present invention; Figure 2 This is a flowchart of hyperspectral preprocessing of wheat root soil profile according to an embodiment of the present invention; wherein (a) is a geometric correction diagram, (b) is a masking result diagram, (c) is an average spectrum extraction diagram, and (d) is an image cropping diagram. Figure 3These are hyperspectral curves of soil samples from embodiments of the present invention, wherein (a) is a visible light spectrum curve and (b) is a near-infrared spectrum curve. Figure 4 This is a scatter plot of predicted and measured values of soil available nitrogen content based on the optimal model in an embodiment of the present invention. Figure 5 This is a diagram showing the changes in wheat root system during key growth stages under surface irrigation treatment according to an embodiment of the present invention. Figure 6 This is a diagram showing the changes in wheat root system during the key growth period of the bottom water absorption treatment according to an embodiment of the present invention; Figure 7 This is an inversion diagram of the alkaline nitrogen content in the soil profile of wheat roots during the key growth period of the surface irrigation treatment according to an embodiment of the present invention; Figure 8 This is an inversion diagram of the alkaline nitrogen content in the soil profile of wheat roots during the key growth period of the bottom water absorption treatment according to an embodiment of the present invention; Figure 9 This is a distribution map of predicted values of soil available nitrogen extracted from the root soil profile inversion map of wheat during the key growth period of this invention, wherein (a) is the distribution map of predicted values for the top watering treatment and (b) is the distribution map of predicted values for the bottom water absorption treatment. Detailed Implementation
[0016] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The following description uses the inversion of alkaline nitrogen content in wheat rhizosphere soil as an example, and will be explained in detail with reference to the accompanying drawings and embodiments. However, the technical solution of this application is not limited to alkaline nitrogen, but is also applicable to other soil nitrogen forms such as total nitrogen and nitrate nitrogen.
[0017] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0018] This embodiment proposes a method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology, such as... Figure 1 As shown, the specific steps include: Hyperspectral images of wheat rhizosphere soil profiles were obtained by in-situ non-destructive collection using indoor chamber culture. The hyperspectral image is processed by black and white correction and other methods to obtain a reflectance image; To address the spectral background interference in the rhizosphere microdomain, the pixel spectra of the reflectance image are preprocessed for noise reduction. While preserving the complete spectral information across the entire band, the spectral-nitrogen dataset is obtained by combining the measured values of soil nitrogen content. A machine learning model with high-dimensional nonlinear mapping capability was trained using the aforementioned spectral-nitrogen dataset to obtain a full-band nitrogen inversion model for the rhizosphere. Based on the nitrogen inversion model, the spectrum of the reflectance image is predicted to obtain the spatial distribution of nitrogen content in the rhizosphere soil profile. A nitrogen visualization image is generated based on the spatial distribution results, enabling a precise inversion of the nitrogen content in the rhizosphere soil of wheat.
[0019] Specifically, this embodiment can perform inversion analysis on the spatial distribution of nitrogen content in wheat rhizosphere soil at different depths, reducing reliance on extensive destructive sampling and offline chemical determination, improving the efficiency and precision of the spatial distribution characterization of rhizosphere soil nitrogen, and reducing reagent consumption and detection costs to some extent.
[0020] The detection targets of this embodiment cover various forms of nitrogen in soil, including total nitrogen, alkaline available nitrogen and nitrate nitrogen. This embodiment uses alkaline available nitrogen as the specific inversion target for illustration.
[0021] Further, processing the hyperspectral image to obtain a reflectance image includes: During the critical growth period of wheat, a push-broom hyperspectral imaging system was used to acquire raw hyperspectral images of rhizosphere soil profiles in preset bands. Before each image acquisition, a white reference image and a dark reference image are acquired. The white reference image is used to correct for uneven light source intensity and differences in system response, and the dark reference image is used to characterize camera dark current and background noise. Based on the original hyperspectral image, white reference image, and dark reference image, white board / dark current radiation correction is performed to obtain a relative reflectance image.
[0022] Specifically, the first step was sample cultivation and hyperspectral image acquisition. Wheat samples were cultivated using customized root boxes with different water supply methods and multiple nitrogen application gradients. During the critical growth stages of wheat, raw hyperspectral images of the root box profiles were acquired using a hyperspectral imaging system, and relative reflectance images were calculated using whiteboard / dark current radiative correction, providing high-quality raw data for subsequent inversion modeling.
[0023] More specifically, soil sample collection and nitrogen content determination were carried out. Immediately after acquiring hyperspectral images, soil samples were collected at preset depths. Standard chemical analysis methods, such as the alkaline diffusion method, were used to determine the content of available nitrogen and other forms of nitrogen, obtaining accurate measured values of soil nitrogen content. These values served as the true label data for the hyperspectral inversion model. In this embodiment, available nitrogen content was selected as the true label data for the hyperspectral inversion model. The hyperspectral curves of the soil samples are shown below. Figure 3 (a) and Figure 3 As shown in (b).
[0024] Furthermore, during the model building phase, obtaining the measured values of soil nitrogen content includes: After the hyperspectral images were acquired, soil samples were collected from top to bottom in layers at 2.5 cm depth intervals for parallel samples in the in-situ culture system. The nitrogen content of each soil sample was determined using standard chemical analysis methods and used as the true label value.
[0025] Specifically, the hyperspectral images are preprocessed, including geometric correction and root masking. Specifically, ENVI 5.6 software is used to perform geometric correction on the relative reflectance images to eliminate spatial distortions generated during image acquisition and to match the actual spatial positions of image pixels with the rhizosphere soil profile; subsequently, based on R... 1300 / R 1461 The dual-band reflectance ratio threshold method was used to identify wheat root pixels. In MATLAB R2020a software, the identified root pixels were assigned null values to complete the root region masking process, so as to remove the interference of roots on soil spectral extraction and obtain hyperspectral image data that only reflects the characteristics of the soil region.
[0026] Regions of interest (ROIs) are segmented and average spectra are extracted. On the preprocessed image, rectangular ROIs are precisely selected based on soil sampling location and depth, and the average spectral curves of each region are extracted. These average spectral curves are then matched with the measured values of available nitrogen content in soil samples at the corresponding depths to establish a spectral dataset that corresponds one-to-one with the measured values of available nitrogen content in the soil. This provides a data foundation for constructing a quantitative nitrogen content inversion model.
[0027] Furthermore, Monte Carlo outlier removal is performed on the spectral-nitrogen dataset; Six spectral transformations were applied to the dataset after outlier removal: absorbance transformation, first-order derivative, second-order derivative, multivariate scattering correction, Savitzky-Golay smoothing, and standard normal transformation. Using the transformed spectrum as input and the measured nitrogen content as output, the machine learning model is trained to obtain the nitrogen inversion model, wherein the machine learning model includes a partial least squares regression model, a least squares support vector machine regression model, and a random forest regression model.
[0028] Specifically, based on the acquired average soil spectral data, various spectral preprocessing methods were implemented, and different nitrogen inversion models were constructed respectively. Through model training and performance evaluation, the model with high correlation to soil available nitrogen content and better prediction performance was selected as the optimal inversion model.
[0029] Among multiple spectral prediction models, the model with the best prediction performance for soil available nitrogen content was selected. Continuously observed hyperspectral images were used as model input to achieve accurate inversion of available nitrogen content. Finally, the predicted content of available nitrogen in soil at different growth stages was output, and visual images of available nitrogen profiles at different stages were generated to intuitively present the spatial distribution characteristics of nitrogen.
[0030] In further implementation, the process of creating the hyperspectral prediction model includes: The Monte Carlo method is used to detect outliers in all average spectral data to determine whether there are abnormal average spectral curves in the dataset. If an abnormal curve is detected, it is removed from the original dataset to ensure the quality of the dataset. After outlier processing is completed, the effective average spectral data obtained from the screening are sorted in ascending order of the measured content of alkaline nitrogen. In every four consecutive samples, the first three samples are assigned to the modeling set and the fourth sample is assigned to the prediction set, thus constructing the modeling set and the prediction set in a 3:1 ratio, providing a data foundation for subsequent model construction and performance verification.
[0031] Furthermore, the divided datasets were subjected to six different spectral preprocessing methods: Absorbance Transformation, First Derivative, Second Derivative, Multiplicative Scatter Correction, Standard Normal Variation, and Savitzky-Golay Smoothing.
[0032] Furthermore, the average spectral datasets obtained by different preprocessing methods were used as predictor variables, and the measured soil available nitrogen content was used as the response variable to establish a quantitative regression relationship between hyperspectral data and soil available nitrogen content. The training models used included partial least squares regression (PLSR), least squares support vector machine (LS-SVM), and random forest (RF). The accuracy evaluation indicators of the models included the coefficient of determination, root mean square error, and relative analysis error.
[0033] Furthermore, by combining the coefficient of determination, root mean square error, and relative analysis error, the accuracy and predictive ability of the parameter inversion models formed by different preprocessing methods and different machine learning model combinations are evaluated, and the best spectral preprocessing method and the optimal inversion model are selected for subsequent pixel-level inversion mapping.
[0034] Furthermore, based on the nitrogen inversion model, the reflectance image spectrum is predicted to obtain the spatial distribution results of nitrogen content in the rhizosphere soil profile, including: Input the spectral curve of each effective pixel in the reflectance image into the nitrogen inversion model, and output the predicted value of nitrogen content corresponding to the pixel; The predicted nitrogen content values corresponding to the pixels are arranged according to the original spatial coordinates to generate a two-dimensional gray-scale matrix form of rhizosphere soil profile nitrogen content distribution map.
[0035] Specifically, in a further implementation, the output process of the visualized image is as follows: Soil hyperspectral images are acquired based on soil profile samples, and the spectral reflectance information of each effective soil pixel is extracted from these images to form a comprehensive dataset including spatial coordinates and spectral reflectance curves. The pixel-level spectral reflectance curves from this comprehensive dataset are input into an optimal nitrogen inversion model. The model calculates the predicted soil available nitrogen content for each pixel and generates a soil profile available nitrogen content prediction matrix based on the original spatial coordinates of each pixel. This prediction matrix contains the spatial location information of each effective pixel and its corresponding predicted available nitrogen content; each effective pixel constitutes the main region of the predicted soil profile image, and the pixel spatial coordinates ensure a one-to-one correspondence between the nitrogen prediction results and the actual location of the rhizosphere soil profile.
[0036] Furthermore, the predicted matrix of available nitrogen content in the soil profile is processed using pseudo-color processing to obtain a visualized image of available nitrogen content in the soil profile. This visualized image is a color distribution map, used to visually characterize the spatial distribution features of available nitrogen content in the wheat rhizosphere soil profile.
[0037] In a further embodiment, based on the accuracy evaluation results of different models and the spatial distribution patterns of the inverted images, the optimal model combination for predicting the alkaline nitrogen content in wheat rhizosphere soil was determined to be a first-order differential (FD) preprocessing + least squares support vector machine (LS-SVM) model. Based on this optimal model, the alkaline nitrogen content was predicted for effective pixels at different depths in the rhizosphere soil profile, and the corresponding predicted values were extracted along the profile depth direction. A soil profile depth-alkaline nitrogen content prediction curve was plotted to analyze the variation of alkaline nitrogen content in wheat rhizosphere soil with profile depth. Simultaneously, the reliability of the model could be evaluated by comparing the predicted and measured values.
[0038] The following is a detailed description of this embodiment with reference to the accompanying drawings: This invention was carried out in a key laboratory for water-saving agriculture. Winter wheat was used as the research object. Two irrigation treatment methods were set up (surface irrigation and bottom water absorption), and data were collected at five key growth stages of wheat (such as seedling stage, jointing stage, booting stage, grain filling stage and maturity stage).
[0039] The method for fine inversion of alkaline nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology provided in this embodiment includes at least the following steps: Step 1: Sample cultivation and hyperspectral image acquisition: After multiple experiments, the dimensions of the root box were determined to be 20cm × 4cm × 50cm (length × width × height). The root box is made of PVC board with ventilation holes at the bottom, and nylon mesh is attached to it. The nylon mesh allows water to pass through freely, facilitating water absorption and drainage. The front of the root box (20cm × 50cm) has a detachable observation surface for periodically obtaining hyperspectral images of the rhizosphere soil profile and facilitating subsequent stratified sampling.
[0040] The soil samples were collected from the topsoil of farmland, air-dried, and sieved through a 2mm sieve before use. The soil type was alluvial soil, and the wheat variety was Aikang 58. This example included two factors: water supply method and nitrogen application rate. Water supply methods included surface irrigation and bottom water absorption. Nitrogen application was at four levels, with pure nitrogen application rates of 0 g, 0.2 g, 0.3 g, and 0.4 g per kilogram of dry soil, respectively. The nitrogen fertilizer source was urea. Each treatment was replicated five times, for a total of 40 root boxes. Phosphorus and potassium fertilizers were superphosphate and potassium sulfate, respectively, with P2O5 and K2O application rates of 0.15 g and 0.20 g per kilogram of dry soil, respectively. All fertilizers were used as basal fertilizers, evenly mixed into the soil before filling, and left to mature for approximately 10 days. After the fertilizers matured, they were filled according to the natural bulk density in the field, ensuring even distribution of soil within the boxes without gaps. Before sowing, all root boxes were placed in a water tank to absorb water from the bottom, and removed after the surface soil of the root boxes was moistened. Four wheat seeds were sown in each root box, and seedlings were thinned to two plants per seedling at the three-leaf stage. The wheat was cultured in a constant-temperature, light-controlled incubator with vernalization temperatures set at 14°C during the day and 4°C at night, and 25°C during the day and 16°C at night for other periods. After vernalization, water was applied using a combination of surface watering and bottom watering. Soil moisture content was monitored regularly by weighing, maintaining it between 65% and 85% of field capacity. Hyperspectral images of the rhizosphere soil profile were acquired at the wheat seedling, jointing, heading, grain-filling, and maturity stages.
[0041] In this embodiment, a pushbroom hyperspectral imaging system was used to acquire rhizosphere soil profile images, covering a spectral range of 400 nm to 1709 nm with a spectral resolution on the nanometer scale. The system was preheated for 30 minutes before scanning to ensure stable light source. Positioning marks were placed at 5 cm intervals along the edge of the enclosure before scanning for subsequent image geometric correction. The entire scanning process was conducted in a darkroom environment to avoid ambient light interference. The camera lens was positioned directly over the soil profile at a fixed distance to ensure the field of view covered the entire profile and the image was clear. Before each scan of the profile sample, a white reference image was obtained by scanning a standard diffuse white board, followed by a dark current image with the lens cap completely covering the lens. The relative reflectance (R) of the original hyperspectral image was calculated using the formula R = (Raw - Dark) / (White - Dark) to eliminate the influence of sensor dark current and light source inhomogeneity. The corrected hyperspectral data was saved in a three-dimensional data cube format (.raw or .hdr format), thus obtaining the hyperspectral image of the wheat rhizosphere soil profile. See also... Figure 1 .
[0042] Step 2: Soil sample collection and determination of available nitrogen content: To obtain data that corresponds one-to-one with the measured values of available nitrogen in the soil, this embodiment performs stratified sampling after completing the hyperspectral scan. Specifically, each treatment combination is equipped with 5 root boxes. One root box serves as a continuous observation root box, where non-destructive hyperspectral image acquisition is performed at the seedling, jointing, booting, grain-filling, and maturity stages, and destructive sampling is performed after the last scan at maturity. The other duplicate root boxes are used for staged destructive sampling, with one root box sampled after the hyperspectral scan at the seedling stage and the other root box sampled after the hyperspectral scan at the jointing stage.
[0043] Therefore, in this embodiment, hyperspectral data corresponding to the measured alkaline nitrogen content were obtained at the seedling stage, jointing stage, and maturity stage for model construction, training, and validation. The optimal model obtained from the training was further used for pixel-level inversion of hyperspectral images of five growth stages of the root box.
[0044] For soil profiles at the seedling, jointing, and maturity stages where spectral scanning was completed in Step 1, destructive sampling was immediately performed. During destructive sampling, the detachable observation surface on the front of the root box was removed, and soil samples were collected layer by layer from the upper to lower parts of the soil profile at 2.5 cm depth intervals, resulting in a total of 440 soil samples. The collected soil samples were placed in sealed plastic resealable bags and frozen for storage away from light. For the determination of available nitrogen, a portion of the soil samples was air-dried and ground under natural conditions, and then passed through a 2 mm sieve and a 100 mesh sieve. Subsequently, the available nitrogen content of the soil was determined using the alkaline diffusion method, and the measured value of available nitrogen for each soil sample was obtained and used as the true value label for model construction.
[0045] Step 3: Hyperspectral image preprocessing: Due to potential geometric distortions during pushbroom imaging, specialized software such as ENVI 5.6 was used to perform geometric correction on the acquired hyperspectral image based on the pre-set positioning markers from step one, ensuring that the image pixels matched the actual spatial positions of the rhizosphere soil profile. Simultaneously, to eliminate interference from wheat roots on the soil spectrum, root masking was applied to the hyperspectral image. For example... Figure 2 As shown in (a)-(d).
[0046] The specific operation is as follows: First, based on the difference in reflectance of roots and soil at different wavelengths, R... 1300 / R 1461 Root pixels were identified using a dual-band reflectance ratio thresholding method. Subsequently, in MATLAB R2020a software, the identified root pixels were assigned null values to perform root region masking, thus avoiding interference from root pixels on the soil spectrum during average spectrum extraction. Finally, the hyperspectral images after geometric correction and root masking were cropped, updated, and saved to obtain uniformly sized, spatially consistent, and root-interference-free rhizosphere soil profile hyperspectral images for subsequent analysis.
[0047] Step 4: Region of Interest (ROI) Selection and Average Spectrum Extraction: After null value processing, on the hyperspectral image, based on the actual soil sampling location and depth, continuously distributed rectangular regions of interest (ROIs) of consistent shape and size were manually selected on the soil profile at 2.5 cm depth intervals. Each ROI corresponds to an actual stratified soil sample. Based on all valid pixels within each ROI, its average reflectance in each band was calculated, generating an average spectral curve representing the corresponding depth and location. Thus, each soil sample with measured alkaline nitrogen values corresponds to an average spectral data point, establishing a one-to-one correspondence between the average spectral data and the measured soil alkaline nitrogen values, as shown below. Figure 2 As shown in (c).
[0048] Step 5: Spectral Data Transformation and Inversion Model Construction: First, outlier detection was performed on all average spectral data using the Monte Carlo method. Data points corresponding to outlier spectral curves far from the sample group were removed. The resulting valid data were sorted in ascending order of their corresponding measured soil available nitrogen values, and the modeling and prediction sets were divided at a ratio of approximately 3:1, with the first three out of every four consecutive samples entering the modeling set and the fourth entering the prediction set. Based on the characteristics of the average spectral curves, the near-infrared 940 nm–1650 nm band was retained to reduce the impact of low signal-to-noise ratio bands at the edges on the model. To reduce the influence of instrument background or drift on the raw spectral reflectance, this embodiment used the raw reflectance spectrum (Raw) as a control and applied the following six spectral preprocessing methods to the modeling and prediction set spectral data: absorbance transformation (A), where A = log(1 / R), first derivative (FD), second derivative (SD), multivariate scattering correction (MSC), Savitzky-Golay Smoothing, and standard normal transformation (SNV).
[0049] Furthermore, using the spectral data after different preprocessing steps as the predictor variable (X) and the measured content of available nitrogen in the soil as the response variable (Y), inversion models were constructed using three algorithms: partial least squares regression (PLSR), least squares support vector machine regression (LS-SVM), and random forest regression (RF).
[0050] The PLSR prediction model, LS-SVM prediction model, and RF prediction model were all implemented using MATLAB software. The models were trained using a modeling set and validated using a prediction set. Model accuracy evaluation metrics included the coefficient of determination (COP). R ²), Root Mean Square Error (RMSE), and Relative Analysis Error (RPD). By comparing the prediction results of all "spectral preprocessing-model" combinations, the optimal inversion model combination with high prediction accuracy and good stability was selected.
[0051] In this embodiment, the accuracy evaluation results of the alkaline nitrogen prediction model are listed in Table 1. Table 1 shows that different spectral preprocessing methods have different impacts on model accuracy compared to the original spectra. First-order differential processing performs better among various preprocessing methods. Among different modeling algorithms, the LS-SVM model has better predictive ability. Considering both model accuracy and stability, this embodiment determines that first-order differential (FD) preprocessing combined with the least squares support vector machine (LS-SVM) model is the optimal model combination for soil alkaline nitrogen content inversion.
[0052] Table 1 Step Six: Model Validation and Predictive Performance Evaluation Based on the optimal prediction model constructed in step five, the predictive ability of the model is validated using a pre-divided modeling set and prediction set. The modeling set is used for model parameter training, while the prediction set is used to independently test the model's generalization ability. Specifically, the spectral data corresponding to the prediction set samples are input into the optimal prediction model to obtain the corresponding predicted values of soil available nitrogen, and these predicted values are then mapped one-to-one with the measured values obtained from laboratory chemical analysis. A scatter plot of the predicted and measured values is further plotted, and linear regression analysis (e.g., ...) is performed. Figure 4 (As shown). The predictive performance of the optimal prediction model is evaluated based on the scatter plot distribution characteristics, the fitted regression line, and model evaluation indices. The model evaluation indices include the coefficient of determination (R²), root mean square error (RMSE), and relative analytical error (RPD). R² characterizes the correlation between predicted and measured values, RMSE characterizes the magnitude of the prediction error, and RPD evaluates the model's overall predictive ability. Through the analysis of the scatter plot and evaluation indices, the accuracy and stability of the optimal prediction model in retrieving soil available nitrogen content can be determined, thus verifying the feasibility of using this model for subsequent spatial inversion of rhizosphere soil profiles.
[0053] Step 7: Nitrogen content inversion and spatial visualization output: In a further embodiment, the continuously observed hyperspectral image after preprocessing, geometric correction, root masking, and cropping is used as the image to be inverted. The spectral curve of each effective soil pixel in the hyperspectral image is extracted and input into the optimal prediction model obtained in step five to calculate the predicted value of soil available nitrogen content at the corresponding pixel location. The predicted values of all pixels are arranged according to their original spatial locations to generate a predicted grayscale image of soil available nitrogen content. The grayscale value of each pixel in the image represents the predicted nitrogen content at that point. The grayscale image is then processed using pseudocolor in MATLAB, typically employing a color band from blue (low value) to yellow (high value), to generate an intuitive visualization of the spatial distribution of soil nitrogen content (see [link to documentation]). Figure 5-8 The spatial distribution visualization image can not only characterize the overall trend of available nitrogen content across the entire soil profile, but also reflect the local differences in available nitrogen content at different depths, locations, and growth stages, thereby achieving a fine characterization of the spatial heterogeneity of available nitrogen in wheat rhizosphere soil.
[0054] In a further embodiment, combining spatial inversion images of soil available nitrogen obtained under different irrigation treatment conditions and at different growth stages, pixel prediction values are extracted from the inversion results according to the root profile depth direction, and these are compiled into a distribution map of the predicted soil available nitrogen content as a function of depth (e.g., ...). Figure 9 (As shown). Figure 9 (a) and Figure 9 (b) As a further application example of the spatial inversion results, it is used to characterize the distribution characteristics of the predicted content of soil available nitrogen in the profile direction under different conditions.
[0055] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology, characterized in that, include: Hyperspectral images of wheat rhizosphere soil profiles were acquired using a non-destructive in-situ culture device during key growth stages of wheat. Perform white reference / dark reference radiometric correction on the hyperspectral image to obtain a reflectance image; The reflectance image is geometrically corrected, and the geometrically corrected reflectance image is then subjected to root masking processing. Based on the sampling depth and location of the soil samples, regions of interest were delineated in the reflectance images after geometric correction and root masking, and the average spectrum of each region of interest was extracted. The average spectrum was matched with the measured nitrogen content of the corresponding stratified soil samples to construct a spectral-nitrogen dataset. A machine learning model was trained using the aforementioned spectral-nitrogen dataset, and the optimal combination of spectral preprocessing method and machine learning model was selected through model performance evaluation to obtain the nitrogen inversion model. Based on the nitrogen inversion model, the pixel-level spectrum in the reflectance image to be inverted is predicted to obtain the predicted nitrogen content value corresponding to each effective soil pixel. The predicted nitrogen content values are arranged according to the original spatial coordinates of the corresponding pixels to obtain the spatial distribution results of nitrogen content in the rhizosphere soil profile. Based on the spatial distribution results, a nitrogen visualization image is generated to achieve a fine inversion and spatial representation of nitrogen content in wheat rhizosphere soil.
2. The method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology according to claim 1, characterized in that, The method for obtaining the reflectance image is as follows: R = (Raw - Dark) / (White - Dark); Where R is reflectance, Raw is the original image, Dark is the dark current image, and White is the white reference image; The reflectance image is used to characterize the relative reflectance information of each pixel in the rhizosphere soil profile at different spectral bands.
3. The method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology according to claim 1, characterized in that, The measured values of nitrogen content in soil samples include: After the hyperspectral image acquisition was completed, soil samples were collected from top to bottom at 2.5 cm depth intervals. The nitrogen content of soil samples from each layer was determined by alkaline hydrolysis diffusion chemical analysis method to obtain the measured values of soil nitrogen content. These measured values of nitrogen content were used as label values in the model training and model validation process and were matched with the average spectra extracted at the corresponding sampling depth and sampling location to construct a spectral-nitrogen dataset.
4. The method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology according to claim 1, characterized in that, A machine learning model was trained using the aforementioned spectral-nitrogen dataset, and the optimal combination of spectral preprocessing method and machine learning model was selected through model performance evaluation to obtain the nitrogen inversion model, including: Monte Carlo outlier removal was performed on the spectral-nitrogen dataset. The samples after outlier removal were sorted from smallest to largest according to the measured soil nitrogen content and divided into a modeling set and a prediction set according to a preset ratio. The processed dataset was subjected to six spectral preprocessing methods: absorbance transformation, first-order derivative, second-order derivative, multivariate scattering correction, standard normal transformation, and Savitzky-Golay smoothing. Using preprocessed spectral data as input and measured nitrogen content as output, the machine learning model is trained to obtain the nitrogen inversion model. The machine learning model includes a partial least squares regression model, a least squares support vector machine regression model, and a random forest regression model.
5. The method for fine inversion of nitrogen content in wheat rhizosphere soil based on hyperspectral imaging technology according to claim 1, characterized in that, The predicted nitrogen content values are arranged according to the original spatial coordinates of the corresponding pixels to obtain the spatial distribution results of nitrogen content in the rhizosphere soil profile, including: The processed rhizosphere soil profile reflectance image is used as the image to be inverted. The spectral curves of the soil pixels are extracted and input into the nitrogen inversion model to obtain the predicted nitrogen content of the corresponding pixels. The predicted nitrogen content values of each soil pixel are arranged according to their original spatial coordinates to generate a two-dimensional matrix of rhizosphere soil profile nitrogen content distribution results. The two-dimensional matrix is visualized to generate a visualization image of nitrogen content in the rhizosphere soil profile, which is used to characterize the spatial distribution characteristics of nitrogen content in the depth and horizontal directions in the wheat rhizosphere soil profile.