Soil spatial distribution map generation method and system based on soil properties
By determining the target coefficient with the greatest degree of non-fragmented areas in the soil spatial distribution map generation method and correcting it, the problem of low accuracy of soil spatial distribution images in traditional methods is solved, and higher image accuracy and soil pattern continuity are achieved.
Patent Information
- Application Number
- CN202510032042.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-01-09
AI Technical Summary
Traditional methods mostly use coefficient matrix to delete fixed coefficient positions after DCT conversion, resulting in low accuracy of soil spatial distribution images.
A method for generating soil spatial distribution maps based on soil properties is proposed. By determining the target coefficient with the greatest degree of non-fragmented areas, using the target coefficient as the coefficient to delete the cutoff point, and correcting the target coefficients to improve the accuracy of soil distribution images.
Through improved methods, the accuracy of soil spatial distribution images is improved, making the continuity and integrity of soil maps more suitable for the needs of agricultural production, environmental monitoring and land use planning.
Smart Images

Figure CN119417944B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a method and system for generating a soil spatial distribution map based on soil properties. Background Art
[0002] Soil spatial distribution maps are of great significance in agricultural production, environmental monitoring, and land use planning. Soil spatial distribution maps help farmers and agricultural managers develop scientific planting plans and fertilization strategies by displaying the soil types, fertility, and nutrient status of different regions. Soil spatial distribution maps are also very important in environmental monitoring. By monitoring pollutants and harmful substances in the soil, environmental problems can be discovered in a timely manner and corresponding remediation measures can be taken. In land use planning, soil spatial distribution maps provide important basic data. By analyzing the soil types and fertility status of different regions, land use can be rationally planned, high-intensity agricultural activities can be avoided on unsuitable land, and land resources can be protected. In order to be more effective in the above situations, the accuracy of soil spatial distribution images should be guaranteed.
[0003] Traditional methods delete (or discard) fixed coefficient positions in the soil distribution image by using the coefficient matrix after DCT (Discrete Cosine Transform) conversion to remove the locations with a large degree of scattering in the soil area. However, there are often disadvantages such as little change in the degree of scattering or excessive changes in the soil distribution positions, which leads to low accuracy of the soil spatial distribution image. Summary of the Invention
[0004] In order to solve the technical problem of low accuracy of soil spatial distribution images obtained by DCT transformation, the purpose of the present invention is to provide a method and system for generating soil spatial distribution maps based on soil properties. The technical solutions adopted are as follows:
[0005] The present invention provides a method for generating a soil spatial distribution map based on soil properties, the method comprising:
[0006] Determine an initial distribution image of the target soil space and a first coefficient matrix after discrete cosine transformation thereof, traverse coefficients in the first coefficient matrix and compare adjacent coefficients to determine a target coefficient with the largest degree of non-fragmentation;
[0007] Using the target coefficient as the coefficient deletion cutoff point, the restored soil distribution image and its second coefficient matrix after coefficient deletion are determined;
[0008] Determining the difference in moment coefficients between the first coefficient matrix and the second coefficient matrix, and using the difference in moment coefficients to determine a reasonable degree of change in the target image;
[0009] Determine the reasonable change degree of adjacent images corresponding to multiple coefficients adjacent to the target coefficient, and use the reasonable change degree of the target image and the reasonable change degree of the adjacent images to obtain multiple soil distribution truth levels;
[0010] The target coefficient is corrected using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image.
[0011] Furthermore, the step of traversing the coefficients in the first coefficient matrix and comparing adjacent coefficients to determine the target coefficient with the maximum degree of non-fragmentation area includes:
[0012] Traverse from the coefficient corresponding to the highest frequency position of the first coefficient matrix to the coefficient corresponding to the lowest frequency position in a Z-shaped inverse traversal method;
[0013] Adjacent coefficients are compared to determine the difference in coefficients of the same moment between adjacent coefficients, and the difference in coefficients of the same moment is used to determine the target coefficient with the maximum degree of non-fragmentation.
[0014] Furthermore, the step of determining the target coefficient with the maximum degree of non-fragmentation in the area by using the difference of the same moment coefficients includes:
[0015] Determine the maximum coefficient difference among the coefficient differences of the same moment and the current coefficient difference between the current ergodic coefficient and its previous adjacent coefficient;
[0016] The maximum coefficient difference and the current coefficient difference are used to calculate the degree of non-fragmentation and determine the target coefficient.
[0017] Furthermore, before the step of determining the difference in moment coefficients between the first coefficient matrix and the second coefficient matrix and determining the reasonable degree of change of the target image using the difference in moment coefficients, the method further includes:
[0018] determining soil information in the restored soil distribution image;
[0019] The soil information and the degree of non-fragmented area of the target coefficient are used to determine the target accuracy of using the target coefficient as a coefficient deletion demarcation point.
[0020] Furthermore, the soil information includes: soil type, soil distribution range of each soil type, distribution quantity of the soil distribution range, and number of pixels;
[0021] The step of determining the target accuracy of using the target coefficient as a coefficient deletion delimiting point by using the soil information and the non-fragmentation area degree of the target coefficient comprises:
[0022] The target accuracy of taking the target coefficient as the coefficient deletion demarcation point is calculated using the distribution quantity, the number of pixel points and the mean value of all soil distribution ranges of each soil type.
[0023] Furthermore, the step of determining the difference in moment coefficients between the first coefficient matrix and the second coefficient matrix, and using the difference in moment coefficients to determine a reasonable degree of change of the target image includes:
[0024] determining the difference in coefficients of different moments between coefficients at the same frequency position in the first coefficient matrix and the second coefficient matrix;
[0025] The reasonable change degree of the target image is calculated using the difference in the moment coefficients and the target accuracy.
[0026] Furthermore, the steps of obtaining multiple soil distribution authenticity levels using the reasonable change degree of the target image and the reasonable change degree of the adjacent images include:
[0027] Determine the maximum reasonable image change degree among the reasonable change degrees of the target image and the reasonable change degrees of each adjacent image;
[0028] The true degree of each soil distribution is calculated using the reasonable change degree of the target image or the reasonable change degree of each adjacent image, as well as the reasonable change degree of the maximum image.
[0029] Furthermore, the steps of respectively calculating the true degree of each soil distribution using the reasonable change degree of the target image or the reasonable change degree of each adjacent image, and the reasonable change degree of the maximum image, include:
[0030] Determine the target coefficient and multiple coefficients adjacent to the target coefficient as two comparison images before and after coefficient deletion corresponding to the coefficient deletion cutoff points;
[0031] Determine the number of pixels with the same soil type corresponding to the same image position in the two compared images;
[0032] Utilizing the reasonable change degree of the target image or the reasonable change degree of each adjacent image, as well as the reasonable change degree of the maximum image and the number of pixels, respectively calculate the true degree of each soil distribution;
[0033] The two comparison images include an initial distribution image and a restored soil distribution image after deleting the coefficients obtained by deleting each delimiting point.
[0034] Furthermore, the step of correcting the target coefficient using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image includes:
[0035] Determine the maximum true degree among the true degrees of soil distribution;
[0036] determining an actual coefficient corresponding to the maximum true degree, and using the actual coefficient as the corrected target coefficient;
[0037] The corrected target coefficient is used as the coefficient deletion demarcation point to obtain the target soil spatial distribution image after coefficient deletion.
[0038] The present invention further proposes a soil spatial distribution map generation system based on soil properties, the system being used to implement the soil spatial distribution map generation method based on soil properties as described in any one of the above items; the system comprising:
[0039] a matrix conversion module, configured to determine an initial distribution image of the target soil space and a first coefficient matrix after discrete cosine transformation thereof, traverse coefficients in the first coefficient matrix and compare adjacent coefficients to determine a target coefficient with the largest degree of non-fragmentation;
[0040] An image compression module is used to use the target coefficient as a coefficient deletion demarcation point to determine a restored soil distribution image and a second coefficient matrix after the coefficient is deleted;
[0041] A matrix analysis module is used to determine the difference in moment coefficients between the first coefficient matrix and the second coefficient matrix, and use the difference in moment coefficients to determine the reasonable degree of change of the target image; determine the reasonable degree of change of adjacent images corresponding to multiple coefficients adjacent to the target coefficient, and use the reasonable degree of change of the target image and the reasonable degree of change of the adjacent images to obtain multiple true degrees of soil distribution;
[0042] The coefficient correction module is used to correct the target coefficient using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image.
[0043] The present invention has the following beneficial effects:
[0044] The present invention first roughly judges the position of the coefficient to be deleted through the distribution relationship of coefficients at different positions in the DCT coefficient matrix, preliminarily determines the target coefficient as the coefficient deletion demarcation point, then performs DCT inverse transformation on the DCT coefficient matrix after the deletion operation to restore the restored soil distribution image, uses the DCT coefficient matrix to analyze the scattered relationship of the soil in the restored soil distribution image and the comparison relationship between the DCT coefficient matrices of the images before and after the coefficient deletion to judge the rationality of the target coefficient, adjusts and corrects the target coefficient according to the true degree of soil distribution, and finally obtains a more appropriate coefficient retention matrix and a more accurate target soil spatial distribution image, so that the continuity and integrity of the soil patches in the soil spatial distribution image are greater, which is more conducive to the correct reference in subsequent agricultural production, environmental monitoring and land use planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0046] Figure 1 A flowchart of a method for generating a soil spatial distribution map based on soil properties provided by one embodiment of the present invention;
[0047] Figure 2 A detailed flow chart of step S1 in a method for generating a soil spatial distribution map based on soil properties provided by one embodiment of the present invention;
[0048] Figure 3 A detailed flow chart of step S4 in a method for generating a soil spatial distribution map based on soil properties provided by one embodiment of the present invention;
[0049] Figure 4 A detailed flow chart of step S5 in a method for generating a soil spatial distribution map based on soil properties provided by one embodiment of the present invention;
[0050] Figure 5 A schematic diagram of an initial distribution image involved in a method for generating a soil spatial distribution map based on soil properties provided by one embodiment of the present invention;
[0051] Figure 6 A schematic diagram of the coefficient matrix traversal sequence involved in a soil spatial distribution map generation method based on soil properties provided by one embodiment of the present invention;
[0052] Figure 7 This is a schematic diagram of the hardware operating environment of a device for generating a soil spatial distribution map based on soil properties according to an embodiment of the present invention;
[0053] Figure 8 Schematic diagram of the framework structure of a soil spatial distribution map generation system based on soil properties according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] To further illustrate the technical means and effectiveness of the present invention in achieving its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effectiveness of a soil spatial distribution map generation method based on soil properties proposed in accordance with the present invention. In the following description, references to different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0055] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0056] The following describes in detail a method for generating a soil spatial distribution map based on soil properties provided by the present invention with reference to the accompanying drawings.
[0057] Example 1:
[0058] For the soil spatial distribution map generation method based on soil properties provided by the present invention, please refer to Figure 1 , which shows a flowchart of the steps of a method for generating a soil spatial distribution map based on soil properties provided by an embodiment of the present invention.
[0059] The method comprises:
[0060] Step S1, determining an initial distribution image of the target soil space and a first coefficient matrix after discrete cosine transformation thereof, traversing the coefficients in the first coefficient matrix and comparing adjacent coefficients to determine the target coefficient with the largest degree of non-fragmentation;
[0061] In this embodiment, the DCT transform, which stands for Discrete Cosine Transform, is primarily used for data or image compression. It can convert spatial signals into the frequency domain and exhibits excellent decorrelation performance. The DCT transform itself is lossless, but in areas such as image coding, it creates favorable conditions for subsequent quantization and Huffman coding. Furthermore, because the DCT transform is symmetric, the inverse DCT transform can be used after quantization coding to restore the original image information at the receiving end. The DCT transform has a wide range of applications in current image analysis and compression, and is used in common standards such as JPEG still image coding and MJPEG and MPEG dynamic coding.
[0062] Please refer to Figure 5 ,by Figure 5 As the initial distribution image of the target soil space (initial soil space distribution image), the obtained size is The soil spatial distribution image is transformed into DCT, and the spatial domain data is converted into a DCT coefficient matrix to obtain the first coefficient matrix. Each coefficient matrix is also In the DCT coefficient matrix, the diagonal line can be used as a dividing line, the upper left corner The area is where the low-frequency signal (also called low-frequency information or low-frequency component) is located. The area is where the high-frequency signal (also called high-frequency information or high-frequency component) is located.
[0063] The process of acquiring the initial soil spatial distribution image is basically a prior art process and is briefly described as follows:
[0064] 1. Arrange random sampling points in the required mapping area to obtain soil type information at different locations.
[0065] 2. Using the original soil distribution image and new sampling information as reference, a new soil spatial distribution image is obtained through digital soil mapping methods.
[0066] Digital soil mapping is based on the theory of the relationship between soil and landscape. It uses data mining techniques to analyze the correlation between soil properties and the surrounding geographic environment, predict the spatial distribution of soil properties, and generate a raster-based soil map. This method is low-cost, timely, and highly accurate, while also providing information on uncertainty.
[0067] 3. Perform the analysis in the above step 2 on the new soil spatial distribution image to obtain a processed image.
[0068] 4. The final image is compressed and stored as a reference for later agricultural production, environmental monitoring, land use planning and other activities.
[0069] Step S1 is mainly to roughly determine the coefficients or coefficient areas to be deleted, so it is necessary to preliminarily determine the coefficient deletion delimiting point, so as to retain part of the coefficients in the matrix and delete the other part. It can be considered that the coefficients to be deleted are set to 0.
[0070] The purpose of deleting some coefficients and the logic of the deletion operation for this embodiment are:
[0071] Initial soil spatial distribution images often contain numerous small patches due to the scattered distribution of fragmented land areas. These patches can interfere with subsequent use of the image, blurring the boundaries between different soil types. Details such as patch edges in fragmented land areas appear as high-frequency information, while the interiors of larger soil areas appear as low-frequency information. To filter out these fragmented patches, the coefficient distribution in the DCT coefficient matrix should be analyzed and deleted accordingly.
[0072] By deleting high-frequency information from the DCT coefficient matrix, we can remove high-frequency information areas, such as speckles, caused by the scattered and fragmented distribution of land areas in the image. The larger the coefficients representing high-frequency information, the more detailed information, such as speckles, is contained in the soil spatial distribution image. In reality, the scattered distribution of fragmented land areas is more pronounced. The edges of the small speckles that appear in fragmented land areas have similar frequencies within the image. Therefore, we can traverse each coefficient in the coefficient matrix in a specific order. During this traversal, we can compare the differences between adjacent coefficients within the same matrix and determine the degree of non-fragmentation corresponding to each coefficient's potential coefficient deletion cutoff. This allows us to identify and determine the target coefficient with the highest degree of non-fragmentation. The degree of non-fragmentation here represents the likelihood of a speckle location. A larger degree of non-fragmentation indicates that the coefficients previously traversed have larger values, meaning that these previously traversed coefficients are more likely to correspond to a speckle location in the soil spatial distribution image.
[0073] It should be noted that scattered, fragmented, and patchy all refer to the corresponding image areas being small and scattered throughout the image. The patchy area / fragmented soil area here can be quantified as:
[0074] When the ratio of the number of pixels in a certain soil range to the number of all pixels in the soil spatial distribution image is less than 0.02, it is determined to be a soil range with a smaller area, that is, it is defined as a patch area or a fragmented soil area. Conversely, when the ratio is greater than or equal to 0.02, it is determined to be a soil range with a larger area, that is, a non-pattern area or a non-fragmented soil area.
[0075] Please refer to Figure 2 In a specific embodiment, the step of traversing the coefficients in the first coefficient matrix and comparing adjacent coefficients to determine the target coefficient with the largest degree of non-fragmentation includes:
[0076] Step S10, traversing from the coefficient corresponding to the highest frequency position of the first coefficient matrix to the coefficient corresponding to the lowest frequency position in a Z-shaped reverse traversal manner;
[0077] Step S11 , comparing adjacent coefficients to determine the same-moment coefficient differences between adjacent coefficients, and using the same-moment coefficient differences to determine the target coefficient with the maximum degree of non-fragmentation.
[0078] All pairs of DCT coefficient matrices are as follows Figure 6 The Z-type or "Z"-type inverse traversal method shown traverses the coefficients at different positions in the coefficient matrix, starting from the coefficient corresponding to the highest frequency position in the lower right corner to the coefficient corresponding to the lowest frequency position in the upper left corner. The greater the difference between the coefficient values of any two adjacent positions, that is, the greater the difference in coefficients at the same moment, the more it indicates that the frequency value corresponding to the currently traversed coefficient position is no longer the value corresponding to the fragmented land area, and the currently traversed coefficient and the coefficients traversed subsequently should not be deleted. Since the DCT frequency matrix is high-frequency in the lower right corner and low-frequency in the upper left corner, the above-mentioned traversal method from high frequency to low frequency is used.
[0079] To facilitate understanding of the above process, it is also necessary to explain that different positions in the DCT coefficient matrix correspond to different frequency values in the image, and the coefficients represent the energy distribution and characteristics of the image at different frequencies. This is the existing definition and concept.
[0080] Furthermore, step S11 includes:
[0081] Determine the maximum coefficient difference among the coefficient differences of the same moment and the current coefficient difference between the current ergodic coefficient and its previous adjacent coefficient;
[0082] The maximum coefficient difference and the current coefficient difference are used to calculate the degree of non-fragmentation and determine the target coefficient.
[0083] The specific process of step S11 can be described as follows:
[0084] The degree of non-fragmented area of the frequency and coefficient corresponding to the kth current traversal position in the DCT coefficient matrix (here refers to the first coefficient matrix) for:
[0085]
[0086] In the above formula, They are the coefficient values of the kth and k-1th traversal positions respectively, and the current coefficient difference is obtained by subtracting them. For priority traversal The maximum value of the coefficient difference between two adjacent ergodic positions with a higher frequency (maximum coefficient difference). The larger the value of , the more likely it is that the kth coefficient currently traversed does not correspond to the spot position.
[0087] Correspondingly, The larger it is, the larger the coefficient values of the k-1th traversal position and the previous traversal position are, and the more likely it is the pattern position. It is necessary to preliminarily determine that the coefficients of the k-1 and previous positions need to be deleted.
[0088] Through the above formula and process, the degree of non-fragmentation area of any current ergodic coefficient can be obtained, and then the target coefficient with the largest degree of non-fragmentation area can be determined.
[0089] Step S2, using the target coefficient as a coefficient deletion demarcation point, and determining the restored soil distribution image and its second coefficient matrix after coefficient deletion;
[0090] The target coefficient is used as the coefficient deletion demarcation point, and the coefficients traversed before it are deleted. The DCT coefficient matrix after the deletion operation is subjected to DCT inverse transformation to obtain the corresponding restored soil distribution image. In the restored soil distribution image, the fewer the number of soil ranges with smaller areas, and the larger the area of each soil range, the better the current restored soil distribution image is processed, and the higher the degree of reduction of small spots. At the same time, when When the value is larger, it proves that the actual soil range corresponding to the currently deleted coefficient has a clearer boundary with other locations, the larger its own frequency is, the more likely it is a fragmented soil area that should be deleted, and the more accurate the deletion operation is.
[0091] In other words, if the distribution of different soil types in the restored soil distribution image is more concentrated and the presence of fine soil patches is significantly reduced, it proves that the selection of target coefficients and deleted coefficient areas is more reasonable.
[0092] The restored soil distribution image is then subjected to a DCT transform to obtain a new corresponding DCT coefficient matrix, referred to herein as the second coefficient matrix. It should be noted that the second coefficient matrix is different from the matrix after the first coefficient matrix is deleted. This is because after the image changes, the frequency of the same position will change due to changes in the grayscale of the surrounding pixels. Furthermore, the restored soil spatial distribution image obtained after deleting the initial distribution image will change the soil type at certain locations, which will change the soil distribution relationship at different locations in the entire image, thereby changing the DCT coefficient matrix after the DCT transform.
[0093] Step S3, determining the difference in moment coefficients between the first coefficient matrix and the second coefficient matrix, and using the difference in moment coefficients to determine a reasonable degree of change in the target image;
[0094] In one embodiment, before step S3, the method further includes:
[0095] determining soil information in the restored soil distribution image;
[0096] The soil information and the degree of non-fragmented area of the target coefficient are used to determine the target accuracy of using the target coefficient as a coefficient deletion demarcation point.
[0097] Based on the above embodiment, further, the soil information includes: soil type, soil distribution range of each soil type, distribution quantity of the soil distribution range, and number of pixels;
[0098] The step of determining the target accuracy of using the target coefficient as a coefficient deletion delimiting point by using the soil information and the non-fragmentation area degree of the target coefficient comprises:
[0099] The target accuracy of taking the target coefficient as the coefficient deletion demarcation point is calculated using the distribution quantity, the number of pixel points and the mean value of all soil distribution ranges of each soil type.
[0100] The target accuracy of deleting the soil range when deleting the coefficient position by taking the coefficient corresponding to the kth traversal position as the target coefficient and the dividing point for:
[0101]
[0102] In the above formula, is the number of pixels (pixel points) in the jth soil distribution range of the hth soil type. is the number of multiple soil distribution ranges (distribution quantity) of the hth soil type in the restored soil distribution image. is the mean of the sizes of all soil distribution ranges of the hth soil type (mean of all soil distribution ranges). For all soil types The larger the value, the more reasonable the deletion operation is.
[0103] Among them, soil type is a geographical concept, which can be divided into red soil, brown soil, brown soil, black soil, chestnut soil, desert soil, tidal soil and other types.
[0104] The degree of the non-fragmented region of the frequency and coefficient corresponding to the k-th traversal position is mentioned and described in the above embodiment.
[0105] This function is used to restore the total number of smaller soil areas (patchy areas / fragmented soil areas) in the soil distribution image. The smaller the value, the more reasonable the current image processing is. +1 is used to avoid the denominator being 0.
[0106] In summary, the target accuracy The larger it is, the more reasonable the deletion operation using this target coefficient is.
[0107] In a specific embodiment, step S3 includes:
[0108] determining the difference in coefficients of different moments between coefficients at the same frequency position in the first coefficient matrix and the second coefficient matrix;
[0109] The reasonable change degree of the target image is calculated using the difference in the moment coefficients and the target accuracy.
[0110] In order to make the processed image more convenient for use in subsequent operations such as agricultural production, environmental monitoring, and land use planning, this embodiment analyzes the suitability of the restored soil distribution image obtained after the deletion operation by comparing and analyzing the frequency bands of the image.
[0111] The greater the decrease in the coefficient values at corresponding positions at the same frequency in the two DCT coefficient matrices (the first and second coefficient matrices) obtained before and after the deletion operation, and the smaller the proportion of coefficients at high-frequency positions in the new DCT coefficient matrix (the second coefficient matrix), it indicates that the distribution of different types of soil in the restored soil distribution image is more concentrated and more reasonable.
[0112] The same frequency positions in the half of the DCT coefficient matrix obtained before and after the coefficient deletion operation are matched in the order of traversal, and the coefficients are grouped together. That is, any two coefficients at the same frequency position in the first coefficient matrix and the second coefficient matrix are grouped together. Multiple groups are obtained.
[0113] The kth traversal position still corresponds to the target coefficient, thus obtaining the reasonable degree of change of the image before and after the coefficient deletion operation for:
[0114]
[0115] In the above formula, The coefficient values before and after the deletion operation in any j-th group of coefficients are respectively deleted, and the difference in the different moment coefficients is obtained. is the number of corresponding groups, that is, the number of groups. The larger the value of , the more the image after the operation meets the requirements.
[0116] It is the coefficient value of any p-th position in the first half (high-frequency part) of the traversal order after the deletion operation. for , The smaller the value of , the fewer high-frequency areas in the image and the fewer spots there are after the deletion operation.
[0117] Similarly, each coefficient including the target coefficient can be calculated in the above way to obtain the reasonable change degree of the image corresponding to the coefficient deletion cutoff point , as shown below, by the reasonable degree of variation of adjacent images.
[0118] Step S4, determining the reasonable change degree of adjacent images corresponding to multiple coefficients adjacent to the target coefficient, and using the reasonable change degree of the target image and the reasonable change degree of the adjacent images to obtain multiple soil distribution authenticity degrees;
[0119] Based on the above embodiment of step S3, the reasonable change degree of the adjacent images of the multiple coefficients before and after the target coefficient (in the traversal order) in the first coefficient matrix can be obtained in the same way. For the convenience of description, the reasonable change degree of the target image and the reasonable change degree of the adjacent images are collectively referred to as the reasonable change degree of the image, and are expressed as Represents. Using the reasonable degree of image change , the degree of soil distribution authenticity corresponding to each coefficient can be calculated. The degree of soil distribution authenticity here represents the degree of consistency between the soil spatial distribution image after the coefficient deletion operation (the image after the coefficient is deleted and restored) and the initial distribution image. The greater the degree of soil distribution authenticity, the more real and accurate the soil spatial distribution image after the coefficient deletion operation is relative to the actual soil spatial distribution.
[0120] Please refer to Figure 3 In a specific embodiment, step S4 includes:
[0121] Step S40, determining the maximum reasonable image change degree among the reasonable change degrees of the target image and the reasonable change degrees of each adjacent image;
[0122] Step S41 , using the reasonable change degree of the target image or the reasonable change degree of each adjacent image, and the reasonable change degree of the maximum image, respectively calculate the true degree of each soil distribution.
[0123] Specifically, step S41 includes:
[0124] Determine the target coefficient and multiple coefficients adjacent to the target coefficient as two comparison images before and after coefficient deletion corresponding to the coefficient deletion cutoff points;
[0125] Determine the number of pixels with the same soil type corresponding to the same image position in the two compared images;
[0126] Utilizing the reasonable change degree of the target image or the reasonable change degree of each adjacent image, as well as the reasonable change degree of the maximum image and the number of pixels, the true degree of each soil distribution is calculated respectively;
[0127] The two comparison images include an initial distribution image and a restored soil distribution image after deleting the coefficients obtained by deleting each delimiting point.
[0128] In order to prevent the soil spatial distribution image obtained after the deletion operation from being too different from the soil distribution image before the deletion operation, that is, too different from the actual soil distribution, the images before and after the deletion operation need to be superimposed. When the value is larger, the soil types at the same location in the two images before and after the operation are more consistent. This ensures that the soil distribution in the soil spatial distribution image after the deletion operation is more reasonable and accurate, and maximizes the consistency between the final soil spatial distribution image and the actual soil distribution.
[0129] Before and after the target coefficient at the kth position (For example, you can set The coefficients of the adjacent positions are the coefficient deletion delimiting points, and the coefficients before traversal are deleted to obtain the reasonable degree of image change under different deletion operations. The value and the number of pixels with the same soil type at the same position in the image before and after the deletion operation.
[0130] From this, we can get the true degree of soil distribution of restored soil distribution image by deleting any current coefficient for:
[0131]
[0132] In the above formula, Before and after the target coefficient Any of the current adjacent coefficients The coefficient is used as the coefficient deletion cutoff point, that is, the first After deleting the coefficients before the position, we get value. To include the target coefficient The coefficients are deleted separately, and the obtained The maximum value (the maximum reasonable degree of image change).
[0133] To be the first After deleting the coefficient before the position, the number of pixels (number of pixels) with the same soil type at the same position in the image before and after the operation is obtained. The larger the value, the more the restored soil distribution image after the deletion operation conforms to the actual soil distribution.
[0134] Step S5: Correct the target coefficient using the maximum true degree among the true degrees of soil distribution to obtain a target soil spatial distribution image.
[0135] Please refer to Figure 4In a specific embodiment, step S5 includes:
[0136] Step S50, determining the maximum true degree among the true degrees of soil distribution;
[0137] Step S51, determining the actual coefficient corresponding to the maximum true degree, and using the actual coefficient as the corrected target coefficient;
[0138] Step S52: Using the corrected target coefficient as a coefficient deletion demarcation point, a target soil spatial distribution image after coefficient deletion is obtained.
[0139] Based on the embodiment corresponding to step S4, when When the value is the largest, the corresponding coefficient and deletion operation are determined to be the most appropriate to obtain the final target soil spatial distribution image.
[0140] Specifically, the idea of this embodiment is to The goal is to make the value as large as possible, and use the target coefficient as the preliminary and reasonable coefficient deletion cutoff point. Then, we will continuously adjust and test the coefficient that is more suitable as the coefficient deletion cutoff point around the target coefficient. The maximum true degree of soil distribution is determined in the method, that is, the maximum true degree. The maximum true degree is obtained from the target coefficient and a coefficient among its multiple adjacent coefficients. The coefficient is used as the most reasonable actual coefficient for the deletion operation, and the initially determined target coefficient is replaced by the actual coefficient. The corrected target coefficient is then used to delete the coefficients before it (excluding this number), thereby obtaining the matrix after the coefficient deletion operation (which can be called the coefficient retention matrix), and then the matrix is inversely transformed to restore the final target soil spatial distribution image.
[0141] The present invention first roughly judges the position of the coefficient to be deleted through the distribution relationship of coefficients at different positions in the DCT coefficient matrix, preliminarily determines the target coefficient as the coefficient deletion demarcation point, then performs DCT inverse transformation on the DCT coefficient matrix after the deletion operation to restore the restored soil distribution image, uses the DCT coefficient matrix to analyze the scattered relationship of the soil in the restored soil distribution image and the comparison relationship between the DCT coefficient matrices of the images before and after the coefficient deletion to judge the rationality of the target coefficient, adjusts and corrects the target coefficient according to the true degree of soil distribution, and finally obtains a more appropriate coefficient retention matrix and a more accurate target soil spatial distribution image, so that the continuity and integrity of the soil patches in the soil spatial distribution image are greater, which is more conducive to the correct reference in subsequent agricultural production, environmental monitoring and land use planning.
[0142] Example 2:
[0143] The embodiment of the present invention further provides a device for generating a soil spatial distribution map based on soil properties. The device for generating a soil spatial distribution map based on soil properties can be a data processing terminal such as a drone, a computer, or a server.
[0144] like Figure 7 As shown, Figure 7 It is a structural diagram of the hardware operating environment of the soil spatial distribution map generating device based on soil properties involved in the embodiment of the present invention.
[0145] like Figure 7 As shown, the soil property-based soil spatial distribution map generation device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display and an input unit, such as a control panel. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as a disk drive. The memory 1005 may also be a storage device independent of the processor 1001. The memory 1005, which serves as a computer storage medium, may include a soil spatial distribution map generation program.
[0146] Those skilled in the art will understand that Figure 7 The hardware structure shown in the figure does not constitute a limitation of the device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0147] Continue to refer to Figure 7 , Figure 7 The memory 1005 as a computer-readable storage medium may include an operating system, a user interface module, a network communication module, and a soil spatial distribution map generation program.
[0148] exist Figure 7 In the embodiment, the network communication module is mainly used to connect to the server and can communicate data with the server; and the processor 1001 can call the soil spatial distribution map generation program stored in the memory 1005 and execute the steps in the above embodiments.
[0149] The hardware structure of the device for generating a soil spatial distribution map based on soil properties is used to implement various embodiments of the present invention for generating a soil spatial distribution map based on soil properties.
[0150] In addition, the present invention also provides a soil spatial distribution map generation system based on soil properties, please refer to Figure 8 , the soil spatial distribution map generation system based on soil properties includes:
[0151] Matrix conversion module A10, for determining an initial distribution image of the target soil space and a first coefficient matrix after discrete cosine transformation thereof, traversing coefficients in the first coefficient matrix and comparing adjacent coefficients to determine a target coefficient with the largest degree of non-fragmentation;
[0152] An image compression module A20 is configured to use the target coefficient as a coefficient deletion demarcation point to determine a restored soil distribution image and a second coefficient matrix after coefficient deletion;
[0153] The matrix analysis module A30 is used to determine the difference in the moment coefficients between the first coefficient matrix and the second coefficient matrix, and use the difference in the moment coefficients to determine the reasonable degree of change of the target image; determine the reasonable degree of change of adjacent images corresponding to multiple coefficients adjacent to the target coefficient, and use the reasonable degree of change of the target image and the reasonable degree of change of the adjacent images to obtain multiple true degrees of soil distribution;
[0154] The coefficient correction module A40 is used to correct the target coefficient using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image.
[0155] Furthermore, the matrix conversion module A10 is further configured to:
[0156] Traverse from the coefficient corresponding to the highest frequency position of the first coefficient matrix to the coefficient corresponding to the lowest frequency position in a Z-shaped inverse traversal method;
[0157] Adjacent coefficients are compared to determine the difference in coefficients of the same moment between adjacent coefficients, and the difference in coefficients of the same moment is used to determine the target coefficient with the maximum degree of non-fragmentation.
[0158] Furthermore, the matrix conversion module A10 is further configured to:
[0159] Determine the maximum coefficient difference among the coefficient differences of the same moment and the current coefficient difference between the current ergodic coefficient and its previous adjacent coefficient;
[0160] The maximum coefficient difference and the current coefficient difference are used to calculate the degree of non-fragmentation and determine the target coefficient.
[0161] Furthermore, the matrix analysis module A30 is further configured to:
[0162] determining soil information in the restored soil distribution image;
[0163] The soil information and the degree of non-fragmented area of the target coefficient are used to determine the target accuracy of using the target coefficient as a coefficient deletion demarcation point.
[0164] Furthermore, the matrix analysis module A30 is further configured to:
[0165] The target accuracy of taking the target coefficient as the coefficient deletion demarcation point is calculated using the distribution quantity, the number of pixels and the mean of all soil distribution ranges of each soil type.
[0166] Furthermore, the matrix analysis module A30 is further configured to:
[0167] determining the difference in coefficients of different moments between coefficients at the same frequency position in the first coefficient matrix and the second coefficient matrix;
[0168] The reasonable change degree of the target image is calculated using the difference in the moment coefficients and the target accuracy.
[0169] Furthermore, the matrix analysis module A30 is further configured to:
[0170] Determine the maximum reasonable image change degree among the reasonable change degrees of the target image and the reasonable change degrees of each adjacent image;
[0171] The true degree of each soil distribution is calculated using the reasonable change degree of the target image or the reasonable change degree of each adjacent image, as well as the reasonable change degree of the maximum image.
[0172] Furthermore, the matrix analysis module A30 is further configured to:
[0173] Determine the target coefficient and multiple coefficients adjacent to the target coefficient as two comparison images before and after coefficient deletion corresponding to the coefficient deletion cutoff points;
[0174] Determine the number of pixels with the same soil type corresponding to the same image position in the two compared images;
[0175] Utilizing the reasonable change degree of the target image or the reasonable change degree of each adjacent image, as well as the reasonable change degree of the maximum image and the number of pixels, the true degree of each soil distribution is calculated respectively;
[0176] The two comparison images include an initial distribution image and a restored soil distribution image after deleting the coefficients obtained by deleting each delimiting point.
[0177] Furthermore, the coefficient correction module A40 is further configured to:
[0178] Determine the maximum true degree among the true degrees of soil distribution;
[0179] determining an actual coefficient corresponding to the maximum true degree, and using the actual coefficient as the corrected target coefficient;
[0180] The corrected target coefficient is used as the coefficient deletion demarcation point to obtain the target soil spatial distribution image after coefficient deletion.
[0181] The specific implementation of the soil spatial distribution map generation system based on soil properties of the present invention is basically the same as the various embodiments of the soil spatial distribution map generation method based on soil properties described above, and will not be repeated here.
[0182] In addition, the present invention also provides a computer-readable storage medium having a soil spatial distribution map generation program stored thereon, wherein when the soil spatial distribution map generation program is executed by a processor, the steps of the soil spatial distribution map generation method based on soil properties are implemented.
[0183] Among them, the method implemented when the soil spatial distribution map generation program is executed can refer to the various embodiments of the soil spatial distribution map generation method based on soil properties of the present invention, and will not be repeated here.
[0184] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0185] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
[0186] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0187] The above description is only a preferred embodiment of the present invention and does not limit the scope of protection of the present invention. All equivalent structural transformations made by using the contents of the present invention description and drawings under the inventive concept of the present invention, or direct / indirect application in other related technical fields are included in the scope of protection of the present invention.
Claims
1. A method for generating a soil spatial distribution map based on soil properties, characterized in that: The method comprises: Determine the initial distribution image of the target soil space and the first coefficient matrix after discrete cosine transformation thereof, traverse the coefficients in the first coefficient matrix and compare adjacent coefficients to determine the target coefficient with the largest degree of non-fragmentation area; Using the target coefficient as the coefficient deletion demarcation point, determining the restored soil distribution image and its second coefficient matrix after the coefficient is deleted; Determine the difference in different moment coefficients between the first coefficient matrix and the second coefficient matrix, and use the different moment coefficient difference to determine the reasonable degree of change of the target image; Determine the reasonable change degree of adjacent images corresponding to multiple coefficients adjacent to the target coefficient, and obtain multiple soil distribution truth levels using the reasonable change degree of the target image and the reasonable change degree of the adjacent images; The target coefficient is corrected by using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image; The step of traversing the coefficients in the first coefficient matrix and comparing adjacent coefficients to determine the target coefficient with the largest degree of non-fragmentation area includes: Traverse from the coefficient corresponding to the highest frequency position of the first coefficient matrix to the coefficient corresponding to the lowest frequency position in a Z-shaped inverse traversal manner; Compare adjacent coefficients to determine the difference in coefficients of the same moment between adjacent coefficients, and use the difference in coefficients of the same moment to determine the target coefficient with the largest degree of non-fragmentation area; The steps of determining the target coefficient with the maximum degree of non-fragmentation area by using the difference of the same moment coefficient include: Determine the maximum coefficient difference among the coefficient differences of the same moment and the current coefficient difference between the current traversal coefficient and its previous adjacent coefficient; Using the maximum coefficient difference and the current coefficient difference, the degree of non-fragmentation area is calculated and the target coefficient is determined; Before the step of determining the difference in different moment coefficients between the first coefficient matrix and the second coefficient matrix and determining the reasonable degree of change of the target image by using the difference in different moment coefficients, the method further includes: Determining soil information in the restored soil distribution image; Determine the target accuracy of using the target coefficient as a coefficient deletion delimiting point by using the soil information and the non-fragmented area degree of the target coefficient; The soil information includes: soil type, soil distribution range of each soil type, distribution quantity of the soil distribution range, and number of pixels; The step of determining the target accuracy of using the target coefficient as a coefficient deletion delimiting point by using the soil information and the non-fragmented area degree of the target coefficient comprises: Calculate the target accuracy using the target coefficient as the coefficient deletion delimiting point by using the distribution quantity, the number of pixels and the mean of all soil distribution ranges of each soil type; The step of determining the difference in the moment coefficients between the first coefficient matrix and the second coefficient matrix, and determining the reasonable degree of change of the target image by using the moment coefficient difference, comprises: Determining the difference in coefficients of different moments for coefficients at the same frequency position in the first coefficient matrix and the second coefficient matrix; Using the difference in the moment coefficients and the target accuracy, a reasonable degree of change of the target image is calculated; The steps of obtaining multiple soil distribution truth levels by using the reasonable change level of the target image and the reasonable change level of the adjacent images include: Determine the maximum reasonable image change degree among the reasonable change degrees of the target image and the reasonable change degrees of each adjacent image; The true degree of each soil distribution is calculated by using the reasonable change degree of the target image or the reasonable change degree of each adjacent image and the reasonable change degree of the maximum image; The steps of calculating the true degree of each soil distribution respectively by using the reasonable change degree of the target image or the reasonable change degree of each adjacent image and the reasonable change degree of the maximum image include: Determine the target coefficient and multiple coefficients adjacent to the target coefficient as two comparison images before and after coefficient deletion corresponding to the coefficient deletion demarcation points; Determine the number of pixels with the same soil type corresponding to the same image position in the two compared images; Using the reasonable change degree of the target image or the reasonable change degree of each adjacent image, as well as the reasonable change degree of the maximum image and the number of pixels, the true degree of each soil distribution is calculated respectively; The two comparison images include an initial distribution image and a restored soil distribution image after coefficients are deleted using each deletion boundary point.
2. The method for generating a soil spatial distribution map based on soil properties according to claim 1, characterized in that: The steps of correcting the target coefficient by using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image include: Determine the maximum true degree among the true degrees of soil distribution; Determine an actual coefficient corresponding to the maximum true degree, and use the actual coefficient as the corrected target coefficient; The corrected target coefficient is used as the coefficient deletion demarcation point to obtain the target soil spatial distribution image after coefficient deletion.
3. A soil spatial distribution map generation system based on soil properties, characterized in that: The system is used to implement the soil spatial distribution map generation method based on soil properties as described in any one of claims 1 to 2; the system comprises: A matrix conversion module is used to determine the initial distribution image of the target soil space and the first coefficient matrix after discrete cosine transformation, traverse the coefficients in the first coefficient matrix and compare adjacent coefficients to determine the target coefficient with the largest degree of non-fragmentation area; An image compression module is used to use the target coefficient as a coefficient deletion demarcation point to determine a restored soil distribution image and a second coefficient matrix after the coefficient is deleted; A matrix analysis module is used to determine the difference in the moment coefficients between the first coefficient matrix and the second coefficient matrix, and to determine the reasonable degree of change of the target image using the difference in the moment coefficients; to determine the reasonable degree of change of adjacent images corresponding to a plurality of coefficients adjacent to the target coefficient, and to obtain the true degree of multiple soil distributions using the reasonable degree of change of the target image and the reasonable degree of change of the adjacent images; The coefficient correction module is used to correct the target coefficient using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image.
Citation Information
Patent Citations
Complex terrain remote sensing image accurate segmentation method
CN117333504A
Land utilization information extraction method and system based on historical soil survey text
CN119128046A