An optimized extraction method of irrigation ditches in plain areas using spatial characteristics
Through high-precision UAV remote sensing images and spatial feature optimization methods, the problems of misclassification, omission and interruption caused by "different objects with the same spectrum" in ditch extraction in plain river network areas were solved, and high-precision automatic extraction of irrigation ditches was achieved, improving the extraction accuracy to 92.3%.
Patent Information
- Application Number
- CN202310555698.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-17
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-05-17
AI Technical Summary
In extremely flat plain river network areas, the irrigation ditch extraction method based on drone images has similar spectra between the vegetation-covered ditch parts and the vegetation plots, the water areas in the fields and the waterless ditches, and the bare land and the waterless ditches, resulting in "different objects with the same spectrum", leading to problems such as misclassification, omission and interruption. Existing methods make it difficult to accurately extract the surface information of the ditch.
High-precision UAV remote sensing images are used, and through object-oriented classification ideas and methods, combined with multi-scale segmentation and ESP refinement technology, spatial geometry and relationship features are used to optimize the extraction of ditch surface information. This includes setting the segmentation parameter range, using ESP refinement and optimizing local segmentation parameters, performing nearest neighbor classification, and optimizing through spatial features such as aspect ratio, relative boundary index, and boundary regularity.
The accuracy of ditch extraction has been improved, with the average accuracy increased by 7.6%. Accurate ditch extraction has been achieved under the same spectrum of vegetation cover and foreign objects, solving the problems of ditch section occlusion and disconnection, and achieving an average extraction accuracy of 92.3%.
Smart Images

