Soil spatial distribution diagram generation method and system based on soil attributes

Through the soil spatial distribution map generation method based on soil properties, the target coefficients in the DCT coefficient matrix are used to delete and correct coefficients, which solves the problem of low accuracy of soil spatial distribution images in traditional methods, and achieves higher accuracy of soil distribution images sexual and continuity of plaque.

CN119417944AActive Publication Date: 2025-02-11GUIZHOU INST OF SOIL & FERTILIZER +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510032042.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-02-11
Estimated Expiration
2045-01-09

AI Technical Summary

Technical Problem

Traditional methods mostly use coefficient matrix to delete fixed coefficient positions after DCT conversion, resulting in low accuracy of soil spatial distribution images.

Method used

A soil spatial distribution map generation method based on soil properties is proposed. By determining the initial distribution image of the target soil space and its DCT coefficient matrix, the coefficients in the coefficient matrix are traversed and the adjacent coefficients are compared, and the target with the greatest degree of non-fragmentation areas is determined. Coefficients, use the target coefficient as the coefficient to delete the cutoff point, and correct the target coefficient to improve the accuracy of the soil distribution image.

Benefits of technology

Through this method, the continuity and integrity of soil maps can be more accurately preserved, the accuracy of soil spatial distribution images can be improved, and it is suitable for agricultural production, environmental monitoring and land use planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417944A_ABST
    Figure CN119417944A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to a soil spatial distribution diagram generation method and system based on soil attributes, and the method comprises the steps: determining an initial distribution image of a soil space and a first coefficient matrix thereof, traversing coefficients in the first coefficient matrix, and comparing adjacent coefficients, determining a target coefficient with the maximum non-fragmented region degree; determining a restored soil distribution image after coefficient deletion and a second coefficient matrix of the restored soil distribution image by using the target coefficient; determining the different moment coefficient difference of the two coefficient matrixes, and further determining the reasonable change degree of the target image; and determining the reasonable change degree of the adjacent images corresponding to the target coefficient, obtaining the soil distribution truth degree and the maximum truth degree by using the reasonable change degrees of the two images, and correcting the target coefficient to obtain a target soil spatial distribution image. According to the method, a more reasonable coefficient retention matrix and a target soil spatial distribution image with higher accuracy are obtained.
Need to check novelty before this filing date? Find Prior Art

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 soil types, fertility and nutrient status in 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 control measures can be taken. In land use planning, soil spatial distribution maps provide important basic data. By analyzing the soil types and fertility status in 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 helping in the above situations, the accuracy of soil spatial distribution images should be guaranteed. ‌‌ Traditional methods delete (or discard) the fixed coefficient positions of the coefficient matrix after DCT (Discrete Cosine Transform) conversion of the soil distribution image to delete the locations with large scatteredness in the soil area. However, there are often disadvantages such as little change in the scattered degree repair or excessive change in the soil distribution position, which leads to low accuracy of the soil spatial distribution image. Summary of the invention

[0003] In order to solve the technical problem that the accuracy of the soil spatial distribution image obtained by DCT conversion is low, the purpose of the present invention is to provide a method and system for generating a soil spatial distribution map based on soil properties. The technical solution adopted is as follows: The present invention provides a method for generating a soil spatial distribution map based on soil properties, the method comprising: 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 cutoff 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 using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image.

[0004] Furthermore, 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; 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 largest degree of non-fragmentation.

[0005] Further, the step of determining the target coefficient with the maximum degree of non-fragmentation area by using the difference of the same moment coefficient includes: 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-fragmented area is calculated and the target coefficient is determined.

[0006] Furthermore, before 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 using the difference in the moment coefficients, the method further includes: Determining soil information in the restored soil distribution image; 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 delimiting point.

[0007] 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; 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: The target accuracy of taking the target coefficient as the coefficient deletion delimiting point is calculated by using the distribution quantity, the number of pixel points and the mean of all soil distribution ranges of each soil type.

[0008] Further, 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 using the moment coefficient difference includes: 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; The reasonable degree of change of the target image is calculated by using the difference in the moment coefficients and the target accuracy.

[0009] Furthermore, the steps of obtaining multiple soil distribution truth levels by using the reasonable change degree of the target image and the reasonable change degree 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, as well as the reasonable change degree of the maximum image.

