Method and System for Monitoring Soil Erosion Gully Depth Based on Photogrammetry
Through a method based on camera measurement, the shadow length is identified using orthophotographs and neural networks, and combined with the GIS system to analyze the change rate of soil erosion gullies, the problem of shadow length failure in soil erosion gullies depth monitoring is solved, and accurate measurement is achieved under different lighting conditions.
Patent Information
- Application Number
- CN202510277643.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-03-10
AI Technical Summary
In the monitoring of soil erosion gully depth, when the direction of the gully is consistent with the direction of sunlight, effective shadows cannot be formed, resulting in the calculation of shadow length failure and the accuracy of the gully depth cannot be accurately measured.
By obtaining orthophoto images of soil erosion gullies, identify existing shadows, analyze shadow lengths and convert them into vertical shadow lengths, combine GIS system and CNN neural networks to identify light irradiation directions and edge profiles, calculate the rate of change of soil erosion gullies, and measure depth using vertical shadow lengths and virtual vertical shadow lengths.
It improves the effective range and accuracy of soil erosion gully depth detection, solves the problem that shadow length cannot be directly measured, and realizes accurate monitoring under different lighting conditions.
Smart Images

Figure CN119756220B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of soil environmental protection, and specifically relates to a method and system for monitoring the depth of soil erosion gullies based on photogrammetry. Background Art
[0002] The erosion gullies of the hilly soil on the Loess Plateau have a serious destructive effect on the ecology. Monitoring the depth distribution of the erosion gullies is of great significance in providing a basis for soil and water conservation, evaluating ecological restoration, and ensuring the development of social and economic production. Traditional methods for monitoring the depth of erosion gullies generally include manual measurement or using equipment such as laser rangefinders. These methods are not only time-consuming and laborious, but may also not be able to accurately measure in complex terrains. Photogrammetry, on the other hand, can take photos of the erosion gullies and then use image processing and 3D reconstruction technologies to quickly and accurately obtain the depth information of the erosion gullies.
[0003] The existing method for rapid measurement of the depth of soil erosion gullies provided by the published patent No. CN115060231B: First, use a drone to obtain images of the monitoring area and perform preprocessing, and record the flight time of the drone in real time; perform object-oriented classification on the drone images to identify the boundaries of soil erosion gullies and the shaded areas within the erosion gullies. Take all the pixel points of the boundaries of the soil erosion gullies in the images as target points, and then calculate the solar altitude angle and solar azimuth angle according to the location of the study area and the time of drone image acquisition to determine the shadow projection directions of each target point; measure the shadow length projected by the edge of the erosion gully according to the shadow direction; calculate the relative height of all target points from the starting point of the projected shadow in turn, and measure the slope at the target points, and finally calculate the depth of the soil erosion gullies in the target point area. The core technical point of this technical solution is: analyze the shadow length of the gully images obtained by the drone, and then use the shadow length as the basis for the final judgment of the gully depth. However, when the direction of the gully is the same as the direction of sunlight irradiation, both sides of the gully can be completely irradiated by sunlight, and the characteristic of having an obvious shadow on one side cannot be formed, so that an effective shadow length cannot be obtained, resulting in the failure of this gully depth monitoring method. Summary of the Invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a method and system for monitoring the depth of soil erosion gullies based on photogrammetry.
[0005] According to the first aspect of the embodiments of the present invention, a method for monitoring the depth of soil erosion gullies based on photogrammetry is provided, and the specific technical solution adopted is as follows:
[0006] Obtain an orthophoto image of the soil erosion gully;
[0007] Based on the orthoimage, identify existing shadows, analyze the lengths of the existing shadows, and convert the lengths of the existing shadows at different angles to obtain the vertical shadow lengths of the existing shadows;
[0008] Based on the vertical shadow lengths of the existing shadows, analyze the change rate of the soil erosion gullies to obtain the virtual vertical shadow lengths of the parallel gully areas;
[0009] According to the vertical shadow lengths of the existing shadows and the virtual vertical shadow lengths of the parallel gully areas, obtain the measured depths of the soil erosion gullies.
[0010] In some embodiments of the present invention, based on the orthoimage, identifying existing shadows and analyzing the lengths of the existing shadows includes:
[0011] Based on the orthoimage, use a CNN neural network to obtain the edge contours, identify existing shadows and the light irradiation directions;
[0012] Based on the edge contours, determine the length directions of the existing shadows;
[0013] Analyze the number of alternations of black and white pixel points in the length directions of the existing shadows to obtain the continuity of the existing shadows;
[0014] According to the continuity of the existing shadows, combined with the number of black pixel points in the length directions of the existing shadows, obtain the lengths of the existing shadows.
[0015] In some embodiments of the present invention, the CNN neural network:
[0016] The network architecture is convolution-pooling-classification output;
[0017] The input is the orthoimage;
[0018] The output is the segmented soil erosion gully contours and the shadow distributions within the soil erosion gullies;
[0019] The loss function is the cross-entropy loss;
[0020] The training set consists of orthoimages and manually annotated images, where the manually annotated parts in the manually annotated images include the soil erosion gully contour lines, the shadow distributions within the soil erosion gullies, and the light irradiation directions.
[0021] In some embodiments of the present invention, converting the lengths of the existing shadows at different angles to obtain the vertical shadow lengths of the existing shadows includes:
[0022] According to the edge contours and the vertical direction of the light irradiation direction, determine the angles of the edge contours;
[0023] According to the angle of the edge contour and in combination with the length of the existing shadow, the vertical shadow length of the existing shadow is obtained.
[0024] In some embodiments of the present invention, after determining the angle of the edge contour, it further includes:
[0025] Set an angle threshold;
[0026] Judge the magnitude relationship between the angle of the edge contour and the angle threshold;
[0027] If the angle of the edge contour is greater than or equal to the angle threshold, the gully area corresponding to the edge contour is the existing shadow;
[0028] Otherwise, the gully area corresponding to the edge contour is a parallel gully area.
[0029] In some embodiments of the present invention, based on the edge contour, determining the direction of the existing shadow length includes:
[0030] In combination with the GIS system, determine the height of the soil erosion gully terrain;
[0031] From the higher end of the soil erosion gully terrain to the lower end, select the existing shadow length lines at intervals of 3 to 5 pixel points, and the direction perpendicular to the edge contour line is the existing shadow length direction.
[0032] In some embodiments of the present invention, based on the vertical shadow length of the existing shadow, analyzing the change rate of the soil erosion gully to obtain the virtual vertical shadow length of the parallel gully area includes:
[0033] Arrange the vertical shadow lengths of all existing shadows in the order from the higher end of the soil erosion gully terrain to the lower end, and use invalid data placeholders for the virtual vertical shadow lengths distributed within the parallel gully area to obtain a vertical shadow length sequence;
[0034] Analyze the distribution of the vertical shadow length data and the invalid data in the vertical shadow length sequence to obtain the change rate of the soil erosion gully;
[0035] According to the change rate and in combination with the vertical shadow length of the existing shadow, obtain the virtual vertical shadow length of the parallel gully area.
[0036] In some embodiments of the present invention, obtaining an orthophoto of the soil erosion gully includes:
[0037] Use a drone to take images of the soil erosion gully from different perspectives;
[0038] Perform grayscale processing on the soil erosion gully image to obtain a grayscale image of the soil erosion gully;
[0039] Perform feature extraction and feature matching on the grayscale image of the soil erosion gully to obtain an orthoimage of the soil erosion gully.
[0040] According to the second aspect of the embodiments of the present invention, a soil erosion gully depth monitoring system based on photogrammetry is provided, including: a memory and a processor, wherein:
[0041] The memory is used to store program codes;
[0042] The processor is used to read the program codes stored in the memory and execute the method described in the first aspect of the embodiments of the present invention.
[0043] In some embodiments of the present invention, the processor includes:
[0044] A gully image acquisition module for acquiring an orthoimage of the soil erosion gully;
[0045] An existing shadow analysis module for identifying existing shadows based on the orthoimage, analyzing the lengths of the existing shadows, and converting the lengths of the existing shadows at different angles to obtain the vertical shadow lengths of the existing shadows;
[0046] A parallel gully area analysis module for analyzing the change rate of the soil erosion gully based on the vertical shadow lengths of the existing shadows to obtain the virtual vertical shadow lengths of the parallel gully areas;
[0047] A gully depth measurement module for obtaining the measured depth of the soil erosion gully according to the vertical shadow lengths of the existing shadows and the virtual vertical shadow lengths of the parallel gully areas.
[0048] Compared with the prior art, the soil erosion gully depth monitoring method and system provided by the present invention obtain the vertical shadow lengths of the existing shadows with shadow characteristics through the orthoimage of the soil erosion gully; then analyze the change characteristics of the soil erosion gully based on the vertical shadow lengths of the existing shadows, and further obtain the virtual vertical shadow lengths of the parallel gully areas by using the change characteristics; finally, obtain the measured depth of the soil erosion gully according to the vertical shadow lengths of the existing shadows and the virtual vertical shadow lengths of the parallel gully areas. Through the method and system of the present invention, the problem that the use of shadow lengths for gully depth detection fails due to the parallelism between the soil erosion gully and the direction of sunlight irradiation, which cannot form effective shadows, is solved, and the effective range of gully depth detection can be improved, and it has operability. Description of the Drawings
[0049] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0050] Figure 1 Schematic diagram of the basic process of a method for monitoring the depth of soil erosion gullies based on photogrammetry provided by an embodiment of the present invention;
[0051] Figure 2 Schematic diagram of manually annotating the internal shadows, edge contours, and light irradiation directions in soil erosion gullies provided by an embodiment of the present invention;
[0052] Figure 3 Schematic diagram of the length of a vertical shadow provided by an embodiment of the present invention;
[0053] Figure 4 Schematic diagram of the basic composition of a system for monitoring the depth of soil erosion gullies based on photogrammetry provided by an embodiment of the present invention;
[0054] The reference numerals in the figure are:
[0055] 10. Memory; 20. Processor; 21. Gully image acquisition module; 22. Existing shadow analysis module; 23. Parallel gully area analysis module; and 24. Gully depth measurement module. Specific embodiments
[0056] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following will, in conjunction with the accompanying drawings and preferred embodiments, describe in detail the specific embodiments, structures, features, and effects of the method and system for monitoring the depth of soil erosion gullies based on photogrammetry proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs. Terms such as "including", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, such that a circuit structure, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such article or device. Without further limitation, an element defined by the phrase "including a..." does not exclude the presence of additional identical elements in the article or device including the element.
[0058] The following specifically describes the specific solution of a method for monitoring the depth of soil erosion gullies based on photogrammetry provided by the present invention in conjunction with the accompanying drawings.
[0059] Please refer to Figure 1 , which shows the basic process of a method for monitoring the depth of soil erosion gullies based on photogrammetry provided by an embodiment of the present invention.
[0060] As Figure 1 shown, a method for monitoring the depth of soil erosion gullies based on photogrammetry provided by an embodiment of the present invention specifically includes:
[0061] S100: Obtain an orthophoto image of the soil erosion gully.
[0062] In the hilly areas of the Loess Plateau, use a drone formation or a single drone to fly at the same height multiple times, and take images of the soil erosion gullies from different perspectives according to the preset image scale size; and preprocess the soil erosion gully images, and the preprocessing includes: performing grayscale processing on the soil erosion gully images to obtain grayscale images of the soil erosion gullies; using the SIFT algorithm to perform feature extraction and feature matching on the grayscale images of the soil erosion gullies to obtain orthophoto images of the soil erosion gullies.
[0063] Thus, an orthophoto image of the soil erosion gully is obtained. Next, use this orthophoto image to analyze and calculate the depth of the soil erosion gully.
[0064] In the hilly areas of the Loess Plateau, soil erosion gullies are intricately distributed. When taking orthophotos, the light irradiation direction forms multiple angles with the soil erosion gullies. Therefore, there must be a situation where the light irradiation direction is parallel to the direction of the soil erosion gullies. Both sides of these soil erosion gullies are affected by sunlight irradiation. As a result, in the images captured by the camera, the shadows on both sides are not obvious enough, leading to the failure of the method for calculating the depth of soil erosion gullies using the shadow length. However, in the hilly areas of the Loess Plateau, soil erosion gullies are caused by soil erosion. Therefore, the depth of soil erosion gullies shows a continuous distribution. The depth of soil erosion gullies shows a characteristic of becoming deeper from a higher terrain position to a lower terrain position. In addition, soil erosion gullies are generally meandering. There are both gullies perpendicular to the light irradiation direction and gullies parallel to the light irradiation direction. Therefore, the depth of other parallel gullies without shadows can be calculated by using the gullies with shadows and combining the contour change trend of all the gullies where they are located. Specifically, it includes steps S200 to S400.
[0065] S200: Based on the orthophoto, identify the existing shadows, analyze the lengths of the existing shadows, and convert the lengths of the existing shadows at different angles to obtain the vertical shadow lengths of the existing shadows.
[0066] The depth of soil erosion gullies is related to the shadow length generated by sunlight irradiation. The longer the shadow length, the deeper the depth of the soil erosion gully, and the two show a positive correlation. However, due to the intricate distribution of soil erosion gullies, there are differences in the angles between the directions of soil erosion gullies and the sunlight irradiation direction. The lengths of the existing shadows cannot be directly used as a basis for comparing the depths of soil erosion gullies. It is necessary to convert the lengths of the existing shadows at different angles to obtain the shadow lengths at the same angle.
[0067] Therefore, in the embodiments of the present invention, based on the orthophoto, the existing shadows are identified, the lengths of the existing shadows are analyzed, and the lengths of the existing shadows at different angles are converted to obtain the vertical shadow lengths of the existing shadows.
[0068] Furthermore, based on the orthophoto, identifying the existing shadows and analyzing the lengths of the existing shadows includes:
[0069] First, based on the orthophoto, the edge contour is obtained by using a CNN neural network, and the existing shadows and the light irradiation direction are identified. Furthermore, the network architecture of the CNN neural network is convolution-pooling-classification output, the input is the orthophoto, the output is the segmented contour of the soil erosion gully and the shadow distribution and light irradiation direction inside the soil erosion gully, the loss function is cross-entropy loss, and the training set consists of orthophotos and manually annotated images, as Figure 2As shown, the manually marked parts in the manually marked image include the edge contour of the soil erosion gully, the shadow distribution in the soil erosion gully, and the light irradiation direction. The light irradiation direction is represented by the angle between the light irradiation direction and the vertical direction of the orthoimage. For example, Figure 2 as shown, the light irradiation direction is 45 degrees.
[0070] For the convenience of subsequent calculations, after obtaining the light irradiation direction, a rotation operation is performed on the orthoimage to make the light irradiation direction the horizontal direction of the orthoimage.
[0071] Then, based on the edge contour, the existing shadow length direction is determined. The specific operation method for determining the existing shadow length direction is as follows: Starting from one end of the soil erosion gully, select discontinuous shadow length lines along the edge contour line, and the direction perpendicular to the edge contour line is the existing shadow length direction. In addition, since the soil erosion gullies in the loess plateau hilly areas are usually caused by soil and water loss, for the convenience of subsequent calculations, the GIS system is usually combined to select the shadow length lines from the higher end to the lower end of the soil erosion gully, that is, from the higher end to the lower end of the soil erosion gully, select the existing shadow length lines at intervals of 3 to 5 pixel points, and the direction perpendicular to the edge contour line is the existing shadow length direction.
[0072] Then, because there may be sundries in the soil erosion gully, the sundries will affect the shadow of the soil erosion gully, and the shadow is usually continuously distributed. Therefore, the effective existing shadow length can be determined according to the continuity degree of the shadow along the existing shadow length direction. The continuity degree of the shadow is related to the number of alternations of black and white pixels. The more frequent the alternations, the more sundries in the shadow and the lower the continuity degree. Therefore, the continuity degree of the existing shadow can be obtained by analyzing the number of alternations of black and white pixel points in the existing shadow length direction. The specific calculation method of the continuity degree of the existing shadow is as follows:
[0073] ;
[0074] In the formula, represents the continuity degree of the existing shadow in the th existing shadow length direction; represents the number of alternations of black and white pixels in the th existing shadow length direction; represents the linear normalization function.
[0075] It should be noted that to ensure the significance of the calculation results, in the fractional operation of the embodiments of the present invention, when the denominator is 0, a tuning parameter greater than 0 needs to be added to the denominator to prevent the denominator from being 0. The value of the tuning parameter is set by the implementer according to the actual situation, and this application does not make special restrictions.
[0076] The fewer the number of alternations between black and white pixels in the direction of the existing shadow length, the higher the degree of continuity of the existing shadow.
[0077] Finally, based on the degree of continuity of the existing shadow and combined with the number of black pixel points in the direction of the existing shadow length, the length of the existing shadow is obtained. The specific method for calculating the length of the existing shadow is as follows:
[0078] ;
[0079] In the formula, represents the length of the existing shadow in the direction of the th existing shadow length; represents the number of black pixel points in the direction of the th existing shadow length; represents the degree of continuity of the th existing shadow length; represents rounding up the data in the parentheses.
[0080] Taking the degree of continuity of the existing shadow as the weight and combining it with the number of black pixel points in the direction of the existing shadow length, the length of the existing shadow is obtained, and the greater the degree of continuity of the existing shadow and the more the number of black pixel points in the direction of the existing shadow length, the longer the corresponding existing shadow length.
[0081] Thus, the length of the existing shadow is obtained.
[0082] In order to compare the lengths of existing shadows subsequently, the length of the existing shadow is converted into the length in the direction perpendicular to the light irradiation. Therefore, by converting the lengths of existing shadows at different angles, the vertical shadow length of the existing shadow is obtained. Further, according to the edge contour and the direction perpendicular to the light irradiation direction, the angle of the edge contour is determined; according to the angle of the edge contour and combined with the length of the existing shadow, the vertical shadow length of the existing shadow is obtained.
[0083] Specifically, the direction of the existing shadow length is along the direction perpendicular to the edge contour. Therefore, it is necessary to calculate the angle between the edge contour direction at the position of the existing shadow and the direction perpendicular to the light irradiation, and then obtain the corresponding vertical shadow length of the existing shadow. As Figure 3 shown, Figure 3 In, the size of the angle between the shadow contour and the vertical line of the light irradiation direction can be calculated based on the local pixels of the shadow contour. Since the orthographic image has been rotated, the vertical direction of the orthographic image is the direction perpendicular to the light irradiation. Therefore, the ratio of the ordinate to the abscissa of the local edge contour is the tangent value of the angle between the shadow contour and the vertical line of the light irradiation direction. Thus, the angle of the edge contour where the th existing shadow length of the soil erosion gully is located is the angle of the edge contour of the The angle between the edge contour in the direction of the existing shadow length and the perpendicular direction of the light irradiation direction. Therefore, the angle calculation formula for constructing the edge contour is:
[0084] ;
[0085] In the formula, represents the angle of the edge contour in the direction of the th existing shadow length; represents the mean value of the pixel vertical coordinates at the position of the edge contour in the direction of the th existing shadow length; represents the mean value of the pixel horizontal coordinates at the position of the edge contour in the direction of the th existing shadow length. Among them, the coordinate origin of the orthographic image is located at the upper left corner of the image, and the positive directions are to the right and downwards; represents the arctangent function.
[0086] After calculating the angle of the edge contour, the larger the angle value, the more perpendicular the local gully is to the light irradiation direction; the smaller the angle value, the more parallel the local gully is to the light irradiation direction. When the angle is too small, the parallel degree is large, and the shadow will be difficult to reflect the depth of the gully.
[0087] Therefore, after determining the angle of the edge contour, it further includes: setting an angle threshold, and the angle threshold can take a value of 30 degrees; judging the size relationship between the angle of the edge contour and the angle threshold; if the angle of the edge contour is greater than or equal to the angle threshold, that is , then the gully area corresponding to the edge contour is the existing shadow; otherwise, that is , the gully area corresponding to the edge contour is the parallel gully area.
[0088] For existing shadows, calculate their vertical shadow lengths. The vertical shadow length calculation formula for the existing shadows is:
[0089] ;
[0090] In the formula, represents the vertical projection length of the th existing shadow in the direction of the existing shadow length; represents the length of the th existing shadow in the direction of the existing shadow length; represents the angle of the edge contour in the direction of the th existing shadow length; represents the cosine function; represents rounding up the data in the parentheses.
[0091] For The parallel gully area is the virtual vertical shadow length, which needs to be analyzed according to the change law of soil erosion gully depth.
[0092] S300: Analyze the change rate of the soil erosion gully based on the vertical shadow length of the existing shadow, and obtain the virtual vertical shadow length of the parallel gully area.
[0093] Soil erosion gullies in the hilly areas of the Loess Plateau are usually caused by water and soil loss, which erodes from the higher side to the other side. The soil erosion gullies in higher terrain are shallower, while the soil erosion gullies in lower terrain are deeper. Usually, the geographical environment of a soil erosion gully is consistent, so the erosion change rates of soil erosion gullies at different locations are relatively similar, so the change rate of soil erosion gullies at local locations can be used to replace the change rate of soil erosion gullies at other locations.
[0094] The depth of the soil erosion gully is reflected in the change of the shadow length. The longer the vertical shadow length is, the deeper the soil erosion gully is. Therefore, the change rate of the existing shadow length can be used as the erosion change rate of the entire soil erosion gully, and then the unknown vertical shadow length of other positions of the entire soil erosion gully can be obtained according to the continuous change of the shadow length. Since the shadow of the parallel gully area is small or non-existent, the shadow of this area is represented as a virtual shadow, and its corresponding vertical shadow length is represented as the virtual vertical shadow length.
[0095] Based on the above analysis, this embodiment analyzes the change rate of soil erosion gullies based on the vertical shadow length of the existing shadow, and obtains the virtual vertical shadow length of the parallel gully area. Further, it includes:
[0096] First, the vertical shadow lengths of all existing shadows are arranged in order from the higher end to the lower end of the soil erosion gully, and the virtual vertical shadow lengths distributed in the parallel gully area are processed by invalid data placeholders to obtain a vertical shadow length sequence, for example: [45, -1, -1, 42, 40, 36, -1, -1, -1], where the virtual vertical shadow length is represented by -1.
[0097] Then, because the vertical shadow length sequence obtained above is arranged from high terrain to low terrain, there are points with smaller shadow contour angles, and some unknown data exists, which needs to be eliminated. Therefore, the distribution of vertical shadow length data and invalid data in the vertical shadow length sequence is analyzed to obtain the change rate of soil erosion gullies. The calculation method of the overall change rate of soil erosion gullies is:
[0098] ;
[0099] In the formula, represents the change rate of soil erosion gullies; represents the number of existing shadows with vertical shadow lengths; represents the th existing shadow with a vertical shadow length starting from the vertical shadow length sequence; represents the th vertical projection length of the existing shadow in the direction of the existing shadow length; represents the number of invalid data between two vertical projection length data; represents represents the th vertical projection length of the existing shadow in the direction of the existing shadow length, followed by invalid data, and the th existing shadow has a vertical shadow length.
[0100] The change rate of soil erosion gullies is obtained by calculating the average value of the differences between all adjacent two vertical projection lengths.
[0101] Finally, according to the change rate, combined with the vertical shadow lengths of the existing shadows, the virtual vertical shadow length of the parallel gully area is obtained. For example, if the vertical shadow length corresponding to the th in the vertical shadow length sequence is unknown, that is, the th corresponding virtual vertical shadow length, and the vertical shadow length of the th is known. Since the vertical shadow length sequence is sorted from high to low according to the terrain, if is greater than , it means that the position of the virtual vertical shadow length is above the position of the known vertical shadow length. From the above analysis, the higher the position above the soil erosion gully, the shallower the depth of the soil erosion gully, and the smaller the corresponding virtual vertical shadow length; if is less than , it means that the position of the virtual vertical shadow length is below the position of the known vertical shadow length, and the depth of the soil erosion gully below is larger, and the virtual vertical shadow length is larger. Therefore, the th virtual vertical shadow length is:
[0102] ;
[0103] In the formula, represents the th virtual vertical shadow length; represents the th vertical projection length of the existing shadow in the direction of the existing shadow length; represents the sequence position corresponding to the vertical shadow length of the existing shadow in the vertical shadow length sequence; Indicates the sequence position corresponding to the virtual vertical shadow length in the vertical shadow length sequence; Indicates the interval between the position of the vertical shadow length of the existing shadow and the position of the virtual vertical shadow length; Indicates the change rate of the soil erosion gully.
[0104] When, it means that the position of the virtual vertical shadow length is above the known vertical shadow length position. The higher it is above the soil erosion gully, the shallower the depth of the soil erosion gully, and the smaller the corresponding virtual vertical shadow length. Therefore, by reducing a certain length on the basis of the vertical projection length of the existing shadow, the virtual vertical shadow length is obtained, where the reduction amplitude is proportional to the change rate of the soil erosion gully and the interval between the position of the vertical shadow length of the existing shadow and the position of the virtual vertical shadow length; When, it means that the position of the virtual vertical shadow length is below the known vertical shadow length position. The depth of the soil erosion gully below is larger, and the virtual vertical shadow length is larger. Therefore, by increasing a certain length on the basis of the vertical projection length of the existing shadow, the virtual vertical shadow length is obtained, where the increase amplitude is proportional to the change rate of the soil erosion gully and the interval between the position of the vertical shadow length of the existing shadow and the position of the virtual vertical shadow length.
[0105] So far, the vertical shadow lengths at all positions have been obtained, that is, a complete vertical shadow length sequence has been obtained.
[0106] S400: Obtain the measured depth of the soil erosion gully according to the vertical shadow length of the existing shadow and the virtual vertical shadow length of the parallel gully area.
[0107] The above process obtains the vertical shadow length sequence at different positions of the soil erosion gully, and then uses the existing method to obtain the measured depth of the soil erosion gully according to the vertical shadow length of the existing shadow and the virtual vertical shadow length of the parallel gully area. The existing method can adopt the rapid measurement method for the depth of soil erosion gully based on photogrammetry provided by the publication number CN115060231B. The specific steps are as follows:
[0108] According to the vertical shadow length of the existing shadow and the virtual vertical shadow length of the parallel gully area, form a vertical shadow length sequence;
[0109] According to the relevant methods described in the rapid measurement method for the depth of soil erosion gully based on photogrammetry provided by the prior art CN115060231B, key parameters such as the solar altitude, date, longitude and latitude need to be determined, the incident angle of the solar rays is calculated, and the relationship between the vertical shadow length and the actual depth of the soil erosion gully is obtained. For the specific method, refer to the technology CN115060231B, which will not be elaborated here;
[0110] According to the above relationship, convert the vertical shadow length sequence into the actual soil erosion gully depth sequence;
[0111] Use the soil erosion gully depth sequence to correspond to the original soil erosion gullies to obtain the distribution of the soil erosion gully depth;
[0112] Finally, compare the current soil erosion gully depth distribution with the historical soil erosion gully depth distribution, and obtain the demand monitoring indicators such as soil and water loss according to the soil erosion gully monitoring module.
[0113] Based on the same inventive concept as the above method, this embodiment also provides a soil erosion gully depth monitoring system based on photogrammetry.
[0114] Please refer to Figure 4 , which shows the basic composition of a soil erosion gully depth monitoring system provided by an embodiment of the present invention.
[0115] As Figure 4 shown, a soil erosion gully depth monitoring system based on photogrammetry includes: a memory 10 and a processor 20, where:
[0116] The memory 10 is used to store program codes;
[0117] The processor 20 is configured to read the program codes stored in the memory 10 and execute obtaining an orthophoto image of the soil erosion gully; based on the orthophoto image, identify existing shadows, analyze the lengths of the existing shadows, and convert the lengths of the existing shadows at different angles to obtain the vertical shadow lengths of the existing shadows; based on the vertical shadow lengths of the existing shadows, analyze the change rate of the soil erosion gully to obtain the virtual vertical shadow lengths of the parallel gully areas; according to the vertical shadow lengths of the existing shadows and the virtual vertical shadow lengths of the parallel gully areas, obtain the measured depth of the soil erosion gully.
[0118] Further, the processor 20 includes a gully image acquisition module 21, an existing shadow analysis module 22, a parallel gully area analysis module 23, and a gully depth measurement module 24. Wherein:
[0119] The gully image acquisition module 21 is used to obtain an orthophoto image of the soil erosion gully;
[0120] The existing shadow analysis module 22 is used to identify existing shadows based on the orthophoto image, analyze the lengths of the existing shadows, and convert the lengths of the existing shadows at different angles to obtain the vertical shadow lengths of the existing shadows;
[0121] The parallel gully area analysis module 23 is configured to analyze the change rate of soil erosion gullies based on the vertical shadow length of the existing shadow, and obtain the virtual vertical shadow length of the parallel gully area;
[0122] The gully depth measurement module 24 is configured to obtain the measured depth of the soil erosion gully according to the vertical shadow length of the existing shadow and the virtual vertical shadow length of the parallel gully area.
[0123] It should be noted that: the above sequence of the embodiments of the present invention is only for description and does not represent the advantages or disadvantages of the embodiments. The processes depicted in the 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.
[0124] The various embodiments in this specification are all described in a progressive manner. For the same or similar parts among the various embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A method for monitoring the depth of soil erosion gullies based on photogrammetry, characterized in that The method includes: Obtaining an orthophoto image of a soil erosion gully; Based on the orthophoto image, identifying existing shadows, analyzing the lengths of the existing shadows, and converting the lengths of the existing shadows at different angles to obtain the vertical shadow lengths of the existing shadows; Based on the vertical shadow lengths of the existing shadows, analyzing the change rate of the soil erosion gully to obtain the virtual vertical shadow lengths of the parallel gully areas; According to the vertical shadow lengths of the existing shadows and the virtual vertical shadow lengths of the parallel gully areas, obtaining the measured depth of the soil erosion gully; Based on the orthophoto image, identifying existing shadows and analyzing the lengths of the existing shadows, including: Based on the orthophoto image, using a CNN neural network to obtain an edge contour, identifying existing shadows and the light irradiation direction; Based on the edge contour, determining the existing shadow length direction; Analyzing the number of alternations of black and white pixel points in the existing shadow length direction to obtain the continuity of the existing shadow; According to the continuity of the existing shadow, combining the number of black pixel points in the existing shadow length direction to obtain the length of the existing shadow.
2. The method for monitoring the depth of soil erosion gullies based on photogrammetry according to claim 1, wherein The CNN neural network: The network architecture is convolution-pooling-classification output; The input is an orthophoto image; The output is the segmented contour of the soil erosion gully and the shadow distribution within the soil erosion gully; The loss function is cross-entropy loss; The training set consists of orthophoto images and manually annotated images, where the manually annotated parts in the manually annotated images include the contour lines of the soil erosion gully, the shadow distribution within the soil erosion gully, and the light irradiation direction.
3. The method for monitoring the depth of soil erosion gullies based on photogrammetry according to claim 1, characterized in that, Converting the lengths of the existing shadows at different angles to obtain the vertical shadow lengths of the existing shadows, including: According to the vertical direction of the edge contour and the light irradiation direction, determining the angle of the edge contour; According to the angle of the edge contour, combining the length of the existing shadow to obtain the vertical shadow length of the existing shadow.
4. The method for monitoring the depth of soil erosion gullies based on photogrammetry according to claim 3, wherein, After determining the angle of the edge contour, it further includes: Setting an angle threshold; Judging the size relationship between the angle of the edge contour and the angle threshold; If the angle of the edge contour is greater than or equal to the angle threshold, the gully area corresponding to the edge contour is the existing shadow; Otherwise, the gully area corresponding to the edge contour is the parallel gully area.
5. The method for monitoring the depth of soil erosion gullies based on photogrammetry according to claim 1, wherein Based on the edge contour, determining the existing shadow length direction, including: Combining with the GIS system, determining the terrain height of the soil erosion gully; From the higher end to the lower end of the terrain of the soil erosion gully, selecting the existing shadow length lines at intervals of 3 to 5 pixel points, and the direction perpendicular to the edge contour line is the existing shadow length direction.
6. The method for monitoring the depth of soil erosion gullies based on photogrammetry according to claim 5, wherein Based on the vertical shadow lengths of the existing shadows, analyzing the change rate of the soil erosion gully to obtain the virtual vertical shadow lengths of the parallel gully areas, including: Arranging all the vertical shadow lengths of the existing shadows in the order from the higher end to the lower end of the terrain of the soil erosion gully, and using invalid data placeholder processing for the virtual vertical shadow lengths distributed in the parallel gully areas to obtain a vertical shadow length sequence; Analyze the distribution of the vertical shadow length data and the invalid data in the vertical shadow length sequence to obtain the change rate of the soil erosion gully. Based on the change rate and combined with the vertical shadow length of the existing shadow, obtain the virtual vertical shadow length of the parallel gully area.
7. The method for monitoring the depth of soil erosion gullies based on photogrammetry according to claim 1, wherein Obtain the orthophoto image of the soil erosion gully, including: Use a drone to capture images of the soil erosion gully from different perspectives. Perform grayscale processing on the soil erosion gully image to obtain a grayscale image of the soil erosion gully. Perform feature extraction and feature matching on the grayscale image of the soil erosion gully to obtain the orthophoto image of the soil erosion gully.
8. A soil erosion gully depth monitoring system based on photogrammetry, characterized in that, The system includes: a memory and a processor, where: The memory is used to store program code. The processor is used to read the program code stored in the memory and execute the method according to any one of claims 1 to 7.
9. The system for monitoring the depth of soil erosion gullies based on photogrammetry according to claim 8, characterized in that, The processor includes: A gully image acquisition module for obtaining the orthophoto image of the soil erosion gully. An existing shadow analysis module for identifying the existing shadow based on the orthophoto image, analyzing the length of the existing shadow, and converting the lengths of the existing shadows at different angles to obtain the vertical shadow length of the existing shadow. A parallel gully area analysis module for analyzing the change rate of the soil erosion gully based on the vertical shadow length of the existing shadow to obtain the virtual vertical shadow length of the parallel gully area. A gully depth measurement module for obtaining the measured depth of the soil erosion gully according to the vertical shadow length of the existing shadow and the virtual vertical shadow length of the parallel gully area. Based on the orthophoto image, identify the existing shadow and analyze the length of the existing shadow, including: Based on the orthophoto image, use a CNN neural network to obtain the edge contour, identify the existing shadow and the light irradiation direction. Based on the edge contour, determine the length direction of the existing shadow. Analyze the number of alternations of black and white pixel points in the length direction of the existing shadow to obtain the continuity of the existing shadow. According to the continuity of the existing shadow and combined with the number of black pixel points in the length direction of the existing shadow, obtain the length of the existing shadow.
Citation Information
Patent Citations
Soil erosion gully depth measurement method based on UAV imagery
CN115060231B
Soil erosion gully depth measuring and calculating method based on unmanned aerial vehicle image
CN115060231A