Figure CN116721365B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for optimizing the extraction of irrigation ditches in plain areas by utilizing spatial features. Background Art
[0002] Irrigation is crucial to maintaining food production, with approximately 40% of the world's crops grown on irrigated land. According to statistics, approximately 70% of global freshwater consumption is used for irrigation. Therefore, achieving precision irrigation is a key research priority for developing water-saving agriculture and achieving water sustainability. Flood irrigation of fields using ditches remains the primary irrigation method in my country. Therefore, accurate and rapid extraction of ditch spatial information is key to achieving precision irrigation and has important practical implications for establishing management and maintenance systems for farmland water conservancy projects and ensuring agricultural water conservation. Plain river network areas are crisscrossed with artificial ditches, and are also economically developed regions in my country with limited agricultural land resources. Therefore, research on ditch spatial information extraction methods in these plain river network areas is particularly important.
[0003] Unmanned aerial vehicle (UAV) remote sensing, with its advantages of high flexibility, low cost, high timeliness, and high data resolution, is increasingly being used in surface environmental monitoring and information extraction. Currently, ditch extraction methods based on UAV data have become a new research hotspot. These methods can be categorized by data source, including those based on digital elevation models (DEMs), those combining DEMs and imagery, and those based on imagery. These methods exploit terrain heterogeneity by constructing a relative terrain model based on the difference between the DEM before and after smoothing, and canal outlines can be extracted by setting a threshold. Ditch extraction can also be performed using DEM-based hydrological analysis and using a runoff accumulation threshold. However, terrain information is redundant, and extracted canal systems are discontinuous. To address the limitations of a single DEM data source, a ditch extraction method combining DEM-based slope information and orthophotos has been proposed. However, in extremely flat plain river networks, even the elevation difference between the canal bottom and the adjacent farmland may not be significant, making DEMs ineffective for ditch extraction.
[0004] Ditch extraction methods based on drone imagery have also been explored. While existing methods for extracting ditches from drone imagery improve spatial resolution, they also increase the probability of different objects sharing the same spectrum. This makes it difficult to distinguish spectrally similar features, such as vegetation-covered ditches from vegetated plots, water-filled fields from water-filled ditches, and bare land from dry ditches. Furthermore, existing methods primarily focus on extracting ditch outlines, but are still immature in extracting ditch surface information. Summary of the Invention
[0005] In response to the shortcomings of existing methods, the present invention uses high-precision UAV remote sensing images and object-oriented classification ideas and methods to develop an irrigation ditch extraction method in typical plain river network areas; proposes an optimized extraction method for ditch surface information using spatial geometry and relationships, focusing on solving the problems of misclassification, omission, interruption, etc. caused by "different objects with the same spectrum" in existing ditch extraction methods.
[0006] The technical solution adopted by the present invention is: a method for optimizing the extraction of irrigation ditches in plain areas using spatial characteristics, comprising the following steps:
[0007] Step 1: After collecting irrigation ditch images using drones, binary ditch classification based on local optimal segmentation is performed. This involves setting a preset segmentation parameter range and using ESP to refine and optimize local segmentation parameters. Nearest neighbor classification is then performed to obtain the initial ditch extraction results.
[0008] Furthermore, using ESP to refine and optimize local segmentation parameters specifically includes:
[0009] Set the range of segmentation scale parameters [R1, R2];
[0010] Set the range of shape parameter and compactness parameter to [0.1, 0.9], the step size to 0.1, and perform traversal combination;
[0011] The ESP tool is used to iteratively calculate the parameter combination and the parameters with local variance mutation are regarded as potential local optimal parameters;
[0012] The error Euclidean distance of the difference parameters of the geometric objects is determined, and the local optimal segmentation parameter is obtained when the error Euclidean distance value is minimized.
[0013] Step 2: Optimize the extraction results based on spatial features: This includes sample training based on the aspect ratio, relative boundary index, boundary regularity, and area of non-ditch and ditch data, and applying the spatial feature threshold obtained from the training to the test data to complete the ditch extraction optimization.
[0014] Furthermore, the empty nearest neighbor classification extraction includes:
[0015] First, all spatial features are calculated at the object level, and then the combined features are optimized by importance sorting; the selected spatial features include red light mean, green light mean, blue light mean, red light standard deviation, green light standard deviation and blue light standard deviation.
[0016] Furthermore, step 2 specifically includes:
[0017] Step 21: Using the aspect ratio and boundary regularity of the object as an indicator for eliminating non-ditch objects;
[0018] Furthermore, the aspect ratio of the object specifically includes:
[0019] Set the starting angle of the circumscribed rectangle at 0°, which is parallel to the X-axis, and rotate it counterclockwise at 1° intervals. After calculating the circumscribed rectangles from 0° to 359°, select the rectangle with the smallest area as the minimum circumscribed rectangle. The longer side of the rectangle is determined as the length, and the shorter side is determined as the width.
[0020] Furthermore, the boundary regularity specifically includes:
[0021] Let the segmented object be o, the object's minimum bounding rectangle be v, l v is the length of the minimum circumscribed rectangle, w v is the width of the minimum bounding rectangle, b o is the actual perimeter length of the object, then the formulas for the aspect ratio R and boundary regularity B are as follows:
[0022]
[0023]
[0024] Step 22: Optimize the extraction of ditches using the relative boundary index of the spatial relationship feature;
[0025] Furthermore, the calculation formula of the relative boundary index is:
[0026]
[0027] Among them, v is the object, u is another object, b(v,u) is the length of the common edge, N is the number of objects u, b v Indicates the perimeter of this object.
[0028] Beneficial effects of the present invention:
[0029] 1. A multi-scale segmentation method and ESP tool were used to determine the optimal segmentation parameter sequence. The local optimal segmentation parameter was determined to be 61 through segmentation accuracy evaluation. Based on the segmentation, initial extraction based on spectral features and optimized extraction using spatial features were performed. Spatial features were constructed using the spectral mean and standard deviation, and the initial classification results were obtained using the nearest neighbor method. Optimized extraction involved calculating the object's aspect ratio, relative boundary index, boundary regularity, area, etc., using samples for feature training, and applying the trained parameters to the reclassification of the initial results to obtain optimized ditch extraction results.
[0030] 2. Comparing the results with the visual interpretation results for accuracy evaluation, the average accuracy of the ditch optimization extraction based on spatial features was 92.3%, an improvement of 7.6% over the accuracy before optimization.
[0031] 3. The optimized extraction method of irrigation ditches in plain areas using spatial characteristics can effectively solve the problems of missing ditches and partial disconnections caused by vegetation (aquatic plants and surrounding vegetation) covering part of the ditch section or foreign objects with the same spectrum, thereby improving the effect of automatic ditch extraction and having practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a flow chart of the method for optimizing extraction of irrigation ditches in plain areas using spatial characteristics of the present invention;
[0033] Figure 2 It is the location of the study area, drone imagery, and location map of the experimental sample area;
[0034] Figure 3 It is a schematic diagram of the common boundary;
[0035] Figure 4 This is the ESP result chart;
[0036] Figure 5 It is a comparison of segmentation effects at different scales;
[0037] Figure 6 is the initial extraction result of the nearest neighbor;
[0038] Figure 7 is a schematic diagram of spatial features;
[0039] Figure 8 It is the result of non-ditch removal using aspect ratio and boundary regularity;
[0040] Figure 9 It is the result of fusion of non-ditch class using relative boundaries;
[0041] Figure 10 This is the extraction result diagram of other sample areas. DETAILED DESCRIPTION
[0042] The present invention will be further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore only shows the components related to the present invention.
[0043] like Figure 2 As shown in the figure, the study area is a town in a certain county in a certain city in the northern part of a certain province, which is a typical plain river network area. The abundant water resources and developed water system provide conditions for the development of high-quality irrigation agriculture. The Yanxu Liudou irrigation area in the southeast of the town was selected as the study area. The geographical scope is as follows Figure 2 As shown in the figure, three test plots were selected from the study area for method experiments. The ditches in test plot a were lined, the ditches in test plots b and c were unlined, and test plot c also contained unplanted cultivated land.
[0044] like Figure 1 As shown in FIG, a method for optimizing the extraction of irrigation ditches in plain areas using spatial features includes the following steps:
[0045] Acquire ditch images through drone photography:
[0046] like Figure 2 , using drone photogrammetry technology to obtain data, the process includes the layout of field photo control points, drone flight and industry processing. First, to ensure data accuracy, the GPS-RTK (Global Positioning System, Real-time Differential Positioning) method is used to obtain 31 photo control points. Secondly, based on the aerial triangulation of the control points, the weather conditions have little interference with the drone flight during aerial photography, and the average overlap rate of the photos in the route direction and the perpendicular route direction is greater than 75%. Finally, based on the measurement results of the photo control points, the photogrammetry Pix4d software is used to complete the aerial triangulation encryption, and the ground image data obtained by the drone aerial photography is generated into a digital orthophoto with a resolution of 0.07m containing three bands of visible light red, green and blue.
[0047] A multi-scale segmentation method is used to segment UAV images: the key is to obtain the optimal segmentation object through the ESP (Estimation of Scale Parameter) parameter estimation tool.
[0048] The accuracy of the object contour obtained by segmentation will directly affect the accuracy of ditch extraction; the multi-scale segmentation method is used to segment the image. Based on the principle of the ESP tool, the method for determining the optimal local parameters is:
[0049] (1) The range of the segmentation scale parameter [R1, R2] is determined through existing experiments and is set to [10, 150] here;
[0050] (2) Set the range of shape parameter and compactness parameter to [0.1, 0.9], the step size to 0.1, and perform traversal combination;
[0051] (3) Iteratively calculate the parameter combination through the ESP tool, and regard the parameters with local variance mutation as potential local optimal parameters;
[0052] (4) Based on the visually interpreted ground feature contours, the Euclidean distance (ED) of the geometric object difference parameters is determined. The local optimal segmentation parameter is the one with the smallest ED value.
[0053] The nearest neighbor classification strategy is used to obtain the initial ditch extraction results. The key is to determine the spatial features:
[0054] The K-Nearest Neighborhood (KNN) method was used for ditch extraction. All features were first calculated at the object level, and then the combined features were optimized by ranking them by importance. Based on the characteristics of the ditch in the study area, spatial features were selected, including the mean red light value, the mean green light value, the mean blue light value, the standard deviation of red light, the standard deviation of green light, and the standard deviation of blue light. The mean feature can reflect the spectral characteristics of the ground object, while the standard deviation reflects the surface texture characteristics.
[0055] Optimize extraction results based on spatial features:
[0056] The optimized extraction using spatial geometric features is proposed to address the situation in which non-ditch objects are misidentified as ditch objects due to the "same spectrum for different objects" in ditch extraction. That is, the differences in geometric features between ditches and non-ditches are used to remove objects with the same spectral features as ditches, thereby improving the accuracy of ditch extraction.
[0057] "Different objects, same spectrum" mainly refers to bare land and unlined ditches in cultivated land. The two have the same spectrum but are not the same objects. Since ditches are usually narrow and long features with relatively regular boundaries, the aspect ratio of ditch extraction objects is larger than that of non-ditch features. In addition, the outline of ditch extraction objects is more regular than that of non-ditch objects, so their boundary regularity also has a significant difference.
[0058] The object's aspect ratio and boundary regularity are used as indicators for eliminating non-ditch objects; the "length" and "width" in the aspect ratio refer to the length and width of the object's minimum enclosing rectangle, respectively. The minimum enclosing rectangle refers to the rectangle with the smallest area formed by the vertices of the object's convex polygon.
[0059] During the calculation, 0°, which is parallel to the X-axis, is set as the starting angle of the circumscribed rectangle, and the angle is rotated counterclockwise at intervals of 1°. After the circumscribed rectangles from 0° to 359° are calculated, the rectangle with the smallest area is selected as the minimum circumscribed rectangle, and the longer side of the two sides of the rectangle is determined as the length, and the shorter side is determined as the width.
[0060] Boundary regularity refers to the ratio of the actual perimeter to the minimum enclosing rectangle perimeter. The higher the irregularity of the segmented object, the larger the value, and vice versa. Let the segmented object be o, the minimum enclosing rectangle of the object be v, l v is the length of the minimum circumscribed rectangle, w v is the width of the minimum bounding rectangle, b o is the actual perimeter length of the object, the formula for the aspect ratio R is shown in formula (1), and the boundary regularity B is shown in formula (2):
[0061]
[0062]
[0063] Aiming at the problem of incomplete (missing or broken) ditch object extraction due to plant cover on the ditch or both sides of the ditch, this paper proposes a ditch optimization extraction method using spatial relationship features. Spatial relationship features are mainly relative boundary indicators. The relative boundary indicator of an object refers to the ratio of the length of the common edge to the perimeter of the object, where the common edge refers to the length of the overlapping boundary between the object and another specified object. The schematic diagram is shown as follows: Figure 3 shown.
[0064] If the relative boundary index is 0.5, it means that half of the boundary of the object is combined with another specified object; if the relative boundary index is 1, it means that the object is completely wrapped by the other object and is embedded in it. Let the object be v, the other object be u, b(v,u) is the length of the common edge, N is the number of objects u, b v Represents the perimeter of the object, then the relative boundary index X is shown in formula (3):
[0065]
[0066] Optimal segmentation parameter determination and segmentation results:
[0067] Based on existing experiments, the range of the segmentation scale parameter Scale was set to [10, 150], and ESP was used for iterative calculations. During the run, large changes in the rate of change (ROC) of the segmented object indicate large changes in local variance and can be included in the candidate sequence for possible optimal parameters.
[0068] By visually interpreting and comparing the individual sample areas, it is found that the combination of shape factor and compactness parameter of 0.3 and 0.6 has an average ED value of 0.102, which is the lowest combination. Therefore, this combination is set as the optimal combination. The corresponding three candidate optimal segmentation parameters are 30, 61, 95 (such as Figure 4 As shown), multi-scale segmentation is performed respectively, and the results are as follows Figure 5As shown. From the segmentation results, the segmentation results with scales of 61 and 95 have better segmentation integrity for ditches, and can segment the main body of the ditch, which is conducive to the judgment of shape features. Compared with the result of 95, the result with a segmentation scale of 61 not only retains the main shape of the ditch, but also has more detailed segmentation for other land features. When the scale is 30, the segmentation of land features is more fragmented, and the ditch and other land features are segmented in detail according to the spectral characteristics, which is conducive to the fusion of disconnected ditches using spatial relationships. Therefore, two-level segmentation is adopted, that is, when the first-level ditch is initially extracted, a segmentation parameter of 61 is used, which is conducive to the extraction of the main body of the ditch; when the second-level ditch is optimized, a segmentation parameter of 30 is used, which is conducive to the fusion of adjacent land features in the ditch and compensates for the extraction deviation caused by vegetation cover.
[0069] Initial classification results based on nearest neighbors:
[0070] The preliminary classification results are obtained through nearest neighbor classification. Figure 6 The results show that ditches were basically extracted, but there was a significant amount of interference and missed detections. The former was primarily due to the fact that, due to the experimental area being in the irrigation period, areas with abundant field water exhibited spectral characteristics similar to those within ditches, leading to these objects being misclassified as ditches. The latter was due to the fact that, since the data was acquired during summer, vegetation was lush within and on both sides of the ditches, resulting in vegetation-covered areas within the ditches being misclassified as non-ditches. This resulted in the ditch extraction results appearing interrupted or narrower than they actually were. For these two situations, optimized classification methods based on spatial geometric features and spatial relationship features were employed, respectively.
[0071] Optimized extraction results based on spatial features:
[0072] Utilizing spatial features for optimized extraction includes utilizing spatial geometric features (aspect ratio and boundary regularity) and utilizing spatial relationship features (relative boundaries) for optimized extraction.
[0073] right Figure 2 (a) Spatial characteristics calculation was performed on the lined ditch sample area, and the results were as follows: Figure 7 shown. Figure 7 (a) represents the aspect ratio spatial feature, where higher brightness indicates a larger aspect ratio; Figure 7 (b) represents the spatial characteristics of boundary regularity, where lower brightness indicates more regular boundaries; Figure 7 (c) represents the relative boundary spatial feature. The higher the brightness, the higher the ratio of the common edges with the ditch class. It can be seen that the aspect ratio of the ditch is larger than that of other ground features, and the regularity is lower than that of other ground features. After threshold segmentation of the spatial features, the aspect ratio is set to be greater than or equal to 6.41, the boundary regularity is set to be less than or equal to 1.53, and combined with the area greater than or equal to 500 pixels, the optimized extraction result based on spatial geometric features is obtained; Figure 8 As shown. Figure 8 As can be seen, combining spatial geometric features with small area removal effectively removes interference from non-ditch objects due to foreign objects sharing the same spectrum, resulting in the main body of the ditch class. However, there are still many disconnections and missed classifications within the ditch, requiring further use of spatial relationship features to compensate for the ditch class.
[0074] exist Figure 8 Based on the results of (b), the spatial relationship features are used for re-optimization to compensate for the omission and disconnection of ditches caused by aquatic plants and vegetation on both sides of the ditches. Figure 7 As shown in (c), the brighter the brightness, the higher the ratio of common edges with the ditch class. Therefore, it is necessary to optimize the non-ditch class that is closely connected with the ditch class. The threshold is set to be greater than or equal to 0.8, that is, the non-ditch class with 80% common edges with the ditch class is set as a ditch. The calculation results are as follows Figure 9 Comparing the results before fusion with the results of non-ditch classes with a relative boundary greater than or equal to 0.8, it can be found that the use of the relative boundary index can effectively compensate for the missed results and connect short disconnected ditches, achieving the effect of ditch compensation optimization.
[0075] Finally, the accuracy of the ditch extraction results was evaluated with reference to the manual visual interpretation results based on actual measurements.
[0076] right Figure 2 (b) Unlined ditch sample area and Figure 2 (c) There are bare land sample areas for extraction, and the results are as follows Figure 10 As shown in Figure 2, it can be concluded that the use of spatial features can effectively remove interference and optimize the compensation for ditches caused by vegetation.
[0077] Both the automatic extraction results and the manual digitization results are constructed into vector files and the error coefficients are calculated;
[0078] The error coefficient is calculated as follows:
[0079] Error coefficient (%) = (abs(ba)) / a*100% (4)
[0080] Among them, a represents the digitized area and b represents the extracted area. Figure 2 (a) Village ditch sample area, Figure 2 (b) Unlined ditch sample area, Figure 2(c) Accuracy evaluation was performed on three sample plots containing ditch plots containing uncultivated land. The error coefficients were 7.5%, 8.8%, and 6.7%, respectively, resulting in extraction accuracies of 92.5%, 91.2%, and 93.3%, respectively, for an average extraction accuracy of 92.3%. This represents a 7.6% improvement over the average accuracy of 84.7% before optimization, indicating that the optimized extraction method for irrigation ditches in plain areas utilizing spatial characteristics significantly improves the accuracy of automatic ditch extraction. Furthermore, the experimental accuracies for the three sample plots a, b, and c were all above 90%, demonstrating that the extraction method of the present invention has a certain regularity and performs well under different conditions, including whether the ditch is lined or whether there is bare land (uncultivated land). Comparing the extraction results for lined and unlined ditches, the extraction accuracy of the former (92.5%) was slightly higher than that of the latter (91.2%), demonstrating that the presence of a liner has a certain impact on extraction accuracy.
[0081] The extraction accuracy of the sample area with bare ground interference is the highest, indicating that the extraction method of the present invention effectively solves the problem of misjudgment caused by different objects with the same spectrum.
[0082] With the above-described preferred embodiments of the present invention as a guide, and with reference to the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical scope of this invention. The technical scope of this invention is not limited to the contents of the specification and must be determined according to the scope of the claims.
Claims
1. A method for optimizing the extraction of irrigation ditches in plain areas using spatial features, characterized in that: The following steps are involved: Step 1: After collecting irrigation ditch images using drones, binary ditch classification based on local optimal segmentation is performed. This involves setting a preset segmentation parameter range and using ESP to refine and optimize the local segmentation parameters. Then perform nearest neighbor classification to obtain the initial extraction results of the ditch; The nearest neighbor classification method is used for ditch extraction. All features are first calculated at the object level, and then the combined features are optimized by importance sorting. Based on the ditch characteristics, spatial features are selected, including the red light mean, green light mean, blue light mean, red light standard deviation, green light standard deviation, and blue light standard deviation. Among them, the mean feature can reflect the spectral characteristics of the ground object, and the standard deviation reflects the surface texture characteristics. Step 2: Optimize the extraction results based on spatial features: This includes training samples based on the aspect ratio, relative boundary index, boundary regularity, and area of non-ditch and ditch data. The spatial feature thresholds obtained from the training are applied to the test data to complete the ditch extraction optimization. Step 2 specifically includes: The aspect ratio and boundary regularity of the object are used as indicators for eliminating non-ditch objects; Boundary regularity specifically includes: Let the segmentation object be o , the object's minimum bounding rectangle is v , l v is the length of the minimum enclosing rectangle, w v is the width of the minimum bounding rectangle, b o is the actual perimeter of the object, then the aspect ratio R and boundary regularity B The formula is as follows: (1) (2) Optimize the extraction of ditches using relative boundary indicators of spatial relationship features; The calculation formula of the relative boundary index is: (3) in, v For this object, u For another object, b(v,u) is the length of the common side, N For the object u The number of b v Indicates the perimeter of this object.
2. The method for optimizing extraction of irrigation ditches in plain areas using spatial features according to claim 1 is characterized in that: Using ESP to refine and optimize local segmentation parameters specifically includes: Set the range of segmentation scale parameters [R1, R2]; Set the range of shape parameter and compactness parameter to [0.1, 0.9], the step size to 0.1, and perform traversal combination; The ESP tool is used to iteratively calculate the parameter combination and the parameters with local variance mutation are regarded as potential local optimal parameters; The error Euclidean distance of the difference parameters of the geometric objects is determined, and the local optimal segmentation parameter is obtained when the error Euclidean distance value is minimized.
3. The method for optimizing extraction of irrigation ditches in plain areas using spatial features according to claim 1 is characterized in that: The aspect ratios of an object include: Set the starting angle of the circumscribed rectangle at 0°, which is parallel to the X-axis, and rotate it counterclockwise at 1° intervals. After calculating the circumscribed rectangles from 0° to 359°, select the rectangle with the smallest area as the minimum circumscribed rectangle. The longer side of the rectangle is determined as the length, and the shorter side is determined as the width.