Key point-based central axis road network generation method, device and equipment and storage medium
Patent Information
- Application Number
- CN202211163569.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2042-09-23
Smart Images

Figure CN115619895B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of road network technology, and in particular to a method, apparatus, device, and storage medium for generating a central axis road network based on key points. Background Technology
[0002] Currently, one existing road network generation method obtains geometrically similar centerlines through skeleton extraction and centerline extraction. These centerlines are then used to represent the target area, generating a road network suitable for positioning and navigation. However, in large areas, a few centerlines can be reconstructed into countless different surfaces, and a few centerlines cannot adequately represent these surfaces. Furthermore, the aforementioned method cannot abstract passable surfaces into centerlines that conform to local angular geometry at corners. Slightly altering the details of the input surface can result in centerlines with entirely different geometric meanings, leading to poor noise resistance. Summary of the Invention
[0003] This invention provides a method, apparatus, device, and storage medium for generating a central axis road network based on key points, so as to restore local angles at corners, eliminate the need for two roads on the same straight line to turn, and minimize the impact of outer contour details, while having strong noise resistance.
[0004] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for generating a central axis road network based on key points, comprising:
[0005] Obtain base map data containing expanding obstacles, and perform differential processing on the base map data to obtain a passable area map;
[0006] A set of central axis segments is constructed based on the Veno diagram and the access area diagram, and initial key points are selected from the set of central axis segments; wherein, the initial key points are vertices in the set of central axis segments that have more than two connecting line segments;
[0007] By traversing all the initial key points, and establishing the connection relationship between each pair of initial key points through the central axis, a simplified set of central axis segments is obtained.
[0008] Based on the tangent relationship between all the initial key points and the boundary lines, the initial key points are adjusted to obtain the target key points;
[0009] The simplified centerline segment set is adjusted based on the target key points to obtain the target road network map.
[0010] Preferably, the construction of the central axis segment set based on the Venn diagram and the passage area map includes:
[0011] The boundary line of the access area map is split into a set of discrete line segments consisting of two points;
[0012] Sampling points are obtained by uniformly sampling each line segment in the line segment set according to a preset sampling density;
[0013] A Veno diagram is constructed based on the sampling points; wherein the Veno diagram comprises a continuous polygon consisting of the perpendicular bisectors of the lines connecting two adjacent points;
[0014] Select a target polygon from all the continuous polygons; wherein the target polygon is the polygon in which the continuous polygon overlaps with the passable area and the area is greater than a preset area threshold.
[0015] Traverse all line segments in the target polygon and construct a set of central axis segments based on the line segments whose vertices do not coincide with the sampling points.
[0016] Preferably, after establishing the connection relationship between each pair of initial key points through the central axis, the method further includes:
[0017] Select any initial key point from the connection relationships, and use the points that do not coincide with the initial key point as the current index points;
[0018] Determine whether the distance from all points between the initial keypoint and the current index point to the line connecting the initial keypoint and the current index point is less than the sampling density; if yes, update the current index point to the next index point of the current index point; if no, record the previous index point of the current index point as a new keypoint, and update the initial keypoint to the new keypoint;
[0019] The connection relationship is simplified based on the initial key points and the newly added key points to obtain a simplified set of central axis segments.
[0020] Preferably, the step of adjusting the initial key points based on the tangent relationship between all the initial key points and the boundary line to obtain the target key points includes:
[0021] When any of the initial key points is tangent to two boundary lines, the initial key point is translated to the midpoint of the two tangent points to obtain the target key point;
[0022] When any of the initial key points is tangent to three boundary lines and intersects two of them, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the vertex of the other boundary line to obtain the target key point.
[0023] When any of the initial key points is tangent to the three boundary lines and the three boundary lines do not intersect, extend two boundary lines in the same direction until they intersect with the other boundary line, select the shortest of the two extended lines, and translate the initial key point to half the distance of the shortest extended line to obtain the target key point;
[0024] When any of the initial key points is tangent to two boundary lines and one boundary point, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the boundary point to obtain the target key point;
[0025] When any of the initial key points is tangent to a boundary line and two boundary points, extend the two boundary points to intersect the boundary line, select the shortest of the two extension lines, and translate the initial key point to half the distance of the shortest extension line to obtain the target key point.
[0026] Preferably, after obtaining the target road network map, the method further includes:
[0027] When the distance between all target key points in the selected area and the boundary line is greater than a preset distance threshold, and all the target key points are connected to each other, all the target key points are merged into a whole key point.
[0028] The connection relationships are reconstructed based on the overall key points to optimize the target road network map.
[0029] Preferably, after obtaining the target road network map, the method further includes:
[0030] When there is a corner relationship in the connection relationship, the projected distance of the corner is determined; wherein, the projected distance is the distance from the midpoint of the corner to the straight line connecting the two sides;
[0031] When the projection distance is less than a preset projection threshold, the corner relationship is converted into a straight line connection to optimize the target road network map.
[0032] Secondly, the present invention provides a central axis road network generation device based on key points, comprising:
[0033] The data processing module is used to acquire base map data containing expanding obstacles and perform differential processing on the base map data to obtain a passable area map;
[0034] The key point selection module is used to construct a set of central axis segments based on the Venn diagram and the passage area map, and select initial key points from the set of central axis segments; wherein, the initial key points are vertices in the set of central axis segments that have more than two connecting line segments;
[0035] The line segment set generation module is used to traverse all the initial key points, establish the connection relationship between each pair of initial key points through the central axis, and obtain a simplified central axis segment set.
[0036] The key point adjustment module is used to adjust the initial key points according to the tangent relationship between all the initial key points and the boundary line to obtain the target key points;
[0037] The road network map generation module is used to adjust the simplified centerline segment set according to the target key points to obtain the target road network map.
[0038] Preferably, the key point selection module includes:
[0039] A line segment splitting unit is used to split the boundary line of the access area map into a set of discrete line segments consisting of two points;
[0040] A sampling unit is used to uniformly sample each line segment in the line segment set according to a preset sampling density to obtain sampling points;
[0041] A Veno diagram construction unit is used to construct a Veno diagram based on the sampling points; wherein the Veno diagram comprises a continuous polygon composed of perpendicular bisectors of lines connecting two adjacent points;
[0042] A polygon selection unit is used to select a target polygon from all the continuous polygons; wherein the target polygon is a polygon among the continuous polygons whose area is greater than a preset area threshold;
[0043] The line segment set construction unit is used to traverse all line segments in the target polygon and construct the central axis line segment set based on the line segments whose vertices do not coincide with the sampling points.
[0044] Thirdly, the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the central axis road network generation method based on any one of the above-described methods.
[0045] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the central axis road network generation method based on any one of the above-described methods.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] This invention provides a method for generating a central axis road network based on key points. The method involves acquiring base map data containing expanding obstacles and performing differential processing on the base map data to obtain a traffic area map. A central axis segment set is constructed based on the Venn diagram and the traffic area map, and initial key points are selected from the central axis segment set. Each initial key point is a vertex in the central axis segment set that has more than two connecting line segments. All initial key points are traversed, and connection relationships are established between each pair of initial key points through the central axis to obtain a simplified central axis segment set. Based on the tangency relationship between all initial key points and boundary lines, the initial key points are adjusted to obtain target key points. The simplified central axis segment set is then adjusted based on the target key points to obtain the target road network map. The method provided by this invention can essentially restore local angles at corners, eliminate the need for turns between two roads on the same straight line, ensure the road network conforms to the overall surrounding direction, is less affected by outer contour details, has strong noise resistance, and produces a neat and aesthetically pleasing road network. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the process for generating a central axis road network based on key points according to the first embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of base map data provided in an embodiment of the present invention;
[0050] Figure 3 This is a schematic diagram of a passage area provided in an embodiment of the present invention;
[0051] Figure 4 This is a schematic diagram illustrating the construction principle of a Vinograph;
[0052] Figure 5 This is a schematic diagram of sampling points provided in an embodiment of the present invention;
[0053] Figure 6 This is a schematic diagram of the Venn diagram construction process provided in an embodiment of the present invention;
[0054] Figure 7 This is an initial road network diagram provided in an embodiment of the present invention;
[0055] Figure 8 This is a simplified initial road network diagram provided in an embodiment of the present invention;
[0056] Figure 9 This is a schematic diagram of the location of an initial key point provided in an embodiment of the present invention;
[0057] Figure 10 This is a schematic diagram of an initial key point position adjustment provided by an embodiment of the present invention;
[0058] Figure 11This is a schematic diagram showing the location of another initial key point provided in an embodiment of the present invention;
[0059] Figure 12 This is another schematic diagram of initial key point position adjustment provided by an embodiment of the present invention;
[0060] Figure 13 This is a schematic diagram showing the location of another initial key point provided in an embodiment of the present invention;
[0061] Figure 14 This is another schematic diagram of initial key point position adjustment provided by an embodiment of the present invention;
[0062] Figure 15 This is a schematic diagram showing the location of another initial key point provided in an embodiment of the present invention;
[0063] Figure 16 This is another schematic diagram of initial key point position adjustment provided by an embodiment of the present invention;
[0064] Figure 17 This is a schematic diagram showing the location of another initial key point provided in an embodiment of the present invention;
[0065] Figure 18 This is another schematic diagram of initial key point position adjustment provided by an embodiment of the present invention;
[0066] Figure 19 This is a schematic diagram of the target road network provided in an embodiment of the present invention;
[0067] Figure 20 This is a schematic diagram of a tortuous key point provided in an embodiment of the present invention;
[0068] Figure 21 This is a schematic diagram showing the key points after merging, provided in an embodiment of the present invention;
[0069] Figure 22 This is a schematic diagram of converting the angle relationship into a straight line connection provided in an embodiment of the present invention;
[0070] Figure 23 This is a schematic diagram of the final optimized road network provided by an embodiment of the present invention;
[0071] Figure 24 This is a schematic diagram of the structure of the central axis road network generation device based on key points provided in the second embodiment of the present invention. Detailed Implementation
[0072] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0073] Reference Figure 1 The first embodiment of the present invention provides a method for generating a central axis road network based on key points, including the following steps:
[0074] S11, Obtain base map data containing expanding obstacles, and perform differential processing on the base map data to obtain a passable area map;
[0075] S12, construct a set of central axis segments based on the Venn diagram and the passage area map, and select initial key points from the set of central axis segments; wherein, the initial key points are vertices in the set of central axis segments that have more than two connecting line segments;
[0076] S13, traverse all the initial key points, establish the connection relationship between each pair of initial key points through the central axis, and obtain the simplified central axis segment set;
[0077] S14, Based on the tangent relationship between all the initial key points and the boundary line, adjust the initial key points to obtain the target key points;
[0078] S15, adjust the simplified centerline segment set according to the target key points to obtain the target road network map.
[0079] In step S11, base map data containing expanding obstacles is acquired, and the base map data is subjected to differential processing to obtain a passable area map. The base map data is as follows: Figure 2 As shown in the map, the access area is as follows: Figure 3 As shown.
[0080] In step S12, a set of central axis segments is constructed based on the Veno diagram and the passable area map, and initial key points are selected from the set of central axis segments; wherein, the initial key points are vertices in the set of central axis segments that have more than two connecting line segments. It should be noted that a passable central axis can be constructed using a Veno diagram. Figure 4 As shown, the Veno map consists of a continuous polygon composed of perpendicular bisectors of lines connecting two adjacent points. First, a Delaunay triangulation is constructed from scattered points. Then, the circumcenter of each triangle is calculated. Finally, the circumcenters of two triangles with a common side are connected to form the Veno map. The parts that overlap with the passable area are then filtered by difference.
[0081] The construction of the central axis segment set based on the Vinio diagram and the passage area map includes:
[0082] The boundary line of the access area map is split into a set of discrete line segments consisting of two points;
[0083] Sampling points are obtained by uniformly sampling each line segment in the line segment set according to a preset sampling density;
[0084] A Veno diagram is constructed based on the sampling points; wherein the Veno diagram comprises a continuous polygon consisting of the perpendicular bisectors of the lines connecting two adjacent points;
[0085] Select a target polygon from all the continuous polygons; wherein the target polygon is the polygon in which the continuous polygon overlaps with the passable area and the area is greater than a preset area threshold.
[0086] Traverse all line segments in the target polygon and construct a set of central axis segments based on the line segments whose vertices do not coincide with the sampling points.
[0087] Reference Figures 5-7 In practical applications, the passable area is divided into a set of discrete line segments consisting of two points, and data points are sampled uniformly on each line segment. For efficiency, the sampling density is generally not very high, and can be selected from 0.01 meters to 10 meters. For example, in an indoor parking lot scenario, a sampling density of 0.5 meters is used.
[0088] In road networks, excessively narrow passages are generally not considered; an area smaller than a preset area threshold indicates that two boundaries are too close. After constructing a Venn diagram using sampling points, polygons in the Venn diagram with areas smaller than the preset area threshold need to be discarded. The area threshold is set according to the actual situation; for example, 0.1 square meters for pedestrians and 2 square meters for vehicles, determined based on the actual situation of the objects passing through.
[0089] Furthermore, since the road network is not drawn to hug obstacles, the set of line segments that intersect the Venn diagram with the edges of passable areas needs to be discarded. Traverse all Venn diagram line segment sets; if a line segment has a vertex that coincides with a sampled vertex, that line segment will not be considered part of the road network and is discarded.
[0090] In the filtered set of central axis segments, vertices with more than two connecting segments are defined as initial key points. The core of this invention lies in adjusting the position of the initial key points to construct the connectivity between the initial key points. Figure 7 A vertex in a corner with only one connection is discarded along with the line segment between it and the initial key point. These structures are usually in corners and are generally not used as road networks when drawing.
[0091] In step S13, all the initial key points are traversed, and the connection relationship between each pair of initial key points is established through the central axis to obtain a simplified central axis segment set.
[0092] Specifically, after determining the initial keypoints, find an initial keypoint A and extend the central axis connecting it in any direction. Since only the initial keypoint has more than two connections, while other ordinary vertices only have one or two connections, record the sequence of all ordinary points originating from this initial keypoint. If a vertex B is found to have only one line segment l connecting it (i.e., from the initial keypoint through line segment l to B), discard all line segments between A and B. If another initial keypoint C is found, obtain the connection between the initial keypoints A and C established through the central axis. The sequence of points from A to C is used as the connectivity of A and C. Then, traverse all initial keypoints to establish pairwise connections between them. Generally, an initial keypoint has only three line segments connecting it to other points, so typically one initial keypoint will establish three connections with other initial keypoints. Of course, if one line segment cannot find an initial keypoint (as in the A / B case), then establish two connections with other initial keypoints.
[0093] Furthermore, after establishing the connection relationship between each pair of initial key points through the central axis, the method further includes:
[0094] Select any initial key point from the connection relationships, and use the points that do not coincide with the initial key point as the current index points;
[0095] Determine whether the distance from all points between the initial keypoint and the current index point to the line connecting the initial keypoint and the current index point is less than the sampling density; if yes, update the current index point to the next index point of the current index point; if no, record the previous index point of the current index point as a new keypoint, and update the initial keypoint to the new keypoint;
[0096] The connection relationship is simplified based on the initial key points and the newly added key points to obtain a simplified set of central axis segments.
[0097] It should be noted that, due to the limitation of sampling density, the Vinograph generated between two parallel boundaries will have a wavy shape. The amplitude of the wavy shape depends on the sampling density. Therefore, it is necessary to simplify the connection relationship between key points to as few line segments as possible.
[0098] For example, starting from A, I, as the current index point, does not overlap with A. If the distance of all points between AI and line segment AI is less than the sampling density (approaching a straight line), then I takes the next index point i+1 in AB. Otherwise, the previous index point i-1 is the key point of AB, and the above steps are repeated from i-1 to B, recording all newly added key points. The connection relationship formed by line segments is simplified to a direct connection relationship between two points (a straight line), such as... Figure 8 As shown.
[0099] In step S14, the initial key points are adjusted according to the tangent relationship between all the initial key points and the boundary lines to obtain the target key points, specifically including:
[0100] When any of the initial key points is tangent to two boundary lines, the initial key point is translated to the midpoint of the two tangent points to obtain the target key point;
[0101] When any of the initial key points is tangent to three boundary lines and intersects two of them, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the vertex of the other boundary line to obtain the target key point.
[0102] When any of the initial key points is tangent to the three boundary lines and the three boundary lines do not intersect, extend two boundary lines in the same direction until they intersect with the other boundary line, select the shortest of the two extended lines, and translate the initial key point to half the distance of the shortest extended line to obtain the target key point;
[0103] When any of the initial key points is tangent to two boundary lines and one boundary point, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the boundary point to obtain the target key point;
[0104] When any of the initial key points is tangent to a boundary line and two boundary points, extend the two boundary points to intersect the boundary line, select the shortest of the two extended lines, and translate the initial key point to half the distance of the shortest extended line to obtain the target key point;
[0105] It should be noted that the tangency defined in this embodiment differs from the general definition of tangency. Generally, when a circle is tangent to a straight line, if the straight line and the curve intersect at two points, and these two points are infinitely close and tend to coincide, then the straight line is the tangent line of the curve at that point. In this embodiment, tangency is defined as follows: when the difference in the perpendicular distance between any initial keypoint and two or more boundary lines or boundary points is less than the sample density, the initial keypoint is determined to be tangent to the boundary line or boundary point. That is, the circle generated with the midpoint as any keypoint and the radius as the minimum distance from that keypoint to the surrounding edge line or vertex (ideally, this circle is tangent to at least two surrounding lines or points; in reality, due to point sampling, keypoints may be offset). When this circle is tangent to at least two surrounding lines or points or is close in distance (the distance difference is less than the sample density), the initial keypoint is determined to be tangent to the surrounding boundary line or point. Figure 11 As shown, the fact that the distances from the center of the circle to the three edges are not exactly equal can also be used to determine that they are tangent.
[0106] It's worth noting that the circle generated centered on the initial keypoint in the Vino map should be tangent to three elements (points / lines) of the contour line, or the newly added keypoint should be tangent to two elements. In reality, while the initial keypoint conforms to geometric local centers, the resulting road network effect obtained by connecting these initial keypoints does not align with popular aesthetics. Popular aesthetics generally favor a road network that is as straight as possible, with turns conforming to the angles of surrounding edges.
[0107] Since the sampling density is not high, finding a circle centered on a key point requires controlling the radius within a certain range. In this embodiment of the invention, tangency is defined as the perpendicular distance between the initial key point and several nearest boundary lines or boundary points, where the distance difference is less than the sampling density.
[0108] For example, refer to Figure 9 , Figure 10 When any of the initial key points is tangent to two boundary lines, the initial key point is translated to the midpoint of the two tangent points to obtain the target key point. If the original key point b is close to the distances of the upper and lower lines (the distance difference is less than the sampling density), then the actual position of key point b should be the midpoint (point a, where the upper and lower lines are parallel and the newly added parallel line midline is used as a reference) of the vertices (points c and d) of the upper and lower lines projected onto b.
[0109] Reference Figure 11 , Figure 12 When any of the initial key points is tangent to three boundary lines and intersects two of them, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the vertex of the other boundary line to obtain the target key point. Since point b is close to the three boundary lines (left, right, and bottom), the intersection point c of the two intersecting tangent lines (bottom left) and the vertex d of the other tangent line are found. Then, point b is translated to a (the midpoint of c and d).
[0110] Reference Figure 13 , Figure 14 When any of the initial key points is tangent to the three boundary lines and none of the three boundary lines intersect, extend two boundary lines with the same direction until they intersect with the third boundary line. Select the shortest of the two extensions and translate the initial key point to half the distance of the shortest extension to obtain the target key point. Specifically, if none of the three tangents intersect, translate the key point to a point with a direction close to the extension direction of the two tangents, perpendicular to the third tangent at a distance k. Here, k is the point with a direction close to the two tangents and closer to the third tangent, projected onto the third tangent at half the distance. Figure 14 To adjust the position of keypoint b, find two tangent lines with similar directions, and vertices c and d that are closer to b along these tangent lines. Project these tangent lines onto the other tangent line to obtain e and f. Take the midpoint g of e and f. Then, adjust keypoint b to point a that is k perpendicular to g. Here, k is half the shorter distance between ce and df.
[0111] Reference Figure 15 , Figure 16 When any of the initial key points is tangent to two boundary lines and one boundary point, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the boundary point to obtain the target key point. Specifically, in the case of tangency to a point on two lines, the key point is translated to the midpoint between the intersection of the two lines and the vertex of tangency. If key point b is tangent to the two upper right lines and point d, then the midpoint a between the intersection of the two upper right lines or the extension of the line c and the tangency point d is taken as the target position for translation.
[0112] Reference Figure 17 , Figure 18 When any of the initial keypoints is tangent to a boundary line and two boundary points, extend the two boundary points to intersect the boundary line, select the shortest of the two extensions, and translate the initial keypoint to half the distance of the shortest extension to obtain the target keypoint. Specifically, for the case of one line and two points, the process is similar to the three-line case. The keypoint is translated to a point with a direction close to the perpendicular distance k between the midpoints of the two tangent points projected onto the tangent line. Here, k is the point closer to the other tangent line, and half the distance of the projection onto the other tangent line. When adjusting the position of keypoint b, find the right tangent point cd with a direction close to the left tangent line. Project cd onto the other tangent line to obtain e and f. Take the midpoint g of f, and then adjust keypoint b to point a at a distance k perpendicular to g. Here, k is half the shorter distance between ce and df.
[0113] In step S15, the simplified centerline segment set is adjusted based on the target key points to obtain the target road network map. This adjustment process includes deleting the connection relationships established by the initial key points and reconstructing new connection relationships based on the target key points. Of course, if the initial key points meet the requirements and are not adjusted, their corresponding connection relationships can be used directly without reconstruction, and the final target road network map is as follows: Figure 19 As shown.
[0114] To facilitate understanding of the present invention, some preferred embodiments of the present invention will be described in further detail below.
[0115] In one implementation, after obtaining the target road network map, the method further includes:
[0116] When the distance between all target key points in the selected area and the boundary line is greater than a preset distance threshold, and all the target key points are connected to each other, all the target key points are merged into a whole key point.
[0117] The connection relationships are reconstructed based on the overall key points to optimize the target road network map.
[0118] Reference Figure 20 , Figure 21 In large areas, constructing a point network with connections between key points is not aesthetically pleasing and can lead to unnecessary detours in path planning. If, within a certain area, key points are all more than a threshold (e.g., 10 meters) away from the passable boundary, and these points can be connected to each other, these key points can be merged into one. The center of this network is taken, the connections between key points are deleted, and the connections between the merged key point and other key points are reconstructed. For example, if merging abc into d, and a has connections to e, b to c, a to b, and c to f, then the connections between d and e, and f are reconstructed.
[0119] In another implementation, after obtaining the target road network map, the method further includes:
[0120] When there is a corner relationship in the connection relationship, the projected distance of the corner is determined; wherein, the projected distance is the distance from the midpoint of the corner to the straight line connecting the two sides;
[0121] When the projection distance is less than a preset projection threshold, the corner relationship is converted into a straight line connection to optimize the target road network map.
[0122] Reference Figure 22Based on the angular relationship between nodes, if the deflection angle is too small, the projected distance after deflection is less than a preset projection threshold (e.g., 0.5 meters). This means that points with slight fluctuations near the center direction are straightened. The specific method is similar to eliminating wavy lines, facilitating the connection between key points and other key points. For example, if key points AB and AC are connected, but BC is not, check if the distance between A and BC is less than the projection threshold. If it is, project A onto line segment BC. The final optimized road network map is as follows: Figure 23 As shown.
[0123] The key-point-based central road network generation method provided by this invention can basically restore the local angle at corners, two roads on the same straight line do not need to turn, the road network conforms to the overall direction of the surrounding area, and is less affected by the details of the outer contour, with strong noise resistance and a neat and beautiful road network effect.
[0124] Reference Figure 24 The second embodiment of the present invention provides a central axis road network generation device based on key points, comprising:
[0125] The data processing module is used to acquire base map data containing expanding obstacles and perform differential processing on the base map data to obtain a passable area map;
[0126] The key point selection module is used to construct a set of central axis segments based on the Venn diagram and the passage area map, and select initial key points from the set of central axis segments; wherein, the initial key points are vertices in the set of central axis segments that have more than two connecting line segments;
[0127] The line segment set generation module is used to traverse all the initial key points, establish the connection relationship between each pair of initial key points through the central axis, and obtain a simplified central axis segment set.
[0128] The key point adjustment module is used to adjust the initial key points according to the tangent relationship between all the initial key points and the boundary line to obtain the target key points;
[0129] The road network map generation module is used to adjust the simplified centerline segment set according to the target key points to obtain the target road network map.
[0130] Preferably, the key point selection module includes:
[0131] A line segment splitting unit is used to split the boundary line of the access area map into a set of discrete line segments consisting of two points;
[0132] A sampling unit is used to uniformly sample each line segment in the line segment set according to a preset sampling density to obtain sampling points;
[0133] A Veno diagram construction unit is used to construct a Veno diagram based on the sampling points; wherein the Veno diagram comprises a continuous polygon composed of perpendicular bisectors of lines connecting two adjacent points;
[0134] A polygon selection unit is used to select a target polygon from all the continuous polygons; wherein the target polygon is a polygon among the continuous polygons whose area is greater than a preset area threshold;
[0135] The line segment set construction unit is used to traverse all line segments in the target polygon and construct the central axis line segment set based on the line segments whose vertices do not coincide with the sampling points.
[0136] It should be noted that the key-point-based central axis road network generation device provided in this embodiment of the invention is used to execute all the process steps of the key-point-based central axis road network generation method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0137] This invention also provides a terminal device. The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a key-point-based central axis road network generation program. When the processor executes the computer program, it implements the steps in the various key-point-based central axis road network generation method embodiments described above, for example... Figure 1 The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the road network map generation module.
[0138] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0139] The terminal device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of terminal devices and do not constitute a limitation on the terminal device. It may include more or fewer components than described above, or a combination of certain components, or different components. For example, the terminal device may also include input / output devices, network access devices, buses, etc.
[0140] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0141] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0142] Wherein, if the modules / units integrated in the terminal device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. Wherein, the computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0143] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0144] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for generating a central axis road network based on key points, characterized in that, include: Obtain base map data containing expanding obstacles, and perform differential processing on the base map data to obtain a passable area map; A set of central axis segments is constructed based on the Veno diagram and the access area diagram, and initial key points are selected from the set of central axis segments; wherein, the initial key points are vertices in the set of central axis segments that have more than two connecting line segments; By traversing all the initial key points, and establishing the connection relationship between each pair of initial key points through the central axis, a simplified set of central axis segments is obtained. Based on the tangency relationship between all the initial key points and the boundary lines, the initial key points are adjusted to obtain the target key points; when the difference between the pairwise perpendicular distances between any initial key point and two or more boundary lines or boundary points is less than the sampling density, it is determined that the initial key point is tangent to the boundary line or boundary point. The simplified centerline segment set is adjusted based on the target key points to obtain the target road network map; The step of adjusting the initial key points based on the tangent relationship between all the initial key points and the boundary lines to obtain the target key points includes: When any of the initial key points is tangent to two boundary lines, the initial key point is translated to the midpoint of the two tangent points to obtain the target key point; When any of the initial key points is tangent to three boundary lines and intersects two of them, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the vertex of the other boundary line to obtain the target key point. When any of the initial key points is tangent to the three boundary lines and the three boundary lines do not intersect, extend two boundary lines in the same direction until they intersect with the other boundary line, select the shortest of the two extended lines, and translate the initial key point to half the distance of the shortest extended line to obtain the target key point; When any of the initial key points is tangent to two boundary lines and one boundary point, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the boundary point to obtain the target key point; When any of the initial key points is tangent to a boundary line and two boundary points, extend the two boundary points to intersect the boundary line, select the shortest of the two extension lines, and translate the initial key point to half the distance of the shortest extension line to obtain the target key point.
2. The method for generating a central axis road network based on key points according to claim 1, characterized in that, The construction of the central axis segment set based on the Vinio map and the passage area map includes: The boundary line of the access area map is split into a set of discrete line segments consisting of two points; Sampling points are obtained by uniformly sampling each line segment in the line segment set according to a preset sampling density; A Veno diagram is constructed based on the sampling points; wherein the Veno diagram comprises a continuous polygon consisting of the perpendicular bisectors of the lines connecting two adjacent points; Select a target polygon from all the continuous polygons; wherein the target polygon is the polygon in which the continuous polygon overlaps with the passable area and the area is greater than a preset area threshold. Traverse all line segments in the target polygon and construct a set of central axis segments based on the line segments whose vertices do not coincide with the sampling points.
3. The method for generating a central axis road network based on key points according to claim 2, characterized in that, After establishing the connection relationship between each pair of initial key points through the central axis, the method further includes: Select any initial key point from the connection relationships, and use the points that do not coincide with the initial key point as the current index points; Determine whether the distance from all points between the initial keypoint and the current index point to the line connecting the initial keypoint and the current index point is less than the sampling density; if yes, update the current index point to the next index point of the current index point; if no, record the previous index point of the current index point as a new keypoint, and update the initial keypoint to the new keypoint; The connection relationship is simplified based on the initial key points and the newly added key points to obtain a simplified set of central axis segments.
4. The method for generating a central axis road network based on key points according to claim 1, characterized in that, After obtaining the target road network map, the method further includes: When the distance between all target key points in the selected area and the boundary line is greater than a preset distance threshold, and all the target key points are connected to each other, all the target key points are merged into a whole key point. The connection relationships are reconstructed based on the overall key points to optimize the target road network map.
5. The method for generating a central axis road network based on key points according to claim 1, characterized in that, After obtaining the target road network map, the method further includes: When there is a corner relationship in the connection relationship, the projected distance of the corner is determined; wherein, the projected distance is the distance from the midpoint of the corner to the straight line connecting the two sides; When the projection distance is less than a preset projection threshold, the corner relationship is converted into a straight line connection to optimize the target road network map.
6. A central axis road network generation device based on key points, characterized in that, include: The data processing module is used to acquire base map data containing expanding obstacles and perform differential processing on the base map data to obtain a passable area map; The key point selection module is used to construct a set of central axis segments based on the Venn diagram and the passage area map, and select initial key points from the set of central axis segments; wherein, the initial key points are vertices in the set of central axis segments that have more than two connecting line segments; The line segment set generation module is used to traverse all the initial key points, establish the connection relationship between each pair of initial key points through the central axis, and obtain a simplified central axis segment set. The key point adjustment module is used to adjust the initial key points according to the tangency relationship between all the initial key points and the boundary lines to obtain the target key points; when the difference between the pairwise perpendicular distances between any initial key point and two or more boundary lines or boundary points is less than the sampling density, it is determined that the initial key point is tangent to the boundary line or boundary point. The road network map generation module is used to adjust the simplified centerline segment set according to the target key points to obtain the target road network map; The key point adjustment module is specifically used for: The step of adjusting the initial key points based on the tangent relationship between all the initial key points and the boundary lines to obtain the target key points includes: When any of the initial key points is tangent to two boundary lines, the initial key point is translated to the midpoint of the two tangent points to obtain the target key point; When any of the initial key points is tangent to three boundary lines and intersects two of them, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the vertex of the other boundary line to obtain the target key point. When any of the initial key points is tangent to the three boundary lines and the three boundary lines do not intersect, extend two boundary lines in the same direction until they intersect with the other boundary line, select the shortest of the two extended lines, and translate the initial key point to half the distance of the shortest extended line to obtain the target key point; When any of the initial key points is tangent to two boundary lines and one boundary point, the initial key point is translated to the midpoint between the intersection of the two boundary lines and the boundary point to obtain the target key point; When any of the initial key points is tangent to a boundary line and two boundary points, extend the two boundary points to intersect the boundary line, select the shortest of the two extension lines, and translate the initial key point to half the distance of the shortest extension line to obtain the target key point.
7. The key-point-based central axis road network generation device according to claim 6, characterized in that, The key point selection module includes: A line segment splitting unit is used to split the boundary line of the access area map into a set of discrete line segments consisting of two points; A sampling unit is used to uniformly sample each line segment in the line segment set according to a preset sampling density to obtain sampling points; A Veno diagram construction unit is used to construct a Veno diagram based on the sampling points; wherein the Veno diagram comprises a continuous polygon composed of perpendicular bisectors of lines connecting two adjacent points; A polygon selection unit is used to select a target polygon from all the continuous polygons; wherein the target polygon is a polygon among the continuous polygons whose area is greater than a preset area threshold; The line segment set construction unit is used to traverse all line segments in the target polygon and construct the central axis line segment set based on the line segments whose vertices do not coincide with the sampling points.
8. A terminal device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the key-point-based central axis road network generation method as described in any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the central axis road network generation method based on any one of claims 1 to 5.
Citation Information
Patent Citations
Region division method and device for indoor scenes
CN113536837A
Road network generation method and system, terminal equipment and storage medium
CN114387368A