[0010] Further, the steps of respectively calculating the true degree of each soil distribution using the reasonable degree of change of the target image or the reasonable degree of change of each adjacent image and the reasonable degree of change 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.

[0011] 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: 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.

[0012] The present invention also proposes a soil spatial distribution map generation system based on soil properties, the system is 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 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.

[0013] The present invention has the following beneficial effects: The present invention firstly 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 obtain a 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 of the DCT coefficient matrices of the images before and after the coefficient is deleted 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 suitable 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

[0014] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. 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 creative work.

[0015] Figure 1 A flow chart 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; 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 an embodiment of the present invention; 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 an embodiment of the present invention; 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 an embodiment of the present invention; Figure 5A schematic diagram of an initial distribution image involved in a method for generating a soil spatial distribution map based on soil properties provided by an embodiment of the present invention; Figure 6 A schematic diagram of a coefficient matrix traversal sequence involved in a soil spatial distribution map generation method based on soil properties provided by an embodiment of the present invention; Figure 7 It is a schematic diagram of the structure 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; Figure 8 It is a schematic diagram of the framework structure of a soil spatial distribution map generation system based on soil properties involved in an embodiment of the present invention. DETAILED DESCRIPTION

[0016] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the method for generating a soil spatial distribution map based on soil properties proposed by the present invention, its specific implementation method, structure, characteristics and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0017] 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.

[0018] The specific scheme of a method for generating a soil spatial distribution map based on soil properties provided by the present invention is described in detail below with reference to the accompanying drawings.

[0019] Embodiment 1: For a soil spatial distribution map generation method based on soil properties provided by the present invention, please refer to Figure 1 , which shows a flow chart 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.

[0020] The method comprises: Step S1, determining the initial distribution image of the target soil space and the 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 area; In this embodiment, the full name of DCT transform is discrete cosine transform, which is mainly used for data or image compression, and can convert spatial domain signals to frequency domain, and has good decorrelation performance. DCT transform itself is lossless, but in the field of image coding, it creates good conditions for subsequent quantization, Huffman coding, etc. At the same time, since DCT transform is symmetrical, DCT inverse transform can be used after quantization coding to restore the original image information at the receiving end. DCT transform has extremely wide applications in the current field of image analysis and compression. Common JPEG static image coding and MJPEG, MPEG dynamic coding and other standards all use DCT transform.

[0021] Please refer to Figure 5 ,by Figure 5 As the initial distribution image of the target soil space (initial soil space distribution image), the size of The soil spatial distribution image is transformed by 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.

[0022] As the process of acquiring the initial soil spatial distribution image is basically related to the prior art, it is briefly described as follows: 1. Arrange random sampling points in the required mapping area to obtain soil type information at different locations.

[0023] 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.

[0024] Digital soil mapping is a method based on the theory of the relationship between soil and landscape. It uses data mining technology to analyze the correlation between soil properties and their surrounding geographical environment, and then predicts the spatial distribution of soil properties and generates a soil map expressed in a raster format. This method is low-cost, time-efficient, and highly accurate, while providing uncertainty information.

[0025] 3. Perform the analysis in the above-mentioned label 2 on the new soil spatial distribution image obtained to obtain a processed image.

[0026] 4. The final image is compressed and stored as a reference for later agricultural production, environmental monitoring, land use planning and other activities.

[0027] Step S1 is mainly to roughly determine the coefficients or coefficient regions 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, which can be considered as setting the coefficients to be deleted to 0.

[0028] The purpose of deleting some coefficients and the logic of the deletion operation for this embodiment are: After the soil spatial distribution image is first acquired, there will be multiple small patches due to the scattered distribution of fragmented land areas in reality. The existence of patches will interfere with the use of the soil spatial distribution image in the later stage, making the defined positions of different types of soil unclear. The detailed information such as the patch edges of the fragmented land area in the image is high-frequency information in the image, and the interior of the larger area of ​​soil area is low-frequency information. In order to screen out the fragmented patch area, the coefficient distribution in the DCT coefficient matrix should be analyzed and deleted accordingly.

