Method and device for extracting water-facing surface of mountain around reservoir
Through the simplification of the surface vector diagram and normal extraction, combined with DEM contour processing, the problem of discontinuity of ridge lines in the existing technology is solved, and the accurate extraction of the water surface of the mountain surrounding the reservoir is achieved, and the extraction effect is improved.
Patent Information
- Application Number
- CN202410425141.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-04-10
AI Technical Summary
When extracting the water-to-water surface of the mountains around the reservoir, the prior art methods are complex and the threshold design is improper, resulting in discontinuity of the extracted ridge lines, affecting the accuracy of the extraction.
The simplified processing of the surface vector diagram is used to generate the search range, and the intersection of the normal and the DEM contour lines are intercepted, and the changes in elevation points are judged, the ridge points and connection points are extracted, and the surface elements are formed and intersected with the reservoir surface. Get accurate surface facing the water.
It improves the continuity of the ridge line and the accuracy of extraction, adapts to different terrain conditions, and enhances the extraction effect of the water-facing surface of the mountains around the reservoir.
Smart Images

Figure CN118377925B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote sensing and computer vision technology, and more specifically, to a method and device for extracting the water-facing surface of a mountain around a reservoir. Background Art
[0002] In order to improve the ecological environment of the mountains, eucalyptus trees are usually planted in large numbers. Eucalyptus is a fast-growing tree species with a high demand for water. Planting eucalyptus trees on a large scale near mountain reservoirs may cause the groundwater level to drop, thereby affecting the water volume of the reservoir and the sustainability of surrounding water resources. In order to ensure the ecological security of the reservoir's water resources, eucalyptus-free areas need to be set up in the water-facing areas of the mountains around the reservoir to avoid threats to water resources caused by excessive planting of eucalyptus trees.
[0003] The premise of setting up a eucalyptus no-planting zone is to extract the water-facing surface of the mountains around the reservoir. In the prior art, the water-facing surface is obtained by extracting the ridge line. This method mainly uses the curvature method, flow direction method and gradient method to directly process the DEM raster data. The threshold design of these methods is relatively complex, and the extracted ridge line is discontinuous, making the obtained mountain water-facing surface inaccurate. Summary of the invention
[0004] The purpose of the embodiment of the present application is to provide a method and device for extracting the water-facing surface of the mountain around the reservoir, which can improve the accuracy of the water-facing surface extraction. The embodiment of the present application is mainly achieved through the following technical solutions:
[0005] A first aspect of an embodiment of the present application provides a method for extracting the water-facing surface of a mountain around a reservoir, comprising:
[0006] Get the surface vector map of the reservoir surface;
[0007] Applying a predetermined algorithm to optimize the surface vector diagram to generate a simplified diagram;
[0008] generating a search scope according to the simplified graph;
[0009] Traversing each endpoint of the simplified graph in turn, obtaining the internal angle formed between each endpoint and the two endpoints before and after it, and supplementing the search range according to the internal angle;
[0010] Intersecting the normal lines within the search range with the contour lines generated by DEM (Digital Elevation Model), and obtaining a set of elevation points where each normal line passes through the contour lines;
[0011] Traversing the normals within the search range in order, judging whether the change rules of all elevation points in the elevation point set of the current normal line conform to the peak change rule, if so, judging whether the current elevation point is the same as the next elevation point, if so, taking the middle position between the current elevation point and the next elevation point as the peak point, and generating a peak point set based on the peak point, taking the first element in the peak point set as the ridge point of the current normal line; if not, taking the elevation point set of the current normal line as the connection point set, and calculating the connection point of the current normal line based on the ridge point corresponding to the previous normal line and the next ridge point;
[0012] All the ridge points and connection points of the normal lines are connected in order to form a surface element, and the surface element is intersected and inverted with the reservoir surface to obtain the water-facing surface.
[0013] According to one embodiment of the present application, the predetermined algorithm is the Douglas-Peucker algorithm.
[0014] According to one embodiment of the present application, the step of generating a search scope according to the simplified graph includes:
[0015] Taking the perpendicular vector of the line segment vector direction of two adjacent endpoints on the outer ring line segment in the simplified graph as the generating direction of the normal line, setting the normal line and the length of the normal line;
[0016] Set the distance between each two adjacent normal lines;
[0017] The search range is generated according to the length and the interval.
[0018] According to one embodiment of the present application, the step of supplementing the search range according to the inner angle includes:
[0019] If the inner angle is greater than 180 degrees, obtain the outer angle corresponding to the inner angle, set the angle bisector corresponding to the outer angle, take the point where each normal line intersects with the angle bisector as the starting point, and remove the line segment from the starting point to the end of the normal line;
[0020] If the inner angle is less than 180 degrees, a region to be supplemented is formed by two intersecting normal lines as a boundary, and corresponding normal lines are generated in the region to be supplemented to supplement the search range.
[0021] According to an embodiment of the present application, the step of calculating the connection point of the current normal line according to the ridge point corresponding to the previous normal line and the next ridge point includes:
[0022] The ridge point corresponding to the previous normal line and the next ridge point are connected into a straight line, and the point with the shortest distance to the straight line in the connection point set is taken as the connection point.
[0023] According to an embodiment of the present application, before the step of sequentially connecting the ridge points and connection points of all normal lines to form a surface element, and intersecting and negating the surface element with the reservoir surface to obtain the water-facing surface, the method for extracting the water-facing surface of the mountain around the reservoir further includes:
[0024] Determine whether the straight-line distance between the current connection point and the ridge point of the previous normal line, as well as the straight-line distance between the current connection point and the ridge point or connection point of the next normal line, are both greater than the straight-line distance between the ridge point of the previous normal line and the ridge point or connection point of the next normal line. If so, remove the current connection point as a redundant point.
[0025] A second aspect of the embodiment of the present application provides an extraction device for the water-facing surface of a mountain around a reservoir, comprising:
[0026] The acquisition module is used to obtain the surface vector diagram of the reservoir surface;
[0027] A simplified graph generation module, used for optimizing the surface vector graph by applying a predetermined algorithm to generate a simplified graph;
[0028] A search scope generating module, used for generating a search scope according to the simplified graph;
[0029] A supplementary search range module is used to traverse the endpoints of the simplified graph in turn, obtain the internal angle formed between each endpoint and the two endpoints before and after it, and supplement the search range according to the internal angle;
[0030] The elevation point set acquisition module is used to perform intersection processing on the normal lines within the search range and the contour lines generated by the DEM, and obtain the elevation point set where each normal line passes through the contour lines;
[0031] A search range traversal module is used to sequentially traverse the normals within the search range, determine whether the change rules of all elevation points in the elevation point set of the current normal conform to the peak change rule, and if so, determine whether the current elevation point is the same as the next elevation point. If so, take the middle position between the current elevation point and the next elevation point as the peak point, generate a peak point set based on the peak point, and take the first element in the peak point set as the ridge point of the current normal; if not, take the elevation point set of the current normal as the connection point set, and calculate the connection point of the current normal based on the ridge point corresponding to the previous normal and the next ridge point;
[0032] The water-facing surface generation module is used to connect the ridge points and connection points of all normal lines in order to form a surface element, and to intersect and invert the surface element with the reservoir surface to obtain the water-facing surface.
[0033] A third aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of any of the above-described methods for extracting the water-facing surface of a mountain surrounding a reservoir are implemented.
[0034] A fourth aspect of an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for extracting the water-facing surface of a mountain surrounding a reservoir.
[0035] The beneficial effects of the embodiments of the present application include:
[0036] The method for extracting the water-facing surface of the mountain around the reservoir provided in the embodiment of the present application generates a search range on a simplified map corresponding to the surface vector map of the reservoir surface; the normal lines within the search range are intersected with the contour lines generated by the DEM to obtain the set of elevation points of each normal line passing through the contour lines (that is, the elevation point information of the mountain profile on each normal line); then, it is determined whether the change law of all elevation points in the elevation point set of the current normal line conforms to the change law of the peak, and for the elevation point set that conforms to the change law of the peak, it is determined whether the current elevation point is the same as the next elevation point. , if they are the same, then the middle position between the current elevation point and the next elevation point is taken as the peak point, and a peak point set is generated based on the peak point, and the first element in the peak point set is taken as the ridge point of the current normal; for the elevation point set that does not conform to the peak change law, the elevation point set of the current normal is taken as the connection point set, and the connection point of the current normal is calculated based on the ridge point corresponding to the previous normal and the next ridge point; after connecting the ridge points and connection points of all normals to form a surface element, the intersection of the surface element and the reservoir surface is reversed to obtain the water-facing surface. That is, the present application combines the simplification of the surface vector diagram of the reservoir surface, the generation of the search range normal and the extraction of the ridge point, which can not only improve the continuity of the ridge line, but also adapt to the extraction needs of the water-facing surface of the mountains around the reservoir under different terrain conditions, thereby greatly improving the accuracy of the water-facing surface extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 A flow chart of a method for extracting the water-facing surface of a mountain around a reservoir of the present invention in some embodiments;
[0039] Figure 2 A surface vector diagram in some embodiments of the present invention;
[0040] Figure 3 A simplified diagram of some embodiments of the present invention;
[0041] Figure 4 A schematic diagram of the intersection of a normal line and an isovalue line in some embodiments of the present invention;
[0042] Figure 5 A schematic diagram of elevation changes of a mountain profile in some embodiments of the present invention;
[0043] Figure 6 Schematic diagram of the extraction result of ridge points on each normal line in some embodiments of the present invention;
[0044] Figure 7 A schematic diagram of a water-facing surface in some embodiments of the present invention;
[0045] Figure 8 A flow chart of another embodiment of the method for extracting the water-facing surface of a mountain around a reservoir of the present invention;
[0046] Fig. 9 A schematic diagram of generating normal lines in some embodiments of the present invention;
[0047] Fig.10 A schematic diagram of generating normal lines within a local search range in some embodiments of the present invention;
[0048] Fig.11 A schematic diagram of generating normal lines within a local search range in other embodiments of the present invention;
[0049] Fig.12 A schematic diagram of connection points in some embodiments of the present invention;
[0050] Fig.13 Schematic diagram of connection points in other embodiments of the present invention;
[0051] Fig.14 It is a structural block diagram of some embodiments of the extraction device for the water-facing surface of the mountain around the reservoir of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] <Extraction method of the water-facing surface of the mountains around the reservoir>
[0054] like Figure 1 FIG. 1 is a flow chart of a method for extracting the water-facing surface of a mountain around a reservoir provided in an embodiment of the present application. The method for extracting the water-facing surface of a mountain around a reservoir includes:
[0055] S1. Obtain a surface vector diagram of the reservoir surface. The surface vector diagram can be referred to Figure 2 shown.
[0056] S2, applying a predetermined algorithm to optimize the surface vector diagram to generate a simplified diagram. The simplified diagram can refer to Figure 3 shown.
[0057] The step S2 is used to regularize the reservoir contour and reduce the impact of redundant points on the subsequent generation of the search range normal.
[0058] Since there are multiple inflection points that are close to each other or on the same straight line in the surface vector map, by setting the simplification intensity according to the predetermined algorithm, some inflection points (i.e., the redundant points) can be reduced to varying degrees to increase the computational efficiency of the method for extracting the water-facing surface of the mountain around the reservoir.
[0059] Furthermore, the predetermined algorithm is a Douglas-Peucker algorithm.
[0060] S3. Generate a search scope according to the simplified graph.
[0061] The search range is the search range of the front water surface.
[0062] S4. Traverse each endpoint of the simplified graph in turn, obtain the internal angle formed between each endpoint and the two endpoints before and after it, and supplement the search range according to the internal angle.
[0063] The endpoints are the inflection points on the simplified graph. Figure 3 As shown, Figure 3 The label P in is the endpoint.
[0064] The endpoints described in this article are all the endpoints of the outer ring segments on the simplified graph. When the simplified graph has holes, that is, there are inner rings, the endpoints described in this application still refer to the endpoints on the outermost ring segment.
[0065] The number of endpoints varies with the complexity of the outer loop segment.
[0066] S5. Intersecting the normal lines within the search range with the contour lines generated by DEM (Digital Elevation Model) to obtain a set of elevation points where each normal line passes through the contour lines.
[0067] In the embodiment of the present application, the schematic diagram of the intersection of the normal line and the isoline can be referred to Figure 4 shown.
[0068] The set of elevation points corresponding to each normal line is the set of all elevation points on the normal line. For example, Figure 4 As shown, Figure 4 The set of elevation points of the first normal line in the middle left part is [100, 110, 120, 130, 130, 120, 110, 100, 90, 80, 80].
[0069] The elevation point set can be understood as mountain profile elevation information.
[0070] S6. Traverse the normals within the search range in order, and determine whether the change pattern of all elevation points in the elevation point set of the current normal conforms to the peak change pattern. If so, determine whether the current elevation point is the same as the next elevation point. If so, take the middle position between the current elevation point and the next elevation point as the peak point, and generate a peak point set based on the peak point, and take the first element in the peak point set as the ridge point of the current normal; if not, take the elevation point set of the current normal as the connection point set, and calculate the connection point of the current normal based on the ridge point corresponding to the previous normal and the next ridge point.
[0071] Regarding the extraction of ridge points, this application can be implemented according to the following examples (the elevation change diagrams of the local mountain profiles of the following five examples are as follows: Figure 5 shown):
[0072] Example 1: If the elevation point set of the current normal is [90, 100, 110, 120, 130, 130, 120, 110, 100], then the peak point (the peak point is the top point of the mountain profile) is between [130, 130]. The middle position of the elevation point [130, 130] is taken as the peak point, and the peak point set is generated from this peak point. At this time, the peak point set corresponding to the current normal has only one element, so this peak point is extracted as the ridge point;
[0073] Example 2: If the current normal elevation point set is [100, 110, 120, 120, 110, 120, 130, 140, 150, 150, 140, 130], then take the middle position of the elevation point [120, 120] as the first peak point, and take the first peak point as the first element of the peak point set; take the middle position of the elevation point [150, 150] as the second peak point, and take the second peak point as the second element of the peak point set; take the first element of the peak point set, that is, the middle position of the elevation point [120, 120] as the ridge point;
[0074] Example 3: If the elevation point set of the current normal is [120, 130, 130, 140, 150, 160, 160, 150, 140, 130], this elevation point set is similar to a terraced mountain. The middle position of the elevation point [160, 160] is taken as the peak point, and the peak point set is generated from this peak point. At this time, the peak point set corresponding to the current normal has only one element, so this peak point is extracted as the ridge point;
[0075] Example 4: If the current normal elevation point set is [130, 140, 140, 130, 120, 120, 110], the ridge point is located in the middle of the elevation point [140, 140], and there is a terrace-like mountain structure on the back of the mountain.
[0076] Example 5: If the current normal elevation point set is [130, 120, 110, 100, 90, 80], since the elevation is in a continuous downward trend, the reservoir may be located at a local peak, and the first elevation point is taken as the ridge point.
[0077] For a schematic diagram of the extraction results of the ridge points on each normal line, please refer to Figure 6 shown.
[0078] Regarding the law of mountain change, it means that all the elevation points in the elevation point set show an increasing trend in sequence. When two adjacent elevation points reach the same altitude, they begin to show a decreasing trend, such as the above example one; or, all the elevation points in the elevation point set show an increasing trend in sequence. When two adjacent elevation points reach the same altitude, they begin to show a decreasing trend. Then, when another two adjacent elevation points reach the same altitude, they begin to show an increasing trend. Then, when two more adjacent elevation points reach the same altitude, they begin to show a decreasing trend, such as the above example two.
[0079] S7. Connect all the ridge points and connection points of the normal lines in order to form a surface element, and perform intersection inversion on the surface element and the reservoir surface to obtain a water-facing surface. The schematic diagram of the water-facing surface can be referred to Figure 7 As shown, Figure 7The dark area pointed by the middle number Y is the water-facing side of the mountain.
[0080] This application combines the simplification of the surface vector diagram of the reservoir surface, the generation of the normal line of the retrieval range and the extraction of the ridge points. It can not only improve the continuity of the ridge line, but also adapt to the extraction needs of the water-facing surface of the mountains around the reservoir under different terrain conditions, thereby greatly improving the accuracy of the water-facing surface extraction.
[0081] In some embodiments, Figure 8 As shown, step S3 includes:
[0082] S31, taking the perpendicular vector of two adjacent endpoints on the outer ring line segment in the simplified graph in the line segment vector direction as the direction of generating the normal line, setting the normal line and the length of the normal line.
[0083] The schematic diagram of generating the normal line can be referred to Fig. 9 As shown, in Fig. 9 In the figure, G1 is the direction of the line segment vector, G2 is the direction in which the normal is generated, G3 is the length of the normal, and G4 is the normal spacing.
[0084] In the embodiment of the present application, the length of the normal line refers to the distance from the reservoir to the surrounding mountains. The length of the normal line is set to 500m, that is, the water-facing surface within 500 meters around the reservoir is obtained. The larger the length of the normal line is set, the farther the range is.
[0085] S32, set the distance between every two adjacent normal lines (the distance is understood as Fig. 9 ).
[0086] The spacing refers to the density of the searched ridge points. The spacing is set to 20m. The smaller the parameter setting, the more normal lines are generated between two points, the denser the searched ridge points, and the closer the front surface is to the reservoir.
[0087] It should be understood that the length of 500m and the spacing of 20m are relatively appropriate threshold parameters finally obtained based on multiple vector tests. When the threshold parameters of the length of the normal and the spacing of the normal change, the water-facing surface of the reservoir generated by this application will also have different degrees of differences.
[0088] S33. Generate the search range according to the length and the interval.
[0089] In some implementations, the step of supplementing the search range according to the inner angle includes:
[0090] S41. If the inner angle is greater than 180 degrees, obtain the outer angle corresponding to the inner angle, set the angle bisector corresponding to the outer angle, take the point where each normal line intersects with the angle bisector as the starting point, and remove the line segment from the starting point to the end of the normal line.
[0091] For example, Fig.10 As shown, if ∠ABC is greater than 180 degrees, then make unit vectors BA and BC and By vector addition Get the vector where the angle bisector BD of the vector lies Located in vector The normals on both sides, and the vector When the rays intersect, take the point where each normal line intersects with the ray as the starting point, remove the line segment from the starting point to the end of each normal line, and finally take the intersection point on the ray as the new end point of the current normal line.
[0092] S42. If the inner angle is less than 180 degrees, a region to be supplemented is formed with two intersecting normal lines as boundaries, and corresponding normal lines are generated in the region to be supplemented to supplement the search range.
[0093] For example, Fig.11 As shown, if ∠ABC is less than 180 degrees, then draw the normal vector through AB and BC respectively. and Normal vector and The fan-shaped area formed between is the area to be supplemented. According to the size of the preset angle, and Normal lines are generated between the ranges (i.e., within the area to be supplemented) to supplement the search range. In the embodiment of the present application, the preset angle is 10 degrees. In other embodiments, the preset angle can be set by those skilled in the art according to actual needs.
[0094] The purpose of optimizing the normal according to the inner angle in this application is to make the normals in the search range non-repetitive, improve the coverage completeness of the normals, and reduce the error in finding the ridge points based on the search range.
[0095] In some embodiments, the step of calculating the connection point of the current normal line according to the ridge point corresponding to the previous normal line and the next ridge point comprises:
[0096] The ridge point corresponding to the previous normal line and the next ridge point are connected into a straight line, and the point with the shortest distance to the straight line in the connection point set is taken as the connection point.
[0097] For example, in Fig.12In the figure, the label A on the normal line of label 1 is the ridge point, the label B on the normal line of label 4 is the ridge point, and there are multiple elevation points on the normal lines of label 2 and label 3. This application connects the ridge points A and B into a straight line to determine which elevation point on the normal lines of label 2 and label 3 is closest to the straight line. Fig.12 In the figure, the elevation point labeled D on the normal line labeled 2 is closest to the straight line, so the elevation point labeled D is used as the connection point of the normal line labeled 2; the elevation point labeled C on the normal line labeled 3 is closest to the straight line, so the elevation point labeled C is used as the connection point of the normal line labeled 3.
[0098] It should be understood that Fig.12 The ▲ symbol is the ridge point, the ● symbol is the elevation point, and the ○ symbol is the connection point.
[0099] In some embodiments, before step S7, the method for extracting the water-facing surface of the mountain around the reservoir further includes:
[0100] Determine whether the straight-line distance between the current connection point and the ridge point of the previous normal line, as well as the straight-line distance between the current connection point and the ridge point or connection point of the next normal line, are both greater than the straight-line distance between the ridge point of the previous normal line and the ridge point or connection point of the next normal line. If so, remove the current connection point as a redundant point.
[0101] For example, Fig.13 As shown, connect the connection point D of the normal labeled 2 and the ridge point A of the normal labeled 1 into a straight line AD, connect the connection point D of the normal labeled 2 and the connection point C of the normal labeled 3 into a straight line CD, connect the connection point A of the normal labeled 1 and the connection point C of the normal labeled 3 into a straight line AC, and determine whether the straight line AD and the straight line CD are both longer than the straight line AC. If so, remove the connection point D as a redundant point.
[0102] exist Fig.13 In the figure, the ▲ symbol is a ridge point, the ● symbol is an elevation point, the ○ symbol is a connection point, and the △ symbol is a redundant point.
[0103] It should also be understood that the present application traverses each endpoint of the reservoir in an orderly manner, supplements or truncates the normal according to the inner angle formed between the three adjacent endpoints, and then, by setting the length and spacing of the normal in the search range, uses vector calculation to construct the search range normal perpendicular to the reservoir surface segment, which can more evenly obtain the elevation distribution area within the specified range of the reservoir.
[0104] The present application is also applicable to extracting specific slopes, thus avoiding the situation where traditional methods are difficult to apply to specific slopes.
[0105] <Extraction device on the water-facing surface of the mountains around the reservoir>
[0106] like Fig.14, which is a structural block diagram of a device for extracting the water-facing surface of a mountain around a reservoir provided in an embodiment of the present application, wherein the device 100 for extracting the water-facing surface of a mountain around a reservoir comprises:
[0107] An acquisition module 101 is used to acquire a surface vector diagram of a reservoir surface;
[0108] A simplified graph generating module 102, configured to optimize the planar vector graph by applying a predetermined algorithm to generate a simplified graph;
[0109] A search scope generating module 103, used to generate a search scope according to the simplified graph;
[0110] A supplementary search range module 104 is used to traverse each endpoint of the simplified graph in turn, obtain the internal angle formed between each endpoint and its two preceding and succeeding endpoints, and supplement the search range according to the internal angle;
[0111] The elevation point set acquisition module 105 is used to perform intersection processing on the normal lines within the search range and the contour lines generated by the DEM, and obtain the elevation point set where each normal line passes through the contour line;
[0112] The search range traversal module 106 is used to sequentially traverse the normals within the search range, determine whether the change pattern of all elevation points in the elevation point set of the current normal line conforms to the peak change pattern, and if so, determine whether the current elevation point is the same as the next elevation point. If so, take the middle position between the current elevation point and the next elevation point as the peak point, generate a peak point set based on the peak point, and take the first element in the peak point set as the ridge point of the current normal line; if not, take the elevation point set of the current normal line as the connection point set, and calculate the connection point of the current normal line based on the ridge point corresponding to the previous normal line and the next ridge point;
[0113] The water-facing surface generation module 107 is used to sequentially connect the ridge points and connection points of all normal lines to form a surface element, and perform intersection and inversion of the surface element with the reservoir surface to obtain the water-facing surface.
[0114] In some implementations, the search scope generating module 103 includes:
[0115] The normal setting unit is used to set the normal and the length of the normal by taking the perpendicular vector of the two adjacent endpoints on the outer ring line segment in the simplified graph in the line segment vector direction as the normal generation direction.
[0116] The spacing setting unit is used to set the spacing between every two adjacent normal lines.
[0117] A search range generating unit is used to generate the search range according to the length and the interval.
[0118] In some implementations, the supplementary search scope module 104 is further configured to implement the following steps:
[0119] If the inner angle is greater than 180 degrees, obtain the outer angle corresponding to the inner angle, set the angle bisector corresponding to the outer angle, take the point where each normal intersects the angle bisector as the starting point, and remove the line segment from the starting point to the end of the normal; if the inner angle is less than 180 degrees, use the two intersecting normals as the boundary to form an area to be supplemented, and generate corresponding normals in the area to be supplemented to supplement the search range.
[0120] In some implementations, the search range traversal module 106 is further configured to implement the following steps:
[0121] The ridge point corresponding to the previous normal line and the next ridge point are connected into a straight line, and the point with the shortest distance to the straight line in the connection point set is taken as the connection point.
[0122] In some embodiments, the extraction device 100 of the water-facing surface of the mountain around the reservoir also includes a redundant point removal module, which is used to determine whether the straight-line distance between the current connection point and the ridge point of the previous normal line, and the straight-line distance between the current connection point and the ridge point of the next normal line or the connection point are both greater than the straight-line distance between the ridge point of the previous normal line and the ridge point of the next normal line or the connection point. If so, the current connection point is removed as a redundant point.
[0123] <Electronic equipment>
[0124] A third aspect of an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of any of the above-described methods for extracting the water-facing surface of a mountain surrounding a reservoir are implemented.
[0125] <Non-transitory computer-readable storage medium>
[0126] A fourth aspect of an embodiment of the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for extracting the water-facing surface of a mountain surrounding a reservoir.
[0127] It should also be noted that, unless otherwise defined, all technical and scientific terms used in the specification of this application have the same meaning as those commonly understood by those skilled in the art in the technical field of this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in the specification of this application includes any and all combinations of one or more related listed items.
[0128] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0129] It should be noted that, in this document, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products or apparatus.
[0130] The technical features of the above embodiments can be combined without changing the basic principles of the present invention. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0131] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of patent protection of the present application shall be subject to the attached claims.
Claims
1. A method for extracting the water-facing surface of the mountain around the reservoir, characterized in that: include: Get the surface vector diagram of the reservoir surface; Applying a predetermined algorithm to optimize the surface vector diagram to generate a simplified diagram; generating a search scope according to the simplified graph; Traversing each endpoint of the simplified graph in turn, obtaining the internal angle formed between each endpoint and the two endpoints before and after it, and supplementing the search range according to the internal angle; Intersecting the normal lines within the search range with the contour lines generated by the DEM, and obtaining a set of elevation points where each normal line passes through the contour lines; Traversing the normals within the search range in order, judging whether the change rules of all elevation points in the elevation point set of the current normal line conform to the peak change rule, if so, judging whether the current elevation point is the same as the next elevation point, if so, taking the middle position between the current elevation point and the next elevation point as the peak point, and generating a peak point set based on the peak point, taking the first element in the peak point set as the ridge point of the current normal line; if not, taking the elevation point set of the current normal line as the connection point set, and calculating the connection point of the current normal line based on the ridge point corresponding to the previous normal line and the next ridge point; All the ridge points and connection points of the normal lines are connected in order to form a surface element, and the surface element is intersected and inverted with the reservoir surface to obtain the water-facing surface.
2. The method for extracting the water-facing surface of the mountain around the reservoir according to claim 1, characterized in that: The predetermined algorithm is the Douglas-Peucker algorithm.
3. The method for extracting the water-facing surface of the mountain around the reservoir according to claim 1, characterized in that: The step of generating a search scope according to the simplified graph comprises: Taking the perpendicular vector of the line segment vector direction of two adjacent endpoints on the outer ring line segment in the simplified graph as the generating direction of the normal line, setting the normal line and the length of the normal line; Set the distance between each two adjacent normal lines; The search range is generated according to the length and the interval.
4. The method for extracting the water-facing surface of the mountain around the reservoir according to claim 1, characterized in that: The step of supplementing the search range according to the inner angle comprises: If the inner angle is greater than 180 degrees, obtain the outer angle corresponding to the inner angle, set the angle bisector corresponding to the outer angle, take the point where each normal line intersects with the angle bisector as the starting point, and remove the line segment from the starting point to the end of the normal line; If the inner angle is less than 180 degrees, a region to be supplemented is formed by two intersecting normal lines as a boundary, and corresponding normal lines are generated in the region to be supplemented to supplement the search range.
5. The method for extracting the water-facing surface of the mountain around the reservoir according to claim 1, characterized in that: The step of calculating the connection point of the current normal line according to the ridge point corresponding to the previous normal line and the next ridge point comprises: The ridge point corresponding to the previous normal line and the next ridge point are connected into a straight line, and the point with the shortest distance to the straight line in the connection point set is taken as the connection point.
6. The method for extracting the water-facing surface of the mountain around the reservoir according to claim 1, characterized in that: Before the step of sequentially connecting the ridge points and connection points of all normal lines to form a surface element, and performing intersection inversion on the surface element and the reservoir surface to obtain the water-facing surface, the method for extracting the water-facing surface of the mountain around the reservoir also includes: Determine whether the straight-line distance between the current connection point and the ridge point of the previous normal line, as well as the straight-line distance between the current connection point and the ridge point or connection point of the next normal line, are both greater than the straight-line distance between the ridge point of the previous normal line and the ridge point or connection point of the next normal line. If so, remove the current connection point as a redundant point.
7. The extraction device on the water-facing surface of the mountain around the reservoir is characterized by: include: The acquisition module is used to obtain the surface vector diagram of the reservoir surface; A simplified graph generation module, used for optimizing the surface vector graph by applying a predetermined algorithm to generate a simplified graph; A search scope generating module, used for generating a search scope according to the simplified graph; A supplementary search range module is used to traverse the endpoints of the simplified graph in turn, obtain the internal angle formed between each endpoint and the two endpoints before and after it, and supplement the search range according to the internal angle; The elevation point set acquisition module is used to perform intersection processing on the normal lines within the search range and the contour lines generated by the DEM, and obtain the elevation point set where each normal line passes through the contour lines; A search range traversal module is used to sequentially traverse the normals within the search range, determine whether the change rules of all elevation points in the elevation point set of the current normal conform to the peak change rule, and if so, determine whether the current elevation point is the same as the next elevation point. If so, take the middle position between the current elevation point and the next elevation point as the peak point, generate a peak point set based on the peak point, and take the first element in the peak point set as the ridge point of the current normal; if not, take the elevation point set of the current normal as the connection point set, and calculate the connection point of the current normal based on the ridge point corresponding to the previous normal and the next ridge point; The water-facing surface generation module is used to connect the ridge points and connection points of all normal lines in order to form a surface element, and to intersect and invert the surface element with the reservoir surface to obtain the water-facing surface.
8. An electronic device, characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for extracting the water-facing surface of the mountain around the reservoir as described in any one of claims 1 to 6 are implemented.
9. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for extracting the water-facing surface of the mountain around the reservoir as described in any one of claims 1 to 6 above are implemented.
Citation Information
Patent Citations
Method for automatically extracting terrain characteristic line according to vector contour line data
CN103177258A
Thinning-based terrain characteristic line extraction method and apparatus, and electronic device
CN107341494A
Repeatable building element retrieval method based on axial movement and local matching
CN116010644A
Ridgeline assorting system for mountainous region and method thereof
KR1020080104408A
