A rapid measurement method for soil salinity
By acquiring images of soil surface cracks and utilizing fractal features and a multivariate linear regression model, the hysteresis and error problems of traditional soil salinity measurement methods are resolved, enabling rapid, non-destructive, and accurate measurement of soil salinity, making it suitable for large-scale salinized soil monitoring.
Patent Information
- Application Number
- CN202310647217.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-02
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-06-02
AI Technical Summary
Traditional soil salinity measurement methods consume a lot of manpower and material resources, the results are delayed and it is difficult to achieve rapid observation over a large area. The conductivity method has large measurement errors and poor stability. The remote sensing inversion method has long data time intervals and poor spatial accuracy.
By acquiring crack images on the soil surface and utilizing fractal features and a multivariate linear regression model, a rapid measurement method is established, including image preprocessing, crack feature extraction, and box dimension calculation, to achieve rapid and non-destructive measurement of soil salinity.
It realizes the rapid, non-destructive and accurate field measurement of soil salinity, reduces costs, improves the real-time and accuracy of measurement, reduces soil erosion, and is suitable for large-area soil salinity monitoring.
Smart Images

Figure CN116773530B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of soil measurement, and in particular relates to a method for quickly measuring soil salinity. Background Art
[0002] Soil salinization can severely impact soil structure, significantly deteriorating physical properties such as soil connectivity, density, water permeability, and strength. This not only threatens the sustainable development of irrigated agriculture worldwide but also significantly reduces soil resilience to natural disasters. Due to the impacts of global climate change and irrational human activities such as overgrazing and flood irrigation, soil salinization is becoming increasingly prominent, and the degree of soil salinization, particularly secondary salinization, is increasing annually. Therefore, strengthening monitoring of the extent and scope of salinized soils and rapidly, efficiently, and accurately obtaining information on soil salt content are crucial for determining soil salinization levels, guiding soil improvement efforts, controlling soil degradation, and increasing grain and crop yields.
[0003] Soil salinity refers to the sum of the eight major ions in the soil, mainly including Na + ions, K + ions, Ca 2+ ions and Mg 2+ ions, four major soil cations, and Cl - ions, SO4 2- ions, HCO3 - ions and CO3 2- The traditional method of measuring soil salinity is to prepare soil extract with a water-soil ratio of 5:1, measure different soil ions separately using different measurement methods, and then add up the different soil ion contents to get the real soil salinity level. Specifically, the flame photometer method is used to measure Na + and K + ; Measure Ca using EDTA complexometric titration 2+ and Mg 2+ ; Use AgNO3 solution to titrate soil extract to obtain Cl - Content; CO is measured by double indicator neutralization method 2- and HCO3 - ;Measure SO4 using barium sulfate turbidimetry 2-ion content, and then the contents of all eight major soil ions are added together to obtain the soil salinity. Although traditional laboratory methods can obtain soil salinity information with high accuracy, this method consumes a lot of manpower, material resources and financial resources. It also requires advanced field measurements of soil samples and indoor drying, weighing and other operations. Therefore, the measurement results have a strong lag and usually cannot reflect the actual salt content of field soils under natural conditions in real time. In addition, traditional laboratory measurement methods for soil salinity are also restricted by factors such as the distribution characteristics of soil sample points and the number of sampling points. It is difficult to achieve rapid and synchronous observation of soil salt content over a large area. At the same time, traditional laboratory measurement methods for soil salinity also greatly limit the identification of the physical and chemical properties of salinized soils, and in-depth research on the dynamic mechanism of changes in soil salinization and its evolution process. Summary of the Invention
[0004] Based on the above shortcomings, the present invention provides a rapid measurement method for soil salinity, which solves the problems of hysteresis in traditional laboratory measurement results of salt content, large error and poor stability in conductivity measurement results, and long time interval and poor spatial accuracy of remote sensing inversion method data.
[0005] The technology used in the present invention is as follows: A method for quickly measuring soil salinity, the steps are as follows:
[0006] Step 1: Acquisition of cracked soil surface images
[0007] Using a fixed stand, a compass, a digital camera, a spectrophotometer, a colorimetric plate, a square frame with a 50 cm inner frame length, and a square calibration plate with a 50 cm outer frame and a black and white checkerboard grid, where each black and white checkerboard grid has a side length of 1 cm, the method uses a fixed height to uniformly capture images of surface cracks on the surface of sticky saline-alkali soil under natural conditions in the field. The images of cracks on the surface of cracked saline-alkali soil under uniform field photography conditions are obtained.
[0008] Step 2: Standardization preprocessing of crack images
[0009] The crack images on the soil surface were geometrically corrected using a black and white rectangular grid calibration plate to remove the geometric distortion error caused by the central photogrammetry method during the photography process. A uniform size was selected and standardized cropping, grayscale processing, and binarization preprocessing were performed on the crack images of different salinized soil surfaces to obtain standardized images of the cracked soil surface.
[0010] Step 3: Calculation of box dimension fractal features
[0011] The standardized image of the cracked soil surface is further binarized to obtain a binary image of the soil crack that only represents the crack part and the soil surface part. Based on the binary image, the box dimension calculation formula is used to calculate the fractal dimension of the standard binary soil crack image under different division conditions of two, three, five, and seven equal parts, thereby realizing the calculation and extraction of the fractal features of the crack image on the salinized soil surface.
[0012] Step 4: Establishment of salt content prediction model
[0013] Using the box dimensions of the surface crack images of soil samples calculated under different division conditions, such as bisection, trisection, quinsection and septsection, a quantitative relationship between the fractal characteristics of surface cracks in salinized soil and the soil salt content was established under completely dry conditions. A multivariate linear regression prediction model for soil salt content was established based on the box dimension extraction results under different division conditions as the independent variable and the soil salt content as the dependent variable.
[0014] Step 5: Rapid field measurement of soil salinity
[0015] The actual measured soil surface crack images are used to extract the fractal characteristics of the soil surface crack box dimension. The box dimension calculation results are used as input parameters into the established cracked salinized soil salt content prediction model to achieve rapid and efficient online measurement of the salt content of salinized soil under natural conditions in the field.
[0016] Furthermore, step 1 is as follows:
[0017] The first step is to install the digital camera on a fixed bracket before collecting each soil crack image. At the same time, adjust the posture of the digital camera so that the lens is perpendicular to the ground surface and at a fixed height of 1m from the ground surface.
[0018] The second step is to place a square frame centered on the projection of the lens center on the ground. Use a compass to adjust the orientation of the square frame using true north as the reference direction, so that the edge of the square frame is perpendicular to true north.
[0019] The third step is to measure and standardize the exposure intensity of the photos using a spectrophotometer. Using a colorimetric plate, white balance correction is performed on the digital camera at the determined uniform exposure intensity. Camera parameters such as aperture, focal length, and exposure time are set to a uniform level. Each cracked soil surface is photographed, and crack images of the cracked salinized soil surface are obtained under uniform field photography conditions.
[0020] The fourth step is to place the calibration plate inside the square frame, remove the square frame, and take another photo of the calibration plate as a reference standard image for the geometric correction of the cracked soil surface image. Following the above steps, 200 photos of the cracked salinized soil surface with different salt contents are taken. After each sample point is photographed, a 20 cm sample of the soil surface is collected for the measurement of soil salinity in the laboratory.
[0021] Furthermore, step 2 is as follows:
[0022] The first step is to correct the geometric distortion of the calibration plate based on the vertex of each checkerboard grid, using the four vertices of the calibration plate as reference points. This removes the geometric deformation and recalibrates it to the standard original checkerboard grid shape. The polynomial geometric correction model parameters at this time are recorded and used as the unified geometric correction standard for all soil crack images.
[0023] In the second step, all crack images are geometrically corrected according to the polynomial correction formula for geometric distortion correction;
[0024] In the third step, the crack image after geometric distortion correction is cropped, and the crack image with a side length of 50 cm in the square frame is cropped as the standardized image of the processed cracked soil surface.
[0025] Furthermore, step 3 is as follows:
[0026] The first step is to extract the red component image, green component image, and blue component image of the standardized image of each processed cracked soil sample, extract the second-order matrix data R corresponding to the red component image, the second-order matrix data G corresponding to the green component image, and the second-order matrix data B corresponding to the blue component image, and use the formula P = (R + G + B) / 3 to calculate the mean of the matrix data corresponding to the three color components to convert the standardized color image of the crack image into a standardized grayscale image of the crack image;
[0027] In the second step, for each soil sample, the pixel grayscale value statistical histogram of the crack image standardized grayscale image is calculated. The lowest point of the valley between the waveform representing the crack area and the waveform representing the soil area in the grayscale value statistical histogram is used as the grayscale value threshold. The grayscale values of all pixels below the threshold in the crack image standardized grayscale image are set to 0, and the grayscale values of all pixels above the threshold in the crack image standardized grayscale image are set to 1, thereby realizing the binarization processing of the crack image standardized grayscale image.
[0028] In the third step, for each cracked soil sample, a pixel number threshold T is set, and single connected areas with a value less than T are treated as noise for removal. This removes the noise point information on the image during the binarization process, as well as the image noise information caused by salt analysis and weeds on the soil surface.
[0029] In the fourth step, in order to highlight the crack characteristics and facilitate the calculation of the crack area, the binary image is inverted, all pixel values equal to 1 are reset to 0, and all pixel values equal to 0 are reset to 1.
[0030] Furthermore, step 4 is as follows: for the crack image on the soil surface, the box count dimension is determined by counting the number of square boxes covering the set in the crack image. The box count dimension calculation formula is as follows:
[0031]
[0032] Where δ represents the side length of the square box surrounding the image, and N(δ) represents the number of non-empty boxes with a given required side length δ. Since δ cannot be considered infinitesimal in actual calculations, the box dimension is usually expressed as the slope value of the linear equation corresponding to δ and N(δ) in a double logarithmic coordinate system. The box dimension fractal features of all soil sample crack images were extracted using MATLAB software. The specific extraction steps are as follows:
[0033] In the first step, an initial mesh of appropriate size is selected to cover the entire binary crack image;
[0034] In the second step, the crack image is divided into N × N subgrids, and equal partitions of 2, 3, 5, and 7 are selected. In the third step, the subgrids are further divided repeatedly using the same method in different iterations until the size of the grid reaches one pixel.
[0035] In the fourth step, 1 / δ and the number of non-empty boxes N(δ) are recorded in a double logarithmic coordinate system, and a linear fit is performed on the box count size of the crack image to calculate the 2-equal-division box dimension B1, 3-equal-division box dimension B2, 5-equal-division box dimension B3, and 7-equal-division box dimension B4 of each soil crack image.
[0036] Furthermore, step 5 is specifically as follows: a data set of the total salt content S of 200 soil samples with different salt contents is measured in the laboratory. Based on the data set of the 200 samples divided into two equal parts with a box dimension B1, a data set of the 3 equal parts with a box dimension B2, a data set of the 5 equal parts with a box dimension B3, and a data set of the 7 equal parts with a box dimension B4, a multiple linear regression model is established with the total salt content S as the dependent variable and the box dimension extraction results under different equal division conditions as the independent variable. The model form is:
[0037] S=K1×B1+K2×B2+K3×B3+K4×B4+K0
[0038] Among them, K1, K2, K3 and K4 are the variable parameters of the bisection box dimension B1, trisection box dimension B2, quinsection box dimension B3 and septsection box dimension B4 in the model respectively, and K0 is the constant term of the model;
[0039] After the model is established, under field conditions, crack images of the cracked salinized soil surface under uniform photographic conditions are obtained according to the method of step 1. The crack photos are subjected to standardized preprocessing operations and binarization operations according to the methods of steps 2 and 3, respectively. Then, the bisection box dimension b1, trisection box dimension b2, quinsection box dimension b3, and septsection box dimension b4 actually calculated from the soil sample photos are introduced into the multivariate linear prediction model to realize the online measurement of soil salinity under natural field conditions.
[0040] The present invention has outstanding beneficial effects and advantages: the present invention can realize the field rapid, non-destructive and accurate measurement of soil salinity. Compared with the laboratory, conductivity and remote sensing methods, the method involved in the present invention has the advantages of simple measurement process, low cost, small loss, low cost, strong stability, and real-time and quasi-real-time performance. At the same time, the online soil salinity measurement method involved in the present invention does not destroy the original field soil under field conditions, so it can greatly reduce the soil and water loss caused by the measurement process. In addition, compared with the traditional soil salinity measurement method, the salt content measurement method involved in the present invention has a high degree of automation in the crack photo acquisition and crack parameter extraction process, and can simultaneously process a large number of cracked salinized soil surface images in batches by programming means, so it can achieve efficient and low-cost measurement of soil salinity. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 To provide standardized color photographs of soil surface cracks under uniform photographic conditions;
[0042] Figure 2 This is the geometric correction result of the color standardized photograph of soil surface cracks;
[0043] Figure 3 This is the cropped result of the crack image after geometric distortion correction;
[0044] Figure 4 is the normalized grayscale image of the crack image;
[0045] Figure 5 Gray value statistical histogram of the standardized grayscale image of the crack image;
[0046] Figure 6This is the result of binary processing of the standardized grayscale image of the crack image;
[0047] Figure 7 This is the denoising result of the crack image binary image;
[0048] Figure 8 is the inverse result of the crack image binary image;
[0049] Figure 9 Schematic diagram of the box dimension distribution of the binary image inversion result under different equal division conditions; DETAILED DESCRIPTION
[0050] The present invention is further described with examples below:
[0051] Example 1
[0052] A quick method for measuring soil salinity, the steps are as follows:
[0053] Step 1: Acquisition of cracked soil surface images
[0054] Using a fixed stand, a compass, a digital camera, a spectrophotometer, a colorimetric plate, a square frame with an inner frame length of 50 cm and a square calibration plate with an outer frame length of 50 cm and a black and white checkerboard grid, where each black and white checkerboard grid has a side length of 1 cm, a uniform standard image of surface cracks on the surface of a sticky saline-alkali soil as water evaporates in the field is obtained at a fixed height. The specific steps are as follows:
[0055] The first step is to install the digital camera on a fixed bracket before collecting each soil crack image. At the same time, adjust the posture of the digital camera so that the lens is perpendicular to the ground surface and at a fixed height of 1m from the ground surface.
[0056] The second step is to place a square frame centered on the projection of the lens center on the ground. Use a compass to adjust the orientation of the square frame using true north as the reference direction, so that the edge of the square frame is perpendicular to true north.
[0057] The third step is to measure and unify the exposure intensity of the photos using a spectrophotometer. The digital camera is white-balanced using a colorimetric plate under the determined uniform exposure intensity. The camera parameters of aperture, focal length, and exposure time are set uniformly. The characteristic image of the crack on each cracked soil surface is photographed to obtain the crack image of the cracked salinized soil surface under the uniform field photography conditions. Figure 1 As shown;
[0058] The fourth step is to place the calibration plate inside the square frame, remove the square frame, and take another photo of the calibration plate as a reference standard image for the geometric correction of the cracked soil surface image. Following the above steps, 200 photos of the cracked salinized soil surface with different salt contents are taken. After each sample point is photographed, a 20 cm sample of the soil surface is collected for the measurement of soil salinity in the laboratory.
[0059] Step 2: Standardization preprocessing of crack images
[0060] The crack images on the soil surface were geometrically corrected using a black and white rectangular grid calibration plate to remove the geometric distortion error caused by the central photogrammetry method during the photography process. A uniform size was selected and standardized cropping, grayscale processing, and binarization preprocessing were performed on the crack images of different salinized soil surfaces to obtain standardized images of the cracked soil surface. The specific steps are as follows:
[0061] The first step is to correct the geometric distortion of the calibration plate based on the vertex of each checkerboard grid, using the four vertices of the calibration plate as reference points. This removes the geometric deformation and recalibrates it to the standard original checkerboard grid shape. The polynomial geometric correction model parameters at this time are recorded and used as the unified geometric correction standard for all soil crack images.
[0062] In the second step, all crack images are corrected for geometric distortion according to the polynomial correction formula for geometric distortion correction, as follows: Figure 2 As shown;
[0063] The third step is to crop the crack image after geometric distortion correction, and crop the crack image with a side length of 50 cm in the square frame as the standardized image of the cracked soil surface after processing, as shown in Figure 2. Figure 3 shown.
[0064] Step 3: Calculation of box dimension fractal features
[0065] The standardized image of the cracked soil surface is further binarized to obtain a binary image of the soil crack that only represents the crack part and the soil surface part. Based on the binary image, the box dimension calculation formula is used to calculate the fractal dimension of the standard binary soil crack image under different equal division conditions of two equal divisions, three equal divisions, five equal divisions, and seven equal divisions, thereby realizing the calculation and extraction of the fractal features of the crack image on the salinized soil surface. The specific steps are as follows:
[0066] The first step is to extract the red component image, green component image, and blue component image of the standardized image of each processed cracked soil sample, extract the second-order matrix data R corresponding to the red component image, the second-order matrix data G corresponding to the green component image, and the second-order matrix data B corresponding to the blue component image, and use the formula P = (R + G + B) / 3 to calculate the mean of the matrix data corresponding to the three color components to realize the conversion of the crack image standardized color image into the crack image standardized grayscale image, as shown in Figure 2. Figure 4 As shown;
[0067] In the second step, for each soil sample, the pixel grayscale value statistical histogram of the standardized grayscale image of the crack image is calculated, and the lowest valley value between the waveform representing the crack area and the waveform representing the soil area in the grayscale value statistical histogram is used as the grayscale value threshold, as shown in the following example: Figure 5 As shown, the grayscale values of all pixels in the crack image normalized grayscale image that are lower than the threshold are set to 0, and the grayscale values of all pixels in the crack image normalized grayscale image that are higher than the threshold are set to 1, so as to realize the binarization processing of the crack image normalized grayscale image, as shown in FIG. Figure 6 As shown;
[0068] In the third step, for each cracked soil sample, a pixel number threshold T is set, and the single connected area less than T is removed as noise, thereby removing the noise point information on the image during the binarization process, as well as the image noise information caused by salt analysis and weeds on the soil surface. Figure 7 As shown;
[0069] The fourth step is to highlight the crack characteristics and facilitate the calculation of the crack area, and to invert the binary image, reset all pixel values equal to 1 to 0, and reset all pixel values equal to 0 to 1. Figure 8 shown.
[0070] Step 4: Establishment of salt content prediction model
[0071] Using the box dimensions of the crack images on the soil sample surface calculated under different conditions of bisection, trisection, quinsection, and septsection, a quantitative relationship between the fractal characteristics of the cracks on the salinized soil surface and the soil salinity was established under completely dry conditions. A multivariate linear regression prediction model for soil salinity was established based on the box dimension extraction results under different bisection conditions as the independent variable and the soil salinity as the dependent variable. Step 4 is as follows: For the crack image on the soil surface, the box count dimension is determined by calculating the number of square boxes covering the set within the crack image. The box count size calculation formula is as follows:
[0072]
[0073] Where δ represents the side length of the square box surrounding the image, and N(δ) represents the number of non-empty boxes with a given required side length δ. Since δ cannot be regarded as infinitesimal in actual calculations, the box dimension is usually expressed as the slope value of the linear equation corresponding to δ and N(δ) in a double logarithmic coordinate system. The box dimension fractal features of all soil sample crack images were extracted using MATLAB software, as shown in the following example: Figure 9 As shown, the specific steps of the extraction method are as follows:
[0074] In the first step, an initial mesh of appropriate size is selected to cover the entire binary crack image;
[0075] In the second step, the crack image is divided into N × N subgrids, and equal partitions of 2, 3, 5, and 7 are selected. In the third step, the subgrids are further divided repeatedly using the same method in different iterations until the size of the grid reaches one pixel.
[0076] In the fourth step, 1 / δ and the number of non-empty boxes N(δ) are recorded in a double logarithmic coordinate system, and a linear fit is performed on the box count size of the crack image to calculate the 2-equal-division box dimension B1, 3-equal-division box dimension B2, 5-equal-division box dimension B3, and 7-equal-division box dimension B4 of each soil crack image.
[0077] Step 5: Rapid field measurement of soil salinity
[0078] The actual measured soil surface crack image is used to extract the fractal characteristics of the box dimension of the soil surface crack, and the box dimension calculation result is used as an input parameter to the established cracked salinized soil salt content prediction model, thereby realizing a fast and efficient online measurement of the salinized soil salt content under natural field conditions. Step 5 is as follows: a data set of the total salt content S of 200 soil samples with different salt contents is measured in the laboratory. Based on the data set of the 200 samples divided into two equal parts with the box dimension B1, the data set of the box dimension B2, the data set of the box dimension B3, and the data set of the box dimension B4, a multiple linear regression model is established with the total salt content S as the dependent variable and the box dimension extraction results under different equal division conditions as the independent variable. The model form is:
[0079] S=K1×B1+K2×B2+K3×B3+K4×B4+K0
[0080] Among them, K1, K2, K3 and K4 are the variable parameters of the bisection box dimension B1, trisection box dimension B2, quinsection box dimension B3 and septsection box dimension B4 in the model respectively, and K0 is the constant term of the model;
[0081] After the model is established, under field conditions, crack images of the cracked salinized soil surface under uniform photographic conditions are obtained according to the method of step 1. The crack photos are subjected to standardized preprocessing operations and binarization operations according to the methods of steps 2 and 3, respectively. Then, the bisection box dimension b1, trisection box dimension b2, quinsection box dimension b3, and septsection box dimension b4 actually calculated from the soil sample photos are introduced into the multivariate linear prediction model to realize the online measurement of soil salinity under natural field conditions.
Claims
1. A method for rapid measurement of soil salinity, characterized in that: Here are the steps: Step 1: Acquisition of cracked soil surface images Using a fixed stand, a compass, a digital camera, a spectrophotometer, a colorimetric plate, a square frame with an inner frame length of 50 cm and a square calibration plate with an outer frame length of 50 cm and a black and white checkerboard grid, where each black and white checkerboard grid has a side length of 1 cm, the image of surface cracks on the surface of sticky saline-alkali soil as water evaporates under natural conditions in the field is obtained at a fixed height and in a unified standard. The crack images of the cracked saline-alkali soil surface under the uniform field photography conditions are obtained; Step 2: Standardization preprocessing of crack images The crack images on the soil surface were geometrically corrected using a black and white rectangular grid calibration plate to remove the geometric distortion error caused by the central photogrammetry method during the photography process. A uniform size was selected and standardized cropping, grayscale processing, and binarization preprocessing were performed on the crack images of different salinized soil surfaces to obtain standardized images of the cracked soil surface. Step 3: Calculation of box dimension fractal features The standardized image of the cracked soil surface is further binarized to obtain a binary image of the soil crack that only represents the crack part and the soil surface part. Based on the binary image, the box dimension calculation formula is used to calculate the fractal dimension of the standard binary soil crack image under different division conditions of two, three, five, and seven equal parts, thereby realizing the calculation and extraction of the fractal features of the crack image on the salinized soil surface. Step 4: Establishment of salt content prediction model Using the box dimensions of surface crack images of soil samples calculated under different conditions of bisection, trisection, quinsection, and septsection, a quantitative relationship between the fractal characteristics of surface cracks in salinized soil and soil salinity was established under completely dry conditions. A multivariate linear regression prediction model for soil salinity was established, using the box dimension extraction results under different bisection conditions as the independent variable and soil salinity as the dependent variable. Step 5: Rapid field measurement of soil salinity The actual measured soil surface crack images are used to extract the fractal characteristics of the soil surface crack box dimension. The box dimension calculation results are used as input parameters into the established cracked salinized soil salt content prediction model to achieve online measurement of the salt content of salinized soil under natural conditions in the field.
2. A rapid soil salinity measurement method according to claim 1, characterized in that: Step 1 is as follows: The first step is to install the digital camera on a fixed bracket before collecting each soil crack image. At the same time, adjust the posture of the digital camera so that the lens is perpendicular to the ground surface and at a fixed height of 1m from the ground surface. The second step is to place a square frame centered on the projection of the lens center on the ground. Use a compass to adjust the orientation of the square frame using true north as the reference direction, so that the edge of the square frame is perpendicular to true north. The third step is to measure and standardize the exposure intensity of the photos using a spectrophotometer. Using a colorimetric plate, white balance correction is performed on the digital camera at the determined uniform exposure intensity. Camera parameters such as aperture, focal length, and exposure time are set to a uniform level. Each cracked soil surface is photographed, and crack images of the cracked salinized soil surface are obtained under uniform field photography conditions. The fourth step is to place the calibration plate inside the square frame, remove the square frame, and take another photo of the calibration plate as a reference standard image for the geometric correction of the cracked soil surface image. Following the above steps, 200 photos of the cracked salinized soil surface with different salt contents are taken. After each sample point is photographed, a 20 cm sample of the soil surface is collected for the measurement of soil salinity in the laboratory.
3. The method for rapid measurement of soil salinity according to claim 2, characterized in that: Step 2 is as follows: The first step is to correct the geometric distortion of the calibration plate based on the vertex of each checkerboard grid, using the four vertices of the calibration plate as reference points. This removes the geometric deformation and recalibrates it to the standard original checkerboard grid shape. The polynomial geometric correction model parameters at this time are recorded and used as the unified geometric correction standard for all soil crack images. In the second step, all crack images are corrected for geometric distortion according to the polynomial correction formula for geometric distortion correction; In the third step, the crack image after geometric distortion correction is cropped, and the crack image with a side length of 50 cm in the square frame is cropped as the standardized image of the processed cracked soil surface.
4. The method for rapid measurement of soil salinity according to claim 3, characterized in that: Step 3 is as follows: The first step is to extract the red component image, green component image, and blue component image of the standardized image of each processed cracked soil sample, extract the second-order matrix data R corresponding to the red component image, the second-order matrix data G corresponding to the green component image, and the second-order matrix data B corresponding to the blue component image, and use the formula P=(R+G+B) / 3 to calculate the mean of the matrix data corresponding to the three color components to realize the conversion of the standardized color image of the crack image into the standardized grayscale image of the crack image; In the second step, for each soil sample, the pixel grayscale value statistical histogram of the crack image standardized grayscale image is calculated. The lowest point of the valley between the waveform representing the crack area and the waveform representing the soil area in the grayscale value statistical histogram is used as the grayscale value threshold. The grayscale values of all pixels below the threshold in the crack image standardized grayscale image are set to 0, and the grayscale values of all pixels above the threshold in the crack image standardized grayscale image are set to 1, thereby realizing the binarization processing of the crack image standardized grayscale image. In the third step, for each cracked soil sample, a pixel number threshold T is set, and single connected areas with a value less than T are treated as noise for removal. This removes the noise point information on the image during the binarization process, as well as the image noise information caused by salt analysis and weeds on the soil surface. In the fourth step, in order to highlight the crack characteristics and facilitate the calculation of the crack area, the binary image is inverted, all pixel values equal to 1 are reset to 0, and all pixel values equal to 0 are reset to 1.
5. A rapid soil salinity measurement method according to claim 4, characterized in that: Step 4 is as follows: For the crack image on the soil surface, the box count dimension is determined by counting the number of square boxes covering the set within the crack image. The box count dimension calculation formula is as follows: , where δ represents the side length of the square box surrounding the image, and N(δ) represents the number of non-empty boxes with a given required side length δ. Since δ cannot be considered infinitesimal in actual calculations, the box dimension is represented by the slope value of the linear equation corresponding to δ and N(δ) in the double logarithmic coordinate system. The box dimension fractal features of all soil sample crack images were extracted using MATLAB software. The specific extraction steps are as follows: In the first step, an initial mesh of appropriate size is selected to cover the entire binary crack image; In the second step, the crack image is divided into N × N subgrids, and equal partitions with 2, 3, 5, and 7 are selected; The third step is to further repeatedly divide the subgrid using the same method in different iterations until the size of the grid reaches one pixel; In the fourth step, 1 / δ and the number of non-empty boxes N(δ) are recorded in a double logarithmic coordinate system, and a linear fit is performed on the box count size of the crack image to calculate the 2-equal-division box dimension B1, 3-equal-division box dimension B2, 5-equal-division box dimension B3, and 7-equal-division box dimension B4 of each soil crack image.
6. A rapid soil salinity measurement method according to claim 5, characterized in that: Step 5 is as follows: Measure the total salt content S of 200 soil samples with different salinity in the laboratory. Based on the data set of 200 samples divided into two equal parts with box dimension B1, the data set of three equal parts with box dimension B2, the data set of five equal parts with box dimension B3, and the data set of seven equal parts with box dimension B4, establish a multiple linear regression model with total salt content S as the dependent variable and the box dimension extraction results under different equal division conditions as the independent variable. The model form is: S=K1×B1+K2×B2+K3×B3+K4×B4+K0 Among them, K1, K2, K3 and K4 are the variable parameters of the bisection box dimension B1, trisection box dimension B2, quinsection box dimension B3 and septsection box dimension B4 in the model respectively, and K0 is the constant term of the model; After the model is established, under field conditions, crack images of the cracked salinized soil surface under uniform photographic conditions are obtained according to the method of step 1. The crack photos are subjected to standardized preprocessing operations and binarization operations according to the methods of steps 2 and 3, respectively. Then, the bisection box dimension b1, trisection box dimension b2, quinsection box dimension b3, and septsection box dimension b4 actually calculated from the soil sample photos are introduced into the multivariate linear prediction model to realize the online measurement of soil salinity under natural field conditions.
Citation Information
Patent Citations
Soil crack parameter online measuring system and method for realizing soil crack parameter extraction by system
CN104165892A
Method for realizing online measurement of electrical conductivity by utilizing saline-alkali soil crack length
CN104730113A