[0029] By deleting the high-frequency information coefficients in the DCT coefficient matrix, the high-frequency information areas such as spots caused by the distribution of scattered and fragmented land areas in the image can be removed. When the coefficient representing high-frequency information is larger, it proves that the soil spatial distribution image contains more detailed information such as spots, and the scattered distribution of fragmented land areas is more obvious in actual situations. The edges of the small spots shown by the fragmented land area in the image have similar frequencies in the image, so the coefficients in the coefficient matrix can be traversed in a certain traversal order, and the coefficient differences of adjacent coefficients in the same coefficient matrix can be compared during the traversal process, and the degree of non-fragmented area corresponding to each coefficient as the coefficient deletion demarcation point can be obtained, and then the target coefficient with the largest degree of non-fragmented area can be found and determined. The degree of non-fragmented area here represents the possibility of the spot position. The larger the degree of non-fragmented area, the larger the coefficient value traversed before the current traversal coefficient, that is, the more likely these previously traversed coefficients are to correspond to the spot position in the soil spatial distribution image.

[0030] It should be noted that scattered, fragmented and spotted all refer to the corresponding image area being small and scattered in the entire image. The spotted area / fragmented soil area here can be quantified as: 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-patch area or a non-fragmented soil area.

[0031] Please refer to Figure 2In 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 area includes: 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; 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.

[0032] All pairs of DCT coefficient matrices are as follows Figure 6 The Z-type or "Z"-type reverse traversal method shown traverses the coefficients at different positions in the coefficient matrix, 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 the coefficients of the same moment, the more it indicates that the frequency value corresponding to the current traversal coefficient position is no longer the corresponding value of the fragmented land area, including the current traversal coefficient and the coefficients traversed later should not be deleted. Since the lower right corner of the DCT frequency matrix is ​​high frequency and the upper left corner is low frequency, the above traversal method from high frequency to low frequency is adopted.

[0033] In order to facilitate the 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.

[0034] Furthermore, step S11 includes: 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-fragmented area is calculated and the target coefficient is determined.

[0035] The specific process of step S11 can be described as follows: 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: 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.

[0036] Correspondingly, The larger it is, the larger the coefficient value of the k-1th traversal position and the previous traversal position is, and the more likely it is the spot position. It is necessary to preliminarily determine that the coefficients of the k-1 and previous positions need to be deleted.

[0037] 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.

[0038] Step S2, using the target coefficient as the coefficient deletion demarcation point, determining the restored soil distribution image after the coefficient is deleted and its second coefficient matrix; The target coefficient is used as the coefficient deletion demarcation point, and the previously traversed coefficient is 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 fine spots. At the same time, when When it is larger, it proves that the actual soil range corresponding to the currently deleted coefficient has a clearer boundary with other positions, 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.

[0039] 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 the target coefficient and the deleted coefficient area is more reasonable.

[0040] Then, the restored soil distribution image is subjected to DCT transformation to obtain a new corresponding DCT coefficient matrix, which is referred to 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, because after the image changes, the frequency of the same position will change due to the change of the grayscale of the surrounding pixels, and the restored soil spatial distribution image obtained after the initial distribution image is deleted will change the soil distribution relationship of different positions in the overall image due to the change of the soil type of certain positions, thereby changing the DCT coefficient matrix after the DCT transformation.

[0041] Step S3, determining the difference in the moment coefficients between the first coefficient matrix and the second coefficient matrix, and using the moment coefficient difference to determine the reasonable degree of change of the target image; In one embodiment, before step S3, the method further includes: Determining soil information in the restored soil distribution image; 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 delimiting point.

[0042] 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 pixel number; 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: The target accuracy of taking the target coefficient as the coefficient deletion delimiting point is calculated by using the distribution quantity, the number of pixel points and the mean of all soil distribution ranges of each soil type.

[0043] 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: In the above formula, is the number of pixels (pixel points) in the jth soil distribution range in the hth soil type. is the number of multiple soil distribution ranges (distribution quantity) of the h-th soil type in the restored soil distribution image. is the mean of the sizes of all soil distribution ranges of the hth soil type (the mean of all soil distribution ranges). For all soil types The larger the value, the more reasonable the deletion operation is.

[0044] 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.

