River channel width automatic extraction method and system and medium
Through the automatic river width extraction method based on the Voronoima method, the problem of river width in the prior art is solved in the problem of difficult to measure multiple river patterns, and efficient and applicable river width data extraction is achieved, which is suitable for multiple river patterns.
Patent Information
- Application Number
- CN202411744679.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-01
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-01
AI Technical Summary
The prior art is difficult to effectively measure and automatically extract river channel widths under various river channel forms, especially in the presence of Jiangxinzhou or river channel splitting forms.
The automatic river width extraction method based on the Voronoi diagram method is used to determine the remote sensing image of the target river channel, extract the river channel and river center boundary data, perform smooth processing and linear difference resampling, generate the Voronoi polygon, and generate the river center line and extract the boundary line of each tributary through filtering and reverse pushing point paths, and finally calculate the river channel width.
The applicability to various river channel forms is achieved, the extraction efficiency and spatial resolution of river channel width data are improved, the problem of Jiangxinzhou interference in traditional methods is avoided, and it is suitable for engineering applications and related research.
Smart Images

Figure CN119863693A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of water conservancy remote sensing image information processing, and more specifically, to a method, system and medium for automatically extracting river width based on the Voronoi diagram method. Background Art
[0002] Channel width is one of the important criteria for determining flow morphology, sediment supply, and the type and density of riparian plants in a river system. Especially for alluvial rivers, channel width may change due to a series of natural changes, including water inflow and duration, volume and particle size distribution of sediment inflow, sediment composition of riverbed and bank slope, and riparian vegetation. Analyzing the evolution of channel width is a valuable method to understand the impact of these factors on channel morphology. Domestic and foreign scholars have conducted a lot of research on the response relationship between channel width and flow changes, sediment transport changes, and riparian vegetation changes. In addition, channel width also affects the energy exchange at the water-atmosphere interface and the biological habitat in the river ecosystem, thereby affecting the morphology of the riverbed. Similarly, channel width affects the planning of infrastructure, such as the site selection of bridges and dams. Therefore, channel width is an important indicator reflecting river evolution.
[0003] At present, the existing river width measurement methods in academia and engineering are generally based on field measurements, but field measurement methods require a lot of manpower and material resources, and are not easy to implement for large basins or long and wide river sections. In addition, some scholars have developed corresponding tools for automatic calculation of river width based on existing river boundary data. However, most of these algorithms are not suitable for complex river boundaries, such as the presence of river islands in the river or the river presenting a bifurcated shape. Therefore, it is necessary to develop a river width calculation method that is suitable for a variety of river morphologies. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, system and medium for automatic extraction of river width, which can be applicable to rivers of various forms, increase the spatial resolution of river width extraction, and improve the efficiency of river width data extraction.
[0005] To achieve the above objectives, this application provides the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides a method for automatically extracting river width, comprising the following specific steps:
[0007] S1. Determine the remote sensing image of the target river and extract the boundary data of the target river and river island;
[0008] S2. Import the target river channel and river island boundary data described in step S1 into MATLAB;
[0009] S3. Smoothing the river boundary data in step S2;
[0010] S4. according to the river boundary after smoothing in step S3, linearly interpolating and resampling the river boundary;
[0011] S5. Generate a Voronoi polygon according to the linear difference and the resampled boundary points in step S4;
[0012] S6. Filter the Voronoi polygons in step S5, filtering the Voronoi polygon endpoints that do not fall within the river boundary;
[0013] S7. remove the Voronoi polygon endpoints with only one connection point to filter out invalid branch channels, and repeat this process until the number of remaining Voronoi polygon endpoints remains stable;
[0014] S8. Identify the endpoints of the Voronoi polygon with three connection points, and repeat this process until the number of identified Voronoi polygon endpoints is stable;
[0015] S9. reverse the points deleted in step S7, starting from the last endpoint with only one connection point, and reversely advance along the tributary path;
[0016] S10. reverse the points deleted in step S7, starting from the last point with only one connection point and moving forward along the tributary path until reaching the nearest endpoint with three connection points;
[0017] S11. Merge the forward and reverse propulsion point paths to generate the center line of the river channel and extract the boundary lines of each tributary;
[0018] S12. Sort the river centerline points according to the advancement path;
[0019] S13. resample and smooth the centerline using a spline smoothing algorithm;
[0020] S14. Calculate the cross section of the river perpendicular to the centerline of the river;
[0021] S15. Find the intersection point between the cross section and the river boundary and the river island boundary;
[0022] S16. Calculate the distance between the intersection points of a single cross section to obtain the width of the river channel or the width of the river island;
[0023] S17. Output the river width and cross-section center point data.
[0024] In step S12, the center lines are sorted according to the principle of the shortest distance.
[0025] In step 14, the cross section of the river channel perpendicular to the center line of the river channel is calculated, including but not limited to obtaining a perpendicular line by connecting two points before and after the calculation point.
[0026] In step S16, the distance between the intersection points of a single cross section is calculated to obtain the river width or the width of the river island. Specifically, the distance between the intersection point of the cross section and the river boundary is first calculated, and then the distance between the intersection point of the cross section and the river island boundary is calculated. The difference between the two distances is the river width.
[0027] In a second aspect, an embodiment of the present application provides a system for automatically extracting river width, the system comprising: a memory and a processor, the memory comprising a program for an automatic river width extraction method, the program for the automatic river width extraction method implementing the following steps when executed by the processor: determining a remote sensing image of a target river, extracting target river and river island boundary data; importing target river and river island boundary data into MATLAB; smoothing the river boundary data; linearly interpolating and resampling the river boundary according to the smoothed river boundary; generating Voronoi polygons according to the linear interpolation and resampled boundary points; filtering the Voronoi polygons, filtering the Voronoi polygon endpoints that do not fall within the river boundary; removing the Voronoi polygon endpoints with only one connection point to filter out invalid branch rivers, and repeating this process until the number of remaining Voronoi polygon endpoints is The method comprises the following steps: first, identify the endpoints of the Voronoi polygon with three connection points, and repeat this process until the number of identified Voronoi polygon endpoints is stable; second, reverse the deleted points, starting from the last endpoint with only one connection point, and move forward along the tributary path in the reverse direction; third, reverse the deleted points, starting from the last point with only one connection point, and move forward along the tributary path in the forward direction until the nearest endpoint with three connection points is reached; fourth, merge the forward and reverse push point paths to generate the centerline of the river and extract the boundary lines of each tributary; fourth, sort the centerline points of the river according to the push path; fifth, resample and smooth the centerline using the spline smoothing algorithm; fifth, calculate the cross section of the river perpendicular to the centerline of the river; fifth, find the intersection point of the cross section with the boundary of the river and the boundary of the river island; fifth, calculate the distance of the intersection point of a single cross section to obtain the width of the river or the width of the river island; sixth, output the width of the river and the center point data of the cross section.
[0028] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program code, and when the program code is executed by a processor, the steps of the automatic river width extraction method as described above are implemented.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] Based on the known river boundary and river island boundary, the river centerline without river island is calculated first. This can avoid the interference of the existence of river island on the calculation of the river centerline and even the inability to generate the river centerline. It effectively avoids the disadvantages of traditional automatic extraction methods of river width, can be applied to rivers of various forms, and can realize efficient and automatic extraction of high-resolution river width data, which is conducive to engineering applications and related research. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 This is a schematic diagram of the river boundary and the river island boundary;
[0033] Figure 2 This is a schematic diagram of river boundary resampling;
[0034] Figure 3 To generate a schematic diagram of the Voronoi polygon;
[0035] Figure 4 Remove schematic diagrams for Voronoi polygon endpoints outside the river channel boundary;
[0036] Figure 5 This is a schematic diagram of the center point of the river.
[0037] Figure 6 To generate a schematic diagram of the river centerline;
[0038] Figure 7 This is a schematic diagram of the smoothing process of the river centerline;
[0039] Figure 8 To generate cross sections and calculate river width schematics;
[0040] Fig. 9 This is a flow chart of the method of this application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0042] The terms "comprises," "comprising," or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0043] The terms "first", "second", etc. are only used to distinguish one entity or operation from another entity or operation, and should not be understood as indicating or implying relative importance, nor should they be understood as requiring or implying any such actual relationship or order between these entities or operations.
[0044] like Fig. 9 As shown, an embodiment of the present invention provides a method for automatically extracting river width based on the Voronoi diagram method, comprising the following steps:
[0045] (1) Select a river boundary data containing a river island and import it into MATLAB, such as Figure 1 As shown;
[0046] (2) Remove the river island boundary and resample and smooth the river channel boundary, such as Figure 2 As shown;
[0047] (3) Create Voronoi polygons based on boundary points in MATLAB, such as Figure 3 As shown;
[0048] (4) Delete the endpoints of the Voronoi polygon outside the river boundary, such as Figure 4 As shown;
[0049] (5) The Voronoi polygon endpoints that do not belong to the river centerline are filtered out, and only the river centerline points are retained, such as Figure 5 As shown;
[0050] (6) Through the sorting algorithm, find the appropriate sorting of the remaining river centerline points and generate the river centerline, such as Figure 6 As shown;
[0051] (7) The centerline of the river channel is smoothed based on the Gaussian weighted moving average filtering algorithm and resampled according to the set interval, such as Figure 7 As shown;
[0052] (8) Generate a cross section perpendicular to the centerline based on the points on the centerline of the river, find the intersection with the river boundary line and the river island boundary line, and output the final river width and river island width data, such as Figure 8 shown.
[0053] The embodiment of the present application provides a system for automatically extracting the width of a river channel based on the Voronoi diagram method, the system comprising: a memory and a processor, the memory comprising a program for the method for automatically extracting the width of a river channel based on the Voronoi diagram method, the program for the method for automatically extracting the width of a river channel based on the Voronoi diagram method implementing the following steps when executed by the processor: determining a remote sensing image of a target river channel, extracting the boundary data of the target river channel and the river island; importing the boundary data of the target river channel and the river island into MATLAB; smoothing the boundary data of the river channel; linearly interpolating and resampling the boundary of the river channel according to the smoothed boundary; generating Voronoi polygons according to the boundary points after linear interpolation and resampling; filtering the Voronoi polygons, filtering the endpoints of the Voronoi polygons that do not belong to the boundary range of the river channel; removing the endpoints of the Voronoi polygons with only one connection point to filter out invalid branch rivers, and repeating this process until The number of remaining Voronoi polygon endpoints remains stable; identify Voronoi polygon endpoints with three connection points, and repeat this process until the number of identified Voronoi polygon endpoints is stable; reverse the deleted points, starting from the last endpoint with only one connection point, and advance in the reverse direction along the tributary path; reverse the deleted points, starting from the last point with only one connection point and advancing forward along the tributary path until the nearest endpoint with three connection points is reached; merge the forward and reverse advancement point paths to generate the centerline of the river and extract the boundary lines of each tributary; sort the centerline points of the river according to the advancement path; resample and smooth the centerline using the spline smoothing algorithm; calculate the river cross section perpendicular to the centerline of the river; find the intersection point of the cross section with the river boundary and the river island boundary; calculate the distance of the intersection point of a single cross section to obtain the river width or the river island width; output the river width and the cross section center point data.
[0054] The embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program code, and when the program code is executed by a processor, the steps of the automatic river channel width extraction method based on the Voronoi diagram method as described above are implemented. .
[0055] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0056] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0057] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0058] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0059] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0060] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0061] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0062] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for automatically extracting river width, characterized in that: The specific steps include: S1. Determine the remote sensing image of the target river and extract the boundary data of the target river and river island; S2. Import the target river channel and river island boundary data described in step S1 into MATLAB; S3. Smoothing the river boundary data in step S2; S4. according to the river boundary after smoothing in step S3, linearly interpolating and resampling the river boundary; S5. Generate a Voronoi polygon according to the linear difference and the resampled boundary points in step S4; S6. Filter the Voronoi polygons in step S5, filtering the Voronoi polygon endpoints that do not fall within the river boundary; S7. remove the Voronoi polygon endpoints with only one connection point to filter out invalid branch channels, and repeat this process until the number of remaining Voronoi polygon endpoints remains stable; S8. Identify the endpoints of the Voronoi polygon with three connection points, and repeat this process until the number of identified Voronoi polygon endpoints is stable; S9. reverse the points deleted in step S7, starting from the last endpoint with only one connection point, and reversely advance along the tributary path; S10. reverse the points deleted in step S7, starting from the last point with only one connection point and moving forward along the tributary path until reaching the nearest endpoint with three connection points; S11. Merge the forward and reverse propulsion point paths to generate the center line of the river channel and extract the boundary lines of each tributary; S12. Sort the river centerline points according to the advancement path; S13. resample and smooth the centerline using a spline smoothing algorithm; S14. Calculate the cross section of the river perpendicular to the centerline of the river; S15. Find the intersection point between the cross section and the river boundary and the river island boundary; S16. Calculate the distance between the intersection points of a single cross section to obtain the width of the river channel or the width of the river island; S17. Output the river width and cross-section center point data.
2. The method for automatically extracting river width according to claim 1, characterized in that: In step S12, the center lines are sorted according to the principle of the shortest distance.
3. The method for automatically extracting river width according to claim 1, characterized in that: In step 14, the cross section of the river channel perpendicular to the center line of the river channel is calculated, including but not limited to obtaining a perpendicular line by connecting two points before and after the calculation point.
4. The method for automatically extracting river width according to claim 1, characterized in that: In step S16, the distance between the intersection points of a single cross section is calculated to obtain the river width or the width of the river island. Specifically, the distance between the intersection point of the cross section and the river boundary is first calculated, and then the distance between the intersection point of the cross section and the river island boundary is calculated. The difference between the two distances is the river width.
5. A river width automatic extraction system, characterized in that: The system comprises: a memory and a processor, wherein the memory comprises a program of a method for automatically extracting the width of a river channel, and when the program of the method for automatically extracting the width of a river channel is executed by the processor, the following steps are implemented: determining a remote sensing image of a target river channel, extracting the boundary data of the target river channel and the river island; importing the boundary data of the target river channel and the river island into MATLAB; performing smooth processing on the boundary data of the river channel; performing linear difference and resampling on the boundary of the river channel after the smooth processing; generating Voronoi polygons according to the boundary points after the linear difference and resampling; filtering the Voronoi polygons, filtering the Voronoi polygon endpoints that do not belong to the river channel boundary range; removing the Voronoi polygon endpoints with only one connection point to filter out invalid branch river channels, and repeating this process until the number of remaining Voronoi polygon endpoints remains stable; identifying the Voronoi polygon endpoints with three connection points; filtering the Voronoi polygon endpoints that do not belong to the river channel boundary range; filtering the Voronoi polygon endpoints that have only one connection point; and repeating this process until the number of remaining Voronoi polygon endpoints remains stable. The Voronoi polygon endpoints of the connected points are repeated until the number of identified Voronoi polygon endpoints is stable; the deleted points are reversed, starting from the last endpoint with only one connection point, and advancing in the reverse direction along the tributary path; the deleted points are reversed, starting from the last point with only one connection point and advancing forward along the tributary path until the nearest endpoint with three connection points is reached; the forward and reverse advancement point paths are merged to generate the center line of the river and extract the boundary lines of each tributary; the center line points of the river are sorted according to the advancement path; the center line is resampled and smoothed using the spline smoothing algorithm; the river cross section perpendicular to the center line of the river is calculated; the intersection point of the cross section with the river boundary and the river island boundary is found; the distance between the intersection points of a single cross section is calculated to obtain the river width or the river island width; the river width and the cross section center point data are output.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, and when the program codes are executed by a processor, the steps of the method for automatically extracting the width of a river channel as described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Complicated river channel gridding method used for simulation of river channel hydrological numerical value
CN102496168A
Grid drawing and central bar grid processing method for mainstream and tributary intersections of complex river network
CN108073776A
River section extraction method, device, equipment and medium
CN118067084A
River channel extraction method based on water surface data
CN118334530A
Vector surface river center line extraction method and system
CN118941622A