Soil data analysis method and system based on image processing
By constructing a high-precision 3D mesh model through UAV image processing and combining it with machine learning algorithms, the problems of soil moisture management, depth control, and crop suitability assessment in soil tillage were solved, enabling precise diagnosis of soil structure and optimization of tillage decisions.
Patent Information
- Application Number
- CN202511741219.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-25
- Publication Date
- 2025-12-30
AI Technical Summary
Existing technologies in soil tillage suffer from problems such as failure in dynamic management of soil moisture content, lack of tillage depth control mechanisms, and absence of crop suitability assessment, leading to ineffective operations and misjudgments.
By collecting multispectral and thermal infrared images using drones, a high-precision three-dimensional mesh model is constructed. Combining random forest and machine learning algorithms, soil bulk density, porosity, and aggregate characteristics are analyzed to dynamically assess soil structure and predict water content and transpiration rate, thereby optimizing tillage decisions.
It enables multi-dimensional dynamic mapping and precise diagnosis of soil structure, improves the targeting and timeliness of tillage, reduces the need for human intervention, and optimizes resource utilization.
Smart Images

Figure CN121235409A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, in particular to a soil data analysis method and system based on image processing. BACKGROUND
[0002] In the large-scale management of modern high-standard farmland, accurate assessment of soil structure and tillage quality is a key link to ensure the healthy growth of crops. With the breakthrough development of unmanned aerial vehicle remote sensing and artificial intelligence technology, soil parameter analysis and tillage diagnosis based on image processing have become a new research direction.
[0003] At present, tillage evaluation usually uses unmanned aerial vehicles to collect surface images, combines machine learning algorithms to analyze soil aggregate size distribution, color texture and other static structure indicators, and realizes preliminary diagnosis of tillage quality. However, this method has the following disadvantages: first, the dynamic management of soil water content is ineffective. After the rain, the soil is sticky and hard because of the difference between the surface and the internal water content. The traditional method relying on a fixed water content threshold cannot dynamically capture the water evaporation rule. After a single tillage, the structure or water content often needs to be reworked twice, but the timing of the empirical rework is difficult to match the critical point of crop water demand and the evaporation window period, resulting in ineffective operation. Second, the tillage depth control mechanism is missing. The physical changes of soil under low temperature and other conditions cause the tillage depth to be insufficient; the existing technology lacks the ability to trace the original burial depth without damage. Traditional drilling detection can only obtain local data after tillage, and cannot systematically evaluate uniformity or identify environmental factors that cause shallow tillage, which restricts root development. Third, the crop adaptability evaluation system is missing. Existing evaluation is limited to theoretical universal indicators, ignoring the differentiated needs of soil structure by crop physiological characteristics. Universal models cannot integrate biological factors such as root function and temperature sensitivity, resulting in misjudgment due to crop differences in the same soil environment, which restricts the scientific nature of the tillage plan. SUMMARY
[0004] The purpose of the present application is to provide a soil data analysis method and system based on image processing to solve the problems raised in the background art.
[0005] To solve the above technical problems, the present application provides a soil data analysis method based on image processing, comprising:
[0006] S100, collect environmental information and planting requirements, and sample the soil of the field before tillage. Collect image data of the field after tillage by unmanned aerial vehicle and build a virtual scene, and map the soil conditions to the virtual scene.
[0007] The environmental information includes the temperature and humidity of the air. The planting requirements refer to the growth conditions of the plants, specifically including the crop root function, the optimal density of the crop root, the optimal growth soil temperature of the crop, and the optimal water content of the soil at the root of the crop.
[0008] In the process of plowing and planting in high-standard farmland, different areas require different planting requirements due to the difference of plant species, and different planting requirements also have different requirements for soil.
[0009] Virtual scene building and mapping includes:
[0010] S101, mount multispectral and thermal infrared cameras on a drone, collect real scene images and thermal images of the field surface after plowing, and record GPS position information.
[0011] S102, generate a three-dimensional terrain grid of the field area according to the correspondence between image pixel coordinates and GPS coordinates, and restore the visual features of the ground surface through image texture mapping.
[0012] Based on the mapping relationship between the GPS coordinates of the unmanned aerial vehicle and the image pixels, combined with multispectral and thermal infrared data, a textured centimeter-level precision three-dimensional grid model is constructed.
[0013] S103, based on image analysis of soil surface color, roughness and crack distribution, according to the terrain curvature and crack distribution of the soil surface, the soil bulk density and porosity parameters are calculated through a random forest machine learning model.
[0014] Using the random forest model to analyze the surface crack distribution and terrain curvature, the bulk density and porosity are calculated.
[0015] S104, encode the analyzed color, soil bulk density and porosity into a multi-channel data matrix and map it to the three-dimensional grid nodes to generate a virtual scene of soil structure.
[0016] Encode color, bulk density, and porosity into a three-channel matrix to achieve dynamic binding of physical parameters and virtual nodes.
[0017] Realize non-contact soil parameter digitization reconstruction, generate high-precision farmland digital twin model through multi-source remote sensing data fusion, provide visualization basis for subsequent analysis, and replace traditional destructive data collection.
[0018] S200, analyze the plowing area in the virtual scene and set the grid area, identify the soil aggregates in each grid area, evaluate the plowing effect and calculate the structure index based on environmental information and planting requirements, and divide the abnormal area according to the structure index. Specifically includes:
[0019] S201, in the virtual scene, select a continuous area of the field after plowing as a reference area, and based on the minimum working distance of agricultural machinery Set the area .
[0020] S202, generate an area of The grid center distance of each grid in the equidistant grid area is not less than r.
[0021] S203, when the boundary area cannot meet the equidistant condition, start the intelligent merging protocol: automatically merge the adjacent grid with an area less than into a grid area with an area not less than .
[0022] Based on the minimum working distance r of agricultural machinery, Voronoi algorithm is used to generate a grid with an area greater than or equal to r2, and the boundary area is intelligently merged through Delaunay triangulation to ensure the operability of agricultural machinery.
[0023] S204, identify the soil aggregates in the grid area, and analyze the color and temperature of each soil aggregate. Predict the depth of the corresponding soil aggregate before plowing, and take it as the original depth prediction value. Specifically, it includes:
[0024] S2041, in the grid area of the virtual scene, use YOLOv7 algorithm to identify soil aggregates, and synchronously extract their surface color and thermal infrared temperature data.
[0025] S2042, correlate the stratified soil sampling data of the field before plowing, and construct a depth-temperature-color correlation model:
[0026] ;
[0027] In the formula, , and are the weight coefficients calibrated by ridge regression.
[0028] is the temperature deviation of the soil aggregate from the historical layer temperature, is the Euclidean distance of the soil aggregate color from the historical layer color in the Lab color space, is the particle size of the soil aggregate.
[0029] Stratified soil sampling data is collected before the field is plowed. The specific collection depth is based on the planting depth required for planting plants. Usually, it is simply divided into shallow layer 0-15 cm, middle layer 15-30 cm, and deep layer > 30 cm.
[0030] S2043, input the feature matrix of the soil aggregate into the time convolution network TCN, and output the original depth prediction value of the soil aggregate .
[0031] S2044, verify the predicted depth by X-ray tomography, and if the error exceeds the threshold, adjust the weight coefficients of the model adaptively.
[0032] By using a depth-temperature-color spatiotemporal correlation model and a TCN-driven deep tracing algorithm, soil history reconstruction and prediction can be achieved.
[0033] S2045. In the virtual scene, the original burial depth prediction value is marked for each soil aggregate based on the prediction results.
[0034] S205. Analyze the scale distribution of soil aggregates and the distribution of predicted original burial depths within the grid area. Calculate the structure index based on planting requirements, and classify grid areas with a structure index below a threshold as outlier areas. Specifically, this includes:
[0035] S2051. Analyze the size, predicted original burial depth, and temperature of each soil aggregate within the grid area. Set a scale threshold. and To satisfy .
[0036] S2052, size smaller than Soil aggregates, as micro-aggregates, are larger than [the specified size]. Soil aggregates were considered as large aggregates, and the proportions of micro-aggregates and large aggregates in all soil aggregates were calculated.
[0037] Micro-aggregates are typically selected from soil aggregates with a diameter of less than 0.25 mm. They have a dense and hard structure, enabling long-term carbon sequestration and reducing nutrient loss.
[0038] Large aggregates are typically selected from soil aggregates with a diameter greater than 0.25 mm. They have a porous and loose structure, which ensures aeration and drainage and reduces root penetration resistance.
[0039] S2053, Calculate the average temperature of all soil aggregates within the grid area. Obtain the crop root system function from the planting requirements. Optimal density of crop roots and the optimal soil temperature for crop growth .
[0040] Substitute into the formula to calculate the structure index of the corresponding grid region. :
[0041] ;
[0042] In the formula, The proportion of micro-aggregates, The proportion of large clusters, It is a natural constant. The standard deviation of the predicted original burial depth of all soil aggregates within the grid area. and It is a constant.
[0043] For the size and depth coupling term, This refers to crop adaptability.
[0044] The percentage of micro-aggregates reflects the soil's ability to retain fertilizer. The percentage of large aggregates represents soil permeability. Used to measure the uniformity of tillage disturbance, a value of less than 5 is generally considered excellent.
[0045] This is a crop root system function, and the value varies for different crops. Please refer to the root depth and root density for specific values.
[0046] For example, corn is: ;
[0047] The target value for calculation represents the root system effectiveness coefficient of maize. Specifically, it is a dimensionless numerical value used to quantify the relative effectiveness or strength of the root system in a specific function.
[0048] This represents root depth, typically referring to the maximum or effective depth that roots can reach in the soil. It needs to be standardized to a value between 0 and 1.
[0049] Representing root density, it typically refers to the root length or weight per unit volume of soil within a specific soil layer. It also needs to be standardized to a value between 0 and 1.
[0050] 0.6 and 0.4 are weighting coefficients. They represent the root depth when calculating the root function of maize. and root density The relative importance of.
[0051] The structural index is calculated based on the planting requirements of the selected grid area. Different grid areas may have different planting requirements, which may lead to significant differences in the final calculated structural index even if the soil environments of different grid areas are highly similar due to different reference planting requirements.
[0052] To achieve automated and quantitative assessment of tillage quality, the system uses multi-dimensional analysis of soil aggregates to accurately locate areas of structural anomalies, thus solving the subjective problem of traditional visual inspection.
[0053] S300. Analyze the structural index differences between adjacent anomaly zones and merge them based on these differences. Machine learning algorithms are used to analyze and predict water content and evaporation rate, thereby calculating the evaporation duration of each anomaly zone. Specifically, this includes:
[0054] S301. Analyze the structural index difference between adjacent abnormal areas in the virtual scene. If the difference is less than a set threshold, merge them. The structural index of the abnormal area after merging is the average of the structural indices of all abnormal areas before merging.
[0055] S302. Repeatedly merge abnormal regions until different abnormal regions are no longer adjacent, or the difference in structural index between adjacent abnormal regions is no longer less than the set threshold.
[0056] S303. Extract characteristic parameters of the soil in the anomalous area from the image data, use machine learning algorithms to analyze and predict the water content, and analyze and predict the water evaporation rate from the temperature and humidity information in the anomalous area.
[0057] The characteristic parameters include color features, texture indices, porosity parameters, and spectral indices.
[0058] Color characteristics: Calculate the mean hue, variance of lightness, and gradient of saturation in the outlier areas in RGB and HSV spaces.
[0059] Texture metrics: Contrast, entropy, and second moment of the angles in abnormal regions are extracted based on the gray-level co-occurrence matrix.
[0060] Pore parameters: The abnormal region image is binarized and segmented to calculate the pore curvature, equivalent diameter and connectivity density.
[0061] Spectral index: Normalized differential moisture index (NDWI) constructed from near-infrared and short-wave infrared bands.
[0062] A water content prediction model was constructed and trained using a sample set containing soil images and measured water content. A feature fusion layer was used to integrate four types of parameters: color, texture, porosity, and spectrum. A nonlinear mapping relationship between multiple parameters and water content was established through a convolutional neural network.
[0063] The multi-dimensional characteristic parameters of the soil in the anomalous area are input into the water content prediction model, and the predicted water content of the corresponding soil in the anomalous area is output.
[0064] A water evaporation rate prediction model is constructed using machine learning algorithms, which employ either support vector regression or long short-term memory (LSTM) networks.
[0065] A nonlinear mapping relationship between temperature, humidity and water evaporation rate was established. The model was trained based on a historical dataset, which included synchronously collected temperature, humidity and measured evaporation rate.
[0066] The temperature and humidity information from the abnormal area are input into the pre-trained water evaporation rate prediction model, which outputs the predicted water evaporation rate for the corresponding abnormal area.
[0067] S304. Obtain the optimal soil moisture content at the crop root zone in the planting requirements. Subtract the predicted moisture content The evaporation volume is obtained; the evaporation duration of each abnormal area is calculated based on the evaporation volume and the predicted water evaporation rate.
[0068] Optimize management and predict water dynamics, improve the accuracy of water content and transpiration rate prediction through multimodal feature fusion, guide precision farming decisions, and eliminate ineffective farming when soil moisture content is too high.
[0069] S400: Mark abnormal areas in the virtual scene and plan the rework sequence and rework time according to the evaporation time.
[0070] Add the current time to the evaporation duration to obtain the rework time for each abnormal area. Sort all abnormal areas in ascending order of evaporation duration, and wait for agricultural machinery to rework them according to the sorted order.
[0071] The evaporation duration is converted into an absolute time coordinate. The agricultural machinery scheduling system then arranges the operation queues for abnormal areas in ascending order, prioritizing areas with short evaporation durations to maximize the utilization of the water evaporation window.
[0072] To achieve spatial and temporal optimization of agricultural machinery scheduling, operation queues are dynamically generated based on the water evaporation window period to maximize resource utilization.
[0073] The present invention also provides a soil data analysis system based on image processing, including a dynamic sensing module, an image processing module, a data analysis module, and a planning and management module.
[0074] The dynamic sensing module is used to collect environmental information and planting requirements, and to perform stratified soil sampling of the field before cultivation. A virtual scene is then constructed using image data of the field after cultivation, and the soil conditions are mapped.
[0075] By using drones equipped with multispectral and thermal infrared cameras to collect real-world images and thermal imaging data of the fields, and combining this with GPS positioning, a three-dimensional terrain grid is constructed.
[0076] A random forest model was used to analyze soil surface color, fissure distribution, and terrain curvature to estimate bulk density and porosity parameters. The analyzed data was then encoded into a multi-channel matrix and mapped to virtual grid nodes to generate a virtual scene of soil structure.
[0077] By collecting soil parameters and accurately constructing digital twin models of farmland, a visual basis for soil analysis can be provided, reducing the manpower and time costs of traditional field collection.
[0078] The image processing module is used to define grid zones in the virtual scene and identify soil aggregates. It calculates the structure index based on integrated environmental information and planting requirements, and delineates anomalous areas.
[0079] The system divides the area into equal-area grid zones based on the minimum operating distance of agricultural machinery, generates the grid using the Voronoi algorithm, and adjusts the boundary regions through an intelligent merging protocol.
[0080] YOLOv7 was used to identify soil aggregates within the grid, and their color, temperature, and size data were extracted. A depth-temperature-color correlation model was established by combining stratified sampling data, and the original burial depth was predicted using a TCN network.
[0081] The proportions of micro-aggregates and macro-aggregates are calculated. Combined with crop root function (CRF), optimal soil temperature, and other planting requirements, the structural index is calculated and abnormal areas are marked.
[0082] This technology enables intelligent identification and quantitative assessment of soil aggregates, allowing for precise location of areas with abnormal tillage conditions. By coupling size, depth, and crop adaptability indicators, it provides data support for refined agricultural management.
[0083] The data analysis module is used to merge adjacent anomalous areas based on the difference in structural index, and uses machine learning algorithms to analyze and predict water content and water evaporation rate, and calculate the evaporation duration of each anomalous area.
[0084] Merge adjacent outlier regions with a structural index difference less than a threshold, and update the mean index of the merged regions. Extract the color, texture, porosity, and spectral index of the outlier regions, and input them into a CNN model to predict water content.
[0085] Based on SVR or LSTM models, the rate of water transpiration is predicted using temperature and humidity as inputs. The time taken for transpiration is calculated by combining the crop's optimum water content.
[0086] By integrating multimodal feature fusion and machine learning models, high-precision dynamic prediction of water content and evaporation rate is achieved. Dynamic optimization of anomaly region merging improves decision-making efficiency.
[0087] The planning and management module is used to mark abnormal areas in the virtual scene and plan the rework sequence and rework time of abnormal areas based on the evaporation time.
[0088] The locations of abnormal areas are plotted in the virtual scene. The current time is added to the evaporation duration of each area to generate the rework time. The abnormal areas are then sorted in ascending order of evaporation duration to generate a farm machinery operation queue.
[0089] Intelligent scheduling and route planning for rework ensure precise allocation of arable resources as needed, maximize the use of soil moisture evaporation window, and improve rework efficiency.
[0090] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0091] Multimodal data fusion and dynamic virtual modeling: Visual and thermodynamic features of the land surface are simultaneously acquired using UAV multispectral and thermal infrared imaging. These features are then combined with GPS coordinates to generate a 3D terrain mesh, and parameters such as soil bulk density and porosity are integrated to construct a virtual scene. Compared to traditional single-image analysis, this method achieves multi-dimensional dynamic mapping of soil structure, providing a three-dimensional data foundation for accurate diagnosis.
[0092] Intelligent diagnosis of crop adaptability: This invention proposes a structural index (SSI) algorithm, which couples the proportion of micro / large aggregates, the standard deviation of burial depth, and growth requirement parameters such as crop root function and optimal soil temperature. Compared with static soil testing, it can dynamically quantify the adaptability of soil structure to specific crops, enabling precise delineation of anomalous areas.
[0093] Adaptive optimization scheduling for abnormal areas: An intelligent merging protocol is introduced to dynamically aggregate adjacent abnormal areas based on structural index differences; combined with machine learning-predicted water content and evaporation rate, the evaporation duration is automatically calculated and a rework sequence is generated. This mechanism avoids the resource waste caused by traditional homogenization processing and significantly improves the targeting and timeliness of rework operations.
[0094] A fully automated decision-making loop: From data collection and virtual scenario construction to anomaly identification and rework planning, an automated chain connecting "perception-analysis-decision-execution" is formed. This significantly reduces the need for manual intervention and provides a systematic solution for precision farming in high-standard farmland. Attached Figure Description
[0095] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0096] Figure 1 This is a flowchart illustrating a soil data analysis method based on image processing according to the present invention.
[0097] Figure 2 This is a schematic diagram of the structure of a soil data analysis system based on image processing according to the present invention. Detailed Implementation
[0098] 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 embodiments of the present invention, and not all embodiments. 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.
[0099] Please see Figure 1 This invention provides a soil data analysis method based on image processing, comprising:
[0100] S100: Collect environmental information and planting requirements, and perform stratified soil sampling of the field before cultivation. Use drones to collect image data of the field after cultivation and build a virtual scene to map the soil conditions onto the virtual scene.
[0101] Environmental information includes air temperature and humidity. Planting requirements refer to the growth conditions of the plant, specifically including crop root system function, optimal crop root density, optimal growing temperature, and optimal soil moisture content around the crop roots.
[0102] In the process of cultivating and planting high-standard farmland, the differences in plant species lead to different planting requirements in different regions, and the requirements for soil vary accordingly.
[0103] Virtual scene construction and mapping includes:
[0104] S101. Using a drone equipped with a multispectral and thermal infrared camera, real-world images and thermal images of the field surface after cultivation are collected, and GPS location information is recorded.
[0105] S102. Based on the correspondence between image pixel coordinates and GPS coordinates, generate a three-dimensional terrain grid for the field area, and restore the visual features of the land surface through image texture mapping.
[0106] Based on the mapping relationship between UAV GPS coordinates and image pixels, and combined with multispectral and thermal infrared data, a textured 3D mesh model with centimeter-level precision is constructed.
[0107] S103. Based on image analysis of soil surface color, roughness and fissure distribution, and according to the topographic curvature and fissure distribution of the soil surface, soil bulk density and porosity parameters are estimated using a random forest machine learning model.
[0108] The distribution of surface fissures (fissures with a width > 2 mm are considered effective) and topographic curvature (curvature radius < 0.5 m indicates abrupt changes in micro-topography) were analyzed using a random forest model to estimate bulk density (g / cm³) and porosity (%).
[0109] S104. The analyzed color, soil bulk density and porosity are encoded into a multi-channel data matrix and mapped to the three-dimensional grid nodes to generate a virtual scene of the soil structure.
[0110] Color (RGB value), bulk density (0-2g / cm³ normalized value), and porosity (0-100% normalized value) are encoded into a three-channel matrix to achieve dynamic binding of physical parameters and virtual nodes.
[0111] This technology enables non-contact digital reconstruction of soil parameters, generating a high-precision digital twin model of farmland through the fusion of multi-source remote sensing data. This provides a visual basis for subsequent analysis and replaces traditional destructive data collection methods.
[0112] S200: Analyze the cultivated area in the virtual scene and define grid zones, identifying soil aggregates within each grid zone. Evaluate the cultivation effect based on comprehensive environmental information and planting requirements, calculate the structure index, and delineate abnormal areas based on the structure index. Specifically, this includes:
[0113] S201. In the virtual scene, a continuous area of the cultivated field is selected as the reference area, and the minimum operating distance of the agricultural machinery is used as the basis. Set area .
[0114] S202. Using the reference region boundary as a constraint, the area generated by the Voronoi diagram algorithm is always... The equal-area grid region has a centroid spacing of not less than r.
[0115] S203. When the boundary area cannot meet the equal area condition, the intelligent merging protocol is activated: adjacent areas smaller than [the specified area] are merged. The grid is automatically merged into a grid with an area not less than [amount missing]. The grid area.
[0116] Based on the minimum operating distance r of agricultural machinery (usually r=1.5m), the Voronoi algorithm is used to generate a grid with an area ≥ r² (2.25m²). The boundary regions are intelligently merged through Delaunay triangulation to ensure the operability of agricultural machinery.
[0117] S204. Identify soil aggregates within the grid area and analyze the color and temperature of each aggregate. Predict the soil depth of the corresponding aggregate before cultivation and use it as the predicted initial burial depth. Specifically, this includes:
[0118] S2041. Within the grid area of the virtual scene, the YOLOv7 algorithm is used to identify soil aggregates and simultaneously extract their surface color and thermal infrared temperature data.
[0119] S2042. Construct a depth-temperature-color correlation model by correlating stratified soil sampling data from the field before tillage:
[0120] ;
[0121] In the formula, , and These are the weighting coefficients used in ridge regression calibration.
[0122] The deviation between soil aggregate temperature and historical strata temperature. This represents the Euclidean distance between the soil aggregate color and the historical layer color in the Lab color space. The particle size of soil aggregates.
[0123] Soil stratification data is collected before field cultivation, with the specific sampling depth depending on the required planting depth. Typically, a simple stratification is used: shallow layer (0-15cm), middle layer (15-30cm), and deep layer (>30cm).
[0124] S2043. Input the feature matrix of soil aggregates into the temporal convolutional network TCN, and output the predicted value of the original burial depth of soil aggregates. .
[0125] S2044. Verify the predicted depth using X-ray tomography. If the error exceeds the threshold, adaptively adjust the model's weight coefficients.
[0126] By using a depth-temperature-color spatiotemporal correlation model and a TCN-driven deep tracing algorithm, soil history reconstruction and prediction can be achieved.
[0127] S2045. In the virtual scene, the original burial depth prediction value is marked for each soil aggregate based on the prediction results.
[0128] S205. Analyze the scale distribution of soil aggregates and the distribution of predicted original burial depths within the grid area. Calculate the structure index based on planting requirements, and classify grid areas with a structure index below a threshold as outlier areas. Specifically, this includes:
[0129] S2051. Analyze the size, predicted original burial depth, and temperature of each soil aggregate within the grid area. Set a scale threshold. and To satisfy .
[0130] S2052, size smaller than Soil aggregates, as micro-aggregates, are larger than [the specified size]. Soil aggregates were considered as large aggregates, and the proportions of micro-aggregates and large aggregates in all soil aggregates were calculated.
[0131] Microaggregates are typically selected from soil aggregates with a diameter of less than 0.25 mm. They have a dense and hard structure (like fine sand grains) and can fix carbon for a long time, reducing nutrient loss.
[0132] Large aggregates are typically selected from soil aggregates with a diameter greater than 0.25 mm. They have a porous and loose structure (like breadcrumbs) to ensure aeration and drainage, and low resistance to root penetration.
[0133] S2053, Calculate the average temperature of all soil aggregates within the grid area. Obtain the crop root system function from the planting requirements. Optimal density of crop roots and the optimal soil temperature for crop growth .
[0134] Substitute into the formula to calculate the structure index of the corresponding grid region. :
[0135] ;
[0136] In the formula, The proportion of micro-aggregates, The proportion of large clusters, It is a natural constant. The standard deviation of the predicted original burial depth of all soil aggregates within the grid area. and It is a constant.
[0137] For the size and depth coupling term, This refers to crop adaptability.
[0138] The percentage of micro-aggregates reflects the soil's ability to retain fertilizer. The percentage of large aggregates represents soil permeability. Used to measure the uniformity of tillage disturbance, a value of less than 5 is generally considered excellent.
[0139] This is a crop root system function, and the value varies for different crops. Please refer to the root depth and root density for specific values.
[0140] For example, corn is: ;
[0141] The target value for calculation represents the root availability coefficient of maize. Specifically, it is a dimensionless numerical value (usually between 0 and 1 or scaled proportionally) used to quantify the relative effectiveness or strength of the root system in a specific function (such as water absorption or nutrient absorption).
[0142] Represents root depth, typically referring to the maximum or effective depth that roots can reach in the soil. It needs to be normalized to a value between 0 and 1 (e.g., divided by the maximum possible root depth of the crop).
[0143] Root density is typically represented by the root length (cm / cm³) or root weight (g / cm³) per unit volume of soil within a specific soil layer (or the entire root zone). It also needs to be normalized to a value between 0 and 1 (e.g., divided by the maximum possible root density of the crop).
[0144] 0.6 and 0.4 are weighting coefficients. They represent the root depth when calculating the root function of maize. and root density The relative importance of.
[0145] The structural index is calculated based on the planting requirements of the selected grid area. Different grid areas may have different planting requirements, which may lead to significant differences in the final calculated structural index even if the soil environments of different grid areas are highly similar due to different reference planting requirements.
[0146] To achieve automated and quantitative assessment of tillage quality, the system uses multi-dimensional analysis of soil aggregates to accurately locate areas of structural anomalies, thus solving the subjective problem of traditional visual inspection.
[0147] S300. Analyze the structural index differences between adjacent anomaly zones and merge them based on these differences. Machine learning algorithms are used to analyze and predict water content and evaporation rate, thereby calculating the evaporation duration of each anomaly zone. Specifically, this includes:
[0148] S301. Analyze the structural index difference between adjacent abnormal areas in the virtual scene. If the difference is less than a set threshold, merge them. The structural index of the abnormal area after merging is the average of the structural indices of all abnormal areas before merging.
[0149] For example, only adjacent regions with a structural index difference of less than 10% can be merged (such as SSI=0.5 and 0.55 can be merged) to avoid excessive aggregation that leads to distortion of management granularity.
[0150] S302. Repeatedly merge abnormal regions until different abnormal regions are no longer adjacent, or the difference in structural index between adjacent abnormal regions is no longer less than the set threshold.
[0151] S303. Extract characteristic parameters of the soil in the anomalous area from the image data, use machine learning algorithms to analyze and predict the water content, and analyze and predict the water evaporation rate from the temperature and humidity information in the anomalous area.
[0152] The characteristic parameters include color features, texture indices, porosity parameters, and spectral indices.
[0153] Color characteristics: Calculate the mean hue, variance of lightness, and gradient of saturation in the outlier areas in RGB and HSV spaces.
[0154] Texture metrics: Contrast, entropy, and second moment of the angles in abnormal regions are extracted based on the gray-level co-occurrence matrix.
[0155] Pore parameters: The abnormal region image is binarized and segmented to calculate the pore curvature, equivalent diameter and connectivity density.
[0156] Spectral index: Normalized differential moisture index (NDWI) constructed from near-infrared and short-wave infrared bands.
[0157] A water content prediction model was constructed and trained using a sample set containing soil images and measured water content. A feature fusion layer was used to integrate four types of parameters: color, texture, porosity, and spectrum. A nonlinear mapping relationship between multiple parameters and water content was established through a convolutional neural network.
[0158] The multi-dimensional characteristic parameters of the soil in the anomalous area are input into the water content prediction model, and the predicted water content of the corresponding soil in the anomalous area is output.
[0159] A water evaporation rate prediction model is constructed using machine learning algorithms, which employ either support vector regression or long short-term memory (LSTM) networks.
[0160] A nonlinear mapping relationship between temperature, humidity and water evaporation rate was established. The model was trained based on a historical dataset, which included synchronously collected temperature, humidity and measured evaporation rate.
[0161] The temperature and humidity information from the abnormal area are input into the pre-trained water evaporation rate prediction model, which outputs the predicted water evaporation rate for the corresponding abnormal area.
[0162] S304. Obtain the optimal soil moisture content at the crop root zone in the planting requirements. Subtract the predicted moisture content The evaporation volume is obtained; the evaporation duration of each abnormal area is calculated based on the evaporation volume and the predicted water evaporation rate.
[0163] Optimize management and predict water dynamics, improve the accuracy of water content and transpiration rate prediction through multimodal feature fusion, guide precision farming decisions, and eliminate ineffective farming when soil moisture content is too high.
[0164] S400: Mark abnormal areas in the virtual scene and plan the rework sequence and rework time according to the evaporation time.
[0165] Add the current time to the evaporation duration to obtain the rework time for each abnormal area. Sort all abnormal areas in ascending order of evaporation duration, and wait for agricultural machinery to rework them according to the sorted order.
[0166] For example, abnormal areas can be highlighted in red in a 3D mesh, and rework countdown labels can be overlaid to support AR agricultural machinery navigation.
[0167] The evaporation duration is converted into an absolute time coordinate (accurate to the minute). For example, the current time 14:30 + 3.5 hours gives a rework time of 18:00. The agricultural machinery scheduling system arranges the abnormal area operation queues in ascending order, prioritizing areas with shorter evaporation durations (e.g., the 2-hour zone is earlier than the 5-hour zone), maximizing the utilization of the water evaporation window.
[0168] To achieve spatial and temporal optimization of agricultural machinery scheduling, operation queues are dynamically generated based on the water evaporation window period to maximize resource utilization.
[0169] Please see Figure 2 The present invention also provides a soil data analysis system based on image processing, including a dynamic sensing module, an image processing module, a data analysis module, and a planning and management module.
[0170] The dynamic sensing module is used to collect environmental information and planting requirements, and to perform stratified soil sampling of the field before cultivation. A virtual scene is then constructed using image data of the field after cultivation, and the soil conditions are mapped.
[0171] By using drones equipped with multispectral and thermal infrared cameras to collect real-world images and thermal imaging data of the fields, and combining this with GPS positioning, a three-dimensional terrain grid is constructed.
[0172] A random forest model was used to analyze soil surface color, fissure distribution, and terrain curvature to estimate bulk density and porosity parameters. The analyzed data was then encoded into a multi-channel matrix and mapped to virtual grid nodes to generate a virtual scene of soil structure.
[0173] By collecting soil parameters and accurately constructing digital twin models of farmland, a visual basis for soil analysis can be provided, reducing the manpower and time costs of traditional field collection.
[0174] The image processing module is used to define grid zones in the virtual scene and identify soil aggregates. It calculates the structure index based on integrated environmental information and planting requirements, and delineates anomalous areas.
[0175] The system divides the area into equal-area grid zones based on the minimum operating distance of agricultural machinery, generates the grid using the Voronoi algorithm, and adjusts the boundary regions through an intelligent merging protocol.
[0176] YOLOv7 was used to identify soil aggregates within the grid, and their color, temperature, and size data were extracted. A depth-temperature-color correlation model was established by combining stratified sampling data, and the original burial depth was predicted using a TCN network.
[0177] The proportions of micro-aggregates and macro-aggregates are calculated. Combined with crop root function (CRF), optimal soil temperature, and other planting requirements, the structural index is calculated and abnormal areas are marked.
[0178] This technology enables intelligent identification and quantitative assessment of soil aggregates, allowing for precise location of areas with abnormal tillage conditions. By coupling size, depth, and crop adaptability indicators, it provides data support for refined agricultural management.
[0179] The data analysis module is used to merge adjacent anomalous areas based on the difference in structural index, and uses machine learning algorithms to analyze and predict water content and water evaporation rate, and calculate the evaporation duration of each anomalous area.
[0180] Merge adjacent outlier regions with a structural index difference less than a threshold, and update the mean index of the merged region. Extract the color (e.g., RGB / HSV spatial features), texture (e.g., gray-level co-occurrence matrix index), porosity (e.g., binarization segmentation parameters), and spectral index (e.g., NDWI) of the outlier regions, and input them into the CNN model to predict water content.
[0181] Based on SVR or LSTM models, the rate of water transpiration is predicted using temperature and humidity as inputs. The time taken for transpiration is calculated by combining the crop's optimum moisture content (WA).
[0182] By integrating multimodal feature fusion and machine learning models, high-precision dynamic prediction of water content and evaporation rate is achieved. Dynamic optimization of anomaly region merging improves decision-making efficiency.
[0183] The planning and management module is used to mark abnormal areas in the virtual scene and plan the rework sequence and rework time of abnormal areas based on the evaporation time.
[0184] In the virtual scene, the locations of abnormal areas are plotted, and the current time (UTC+8) is added to the evaporation duration of each area to generate the rework time. The abnormal areas are then sorted in ascending order of evaporation duration to generate a farm machinery operation queue.
[0185] Intelligent scheduling and route planning for rework ensure precise allocation of arable resources as needed, maximize the use of soil moisture evaporation window, and improve rework efficiency.
[0186] Example 1: Assume that the crop corresponding to grid region WG is corn, and the crop root function is required for corn planting. The optimal root density for crops is 0.85. The optimal soil temperature for crop growth is 0.8 streaks / cm³. It is 12℃;
[0187] When the average temperature of all soil aggregates within grid WG is 10℃, the standard deviation of the original burial depth prediction is 4.5, micro-aggregates account for 35%, large aggregates account for 28%, and constants are used. and When the values are 100 and 1 respectively:
[0188] Substitute into the formula to calculate the structural index of the grid region WG:
[0189] ;
[0190] The structure index of the grid region WG is 0.81.
[0191] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0192] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An image processing based soil data analysis method, characterized by: The method comprises: S100, collecting environmental information and planting requirements, and layer sampling the soil of the field before cultivation; collecting image data of the field after cultivation by a unmanned aerial vehicle and building a virtual scene, and mapping the soil condition to the virtual scene; S200, analyzing the cultivated area in the virtual scene and setting a grid area, identifying soil aggregates in each grid area; evaluating the cultivation effect and calculating the structure index according to the environmental information and the planting requirements; and dividing the abnormal area according to the structure index; S300, analyzing the structure index difference of adjacent abnormal areas, and merging adjacent abnormal areas according to the difference; using a machine learning algorithm to analyze and predict the water content and the water transpiration speed, so as to calculate the transpiration time length of each abnormal area; S400, labeling the abnormal area in the virtual scene, and planning the rework sequence and rework time according to the transpiration time length.
2. The soil data analysis method based on image processing according to claim 1, characterized in that: In S100, the environmental information includes the temperature and humidity of the air; the planting requirement refers to the growth condition of the plant, specifically including the crop root function, the optimal density of the crop root, the optimal growth ground temperature of the crop, and the optimal water content of the soil at the root of the crop; The virtual scene building and mapping comprises: S101, mounting a multispectral and thermal infrared camera on a unmanned aerial vehicle, collecting real scene images and thermal images of the field surface after cultivation, and recording GPS position information; S102, generating a three-dimensional terrain grid of the field area according to the corresponding relationship between the image pixel coordinates and the GPS coordinates, and restoring the visual features of the ground surface through image texture mapping; S103, analyzing the soil surface color, roughness and crack distribution based on the image, and calculating the soil bulk density and porosity parameters according to the terrain curvature and crack distribution of the soil surface; S104, encoding the analyzed color, soil bulk density and porosity into a multi-channel data matrix and mapping it to the three-dimensional grid nodes to generate a virtual scene of the soil structure.
3. The soil data analysis method based on image processing according to claim 2, characterized in that: S200 comprises: S201、In the virtual scene, a continuous area of the plowed field is selected as a reference area, and the minimum working distance of the agricultural machine is determined based on the reference area Set area ; S202. Using the reference region boundary as a constraint, the area generated by the Voronoi diagram algorithm is always... In an equal-area grid region, the centroid spacing between each grid cell is not less than r; S203、When the boundary area cannot meet the equal-area condition, start the intelligent merging protocol: automatically merge the adjacent area smaller than into a grid area with an area not smaller than . S204, identifying soil aggregates in the grid area, and analyzing the color and temperature of each soil aggregate; predicting the soil layer depth before cultivation of the corresponding soil aggregate, and taking it as the original buried depth prediction value; S205, analyzing the size distribution of the soil aggregates in the grid area and the distribution of the original buried depth prediction value; calculating the structure index according to the planting requirements, and taking the grid area with a structure index less than a threshold value as an abnormal area.
4. The soil data analysis method based on image processing according to claim 3, characterized in that: S204 comprises: S2041, in the grid area of the virtual scene, using YOLOv7 algorithm to identify soil aggregates, and synchronously extracting the surface color and thermal infrared temperature data thereof; S2042, associating the layer soil sampling data of the field before cultivation, and constructing a depth-temperature-color correlation model: ; wherein , and are the weight coefficients calibrated by ridge regression, respectively. a temperature of the soil aggregate and a historical layer temperature, a Euclidean distance of a color of the soil aggregate and a historical layer color in a Lab color space, a particle size of the soil aggregate; S2043, input the feature matrix of the soil aggregate into a time convolution network TCN, and output a soil aggregate original burial depth prediction value ; S2044, verifying the predicted depth by X-ray tomography, and adaptively adjusting the weight coefficient of the model if the error exceeds a threshold value; S2045, in the virtual scene, labeling the original buried depth prediction value for each soil aggregate according to the prediction result.
5. The soil data analysis method based on image processing according to claim 3, characterized in that: S205 comprises: S2051、analyze the size, original buried depth prediction value and temperature of each soil aggregate in the grid area; set a scale threshold and so as to meet ; S2052、the size of less than The soil aggregates with a size greater than The proportion of micro-aggregates and macro-aggregates in all soil aggregates is calculated respectively. S2053、calculating the average of the temperature of all soil aggregates in the grid area , obtaining a crop root function in the planting requirements , the optimum density of crop roots and the optimum growth soil temperature of crops ; Substituting the formula to calculate the structure index of the corresponding grid area : ; wherein, is the percentage of microaggregates, is the percentage of macroaggregates, is a natural constant, is the standard deviation of the predicted original burial depth of all soil aggregates within the grid cell, and is a constant.
6. The soil data analysis method based on image processing according to claim 3, characterized in that: S300 comprises: S301, analyzing the structure index difference of adjacent abnormal areas in the virtual scene, and merging if the difference is less than a set threshold value, and the structure index of the merged abnormal area is the average value of the structure indexes of all abnormal areas before merging; S302, repeatedly merge the abnormal zones until no adjacent abnormal zones or the structural index difference of adjacent abnormal zones is no longer less than the set threshold value; S303, according to the image data, extract the feature parameters of the soil in the abnormal zone, use machine learning algorithm to analyze and predict the water content, and analyze and predict the water evaporation speed through the temperature and humidity in the environmental information of the abnormal zone; S304. Obtain the optimal soil moisture content at the crop root zone in the planting requirements. Subtract the predicted moisture content The evaporation volume is obtained; the evaporation duration of each abnormal area is calculated based on the evaporation volume and the predicted water evaporation rate.
7. The soil data analysis method based on image processing according to claim 6, characterized in that: The feature parameters include color features, texture indicators, pore parameters and spectral indexes; Color features: calculate the hue mean, brightness variance and saturation gradient of the abnormal zone in RGB and HSV space; Texture indicators: extract the contrast, entropy and angular second moment of the abnormal zone based on the gray level co-occurrence matrix; Pore parameters: binarize the abnormal zone image, calculate the pore curvature, equivalent diameter and connectivity density; Spectral index: normalized difference water index NDWI constructed by near-infrared and shortwave infrared bands; Construct a water content prediction model, train it using a sample set containing soil images and measured water content, use a feature fusion layer to integrate color, texture, pore and spectral parameters, and establish a nonlinear mapping relationship between multiple parameters and water content through a convolutional neural network; Input the multi-dimensional feature parameters of the abnormal zone soil into the water content prediction model, and output the predicted water content of the corresponding abnormal zone soil.
8. The soil data analysis method based on image processing according to claim 6, characterized in that: The analysis and prediction of water evaporation speed includes: Construct a water evaporation speed prediction model through machine learning algorithm, and use support vector regression or long short-term memory network LSTM as the machine learning algorithm; Establish a nonlinear mapping relationship between temperature, humidity and water evaporation speed, train based on historical data set, and the data set contains synchronously collected temperature, humidity and measured evaporation speed; Input the temperature and humidity in the environmental information of the abnormal zone into the pre-trained water evaporation speed prediction model, and output the predicted water evaporation speed of the corresponding abnormal zone.
9. The soil data analysis method based on image processing according to claim 6, characterized in that: In S400, label the abnormal zone in the virtual scene, add the evaporation time to the current time to get the rework time of each abnormal zone; Sort all abnormal zones in order from small to large according to the evaporation time, and the abnormal zones wait for rework farming according to the order.
10. An image processing based soil data analysis system, characterized by: The system includes a dynamic perception module, an image processing module, a data analysis module and a planning management module; The dynamic perception module is used to collect environmental information and planting requirements, and to sample the soil of the field before farming; build a virtual scene through image data of the field after farming, and map the soil conditions; The image processing module is used to set grid zones in the virtual scene and identify soil aggregates; calculate the structural index based on environmental information and planting requirements, and divide the abnormal zone; The data analysis module is used to merge adjacent abnormal zones according to the structural index difference, use machine learning algorithm to analyze and predict the water content and the water evaporation speed, and calculate the evaporation time of each abnormal zone; The planning management module is used to label the abnormal zone in the virtual scene, and plan the rework sequence and rework time of the abnormal zone according to the evaporation time.