[0045] The degree of the non-fragmented area of ​​the frequency and coefficient corresponding to the k-th traversal position is mentioned and described in the above embodiment.

[0046] To restore the total number of smaller soil areas (pattern 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.

[0047] In summary, the accuracy of the target The larger it is, the more reasonable the deletion operation using this target coefficient is.

[0048] In a specific embodiment, step S3 includes: 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; The reasonable degree of change of the target image is calculated by using the difference in the moment coefficients and the target accuracy.

[0049] In order to make the processed image more convenient for use in subsequent agricultural production, environmental monitoring, land use planning and other operations, 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.

[0050] The greater the decrease in the coefficient values ​​at the 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 means that the distribution of different types of soil in the restored soil distribution image is more concentrated and more reasonable.

[0051] The same frequency positions in the half with larger frequencies in the traversal order of the DCT coefficient matrix obtained from the image before and after the coefficient deletion operation are matched, and the coefficients are grouped together, that is, any two coefficients at the same frequency positions in the first coefficient matrix and the second coefficient matrix are grouped together, and multiple groups are obtained.

[0052] 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: 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 of the heteromoment coefficients is obtained. is the number of corresponding groups, that is, the number of groups. The larger the value is, the more the image after the operation meets the requirements.

[0053] 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 is, the fewer high-frequency areas in the image are after the deletion operation, and the fewer spots are.

[0054] Similarly, each coefficient including the target coefficient can be calculated in the above manner to obtain the reasonable degree of image change corresponding to the coefficient deletion cutoff point. , as shown below, by the reasonable degree of variation of adjacent images.

[0055] Step S4, determining the reasonable change degree of adjacent images corresponding to the plurality of coefficients adjacent to the target coefficient, and obtaining the true degree of multiple soil distributions by using the reasonable change degree of the target image and the reasonable change degree of the adjacent images; Based on the above-mentioned embodiment of step S3, the reasonable change degree of adjacent images of 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 image 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 realistic and accurate the soil spatial distribution image after the coefficient deletion operation is relative to the actual soil spatial distribution.

[0056] Please refer to Figure 3 In a specific embodiment, step S4 includes: 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; 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.

[0057] Specifically, step S41 includes: 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.

[0058] 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 in the same position of the two images before and after the operation are more consistent. This can ensure that the soil distribution in the soil spatial distribution image after the deletion operation is more reasonable and accurate, and make the final soil spatial distribution image consistent with the actual soil distribution to the greatest extent.

[0059] 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 change degree of the image 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.

[0060] Thus, the true degree of soil distribution can be obtained by deleting any current coefficient to restore the soil distribution image. for: 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, After deleting the coefficients before the position, we get value. To include the target coefficient By deleting the coefficients separately, we can get The maximum value (the maximum reasonable degree of image change).

[0061] 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.

[0062] Step S5, using the maximum true degree among the true degrees of soil distribution to correct the target coefficient, and obtain the target soil spatial distribution image.

[0063] Please refer to Figure 4 In a specific embodiment, step S5 includes: Step S50, determining the maximum true degree among the true degrees of soil distribution; Step S51, determining the actual coefficient corresponding to the maximum truth level, and using the actual coefficient as the corrected target coefficient; Step S52, using the corrected target coefficient as the coefficient deletion demarcation point to obtain the target soil spatial distribution image after the coefficient is deleted.

[0064] 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 most appropriate, and the final target soil spatial distribution image is obtained.

[0065] 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. The coefficient that is more suitable as the coefficient deletion cutoff point is continuously adjusted and tested around the target coefficient. The maximum true degree of soil distribution, that is, the maximum true degree, is determined in the above-mentioned target coefficient and a certain coefficient among its multiple adjacent coefficients. This 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, and then the corrected target coefficient is used to delete the previous (excluding this number) coefficients, 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.

[0066] The present invention firstly 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 obtain a 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 of the DCT coefficient matrices of the images before and after the coefficient is deleted 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 suitable 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.

[0067] Embodiment 2: The embodiment of the present invention also provides a soil spatial distribution map generation device based on soil properties. The soil spatial distribution map generation device based on soil properties can be a data processing terminal such as a drone, a computer, or a server.

[0068] like Figure 7 As shown, Figure 7 It is a structural schematic diagram of the hardware operating environment of a soil spatial distribution map generating device based on soil properties involved in an embodiment of the present invention.

[0069] like Figure 7 As shown, the soil spatial distribution map generating device based on soil properties 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. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display (Display), an input unit such as a control panel, and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WIFI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001. The memory 1005 as a computer storage medium may include a soil spatial distribution map generating program.

[0070] 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 less components than shown in the figure, or combine certain components, or arrange the components differently.

[0071] 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.

[0072] 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.

[0073] 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.

[0074] 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: The matrix conversion module A10 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 A20 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; 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 determine the reasonable degree of change of the target image by using the difference in the moment coefficients; determine the reasonable degree of change of adjacent images corresponding to multiple coefficients adjacent to the target coefficient, and obtain multiple soil distribution truths by using the reasonable degree of change of the target image and the reasonable degree of change of the adjacent images; 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 a target soil spatial distribution image.

[0075] Furthermore, the matrix conversion module A10 is also used for: 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; 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 largest degree of non-fragmentation.

[0076] Furthermore, the matrix conversion module A10 is also used for: 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-fragmented area is calculated and the target coefficient is determined.

[0077] Furthermore, the matrix analysis module A30 is also used for: Determining soil information in the restored soil distribution image; 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 delimiting point.

[0078] Furthermore, the matrix analysis module A30 is also used for: The target accuracy of taking the target coefficient as the coefficient deletion delimiting point is calculated by using the distribution quantity, the number of pixel points and the mean of all soil distribution ranges of each soil type.

[0079] Furthermore, the matrix analysis module A30 is also used for: 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; The reasonable degree of change of the target image is calculated by using the difference in the moment coefficients and the target accuracy.

[0080] Furthermore, the matrix analysis module A30 is also used for: 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, as well as the reasonable change degree of the maximum image.

[0081] Furthermore, the matrix analysis module A30 is also used for: 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.

[0082] Furthermore, the coefficient correction module A40 is also used for: 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.

[0083] 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.

[0084] In addition, the present invention also provides a computer-readable storage medium. The computer-readable storage medium of the present invention stores a soil spatial distribution map generation program, 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 as described above are implemented.

[0085] 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.

[0086] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0087] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0088] It should be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, and computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, 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 disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0089] The above description is only a preferred embodiment of the present invention, and does not limit the protection scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the protection scope 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 using the maximum true degree among the true degrees of soil distribution to obtain the target soil spatial distribution image.

2. The method for generating a soil spatial distribution map based on soil properties according to claim 1, characterized in that: 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; 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 largest degree of non-fragmentation.

3. The method for generating a soil spatial distribution map based on soil properties according to claim 2, characterized in that: 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-fragmented area is calculated and the target coefficient is determined.

4. The method for generating a soil spatial distribution map based on soil properties according to claim 1, characterized in that: 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; 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 delimiting point.

5. The method for generating a soil spatial distribution map based on soil properties according to claim 4, characterized in that: 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: The target accuracy of taking the target coefficient as the coefficient deletion delimiting point is calculated by using the distribution quantity, the number of pixel points and the mean of all soil distribution ranges of each soil type.

6. The method for generating a soil spatial distribution map based on soil properties according to claim 4, characterized in that: 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 between coefficients at the same frequency position in the first coefficient matrix and the second coefficient matrix; The reasonable degree of change of the target image is calculated by using the difference in the moment coefficients and the target accuracy.

7. The method for generating a soil spatial distribution map based on soil properties according to claim 1, characterized in that: 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, as well as the reasonable change degree of the maximum image.

8. The method for generating a soil spatial distribution map based on soil properties according to claim 7, characterized in that: 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.

9. 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.

10. 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 9; 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

  • Image noise level estimation method based on DCT and gradient covariance matrix

    CN107451981A

  • Image pseudo-simulation wireless transmission method based on residual layer block DCT (Discrete Cosine Transform)

    CN114422787A

  • Crop growth state detection method based on image processing technology

    CN116188465A

  • Complex terrain remote sensing image accurate segmentation method

    CN117333504A

  • Method and system for obtaining farmland spatial distribution heterogeneity

    CN117830872A