Methods, apparatus, equipment, and storage media for extracting road centerlines
By constructing a road model based on trajectory features, pruning and building road contours, and extracting the set of road center points, the problem of calculating road centerlines in linkless scenarios is solved, achieving more accurate and efficient road centerline extraction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-19
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies struggle to effectively calculate road centerlines in scenarios without links, and traditional methods that rely on road (link) processing have limitations.
A first road model is constructed based on trajectory features. By pruning and constructing a second road model, the road outline is extracted and the set of road center points is finally obtained. This method is suitable for calculating the road centerline in scenarios without links.
It achieves accurate road centerline extraction in linkless scenarios, and can be applied to linked scenarios, improving the accuracy and efficiency of centerline calculation.
Smart Images

Figure CN114419595B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to the fields of cloud computing and spatiotemporal big data. Background Technology
[0002] Road centerline calculation methods generally rely on links. First, the link needs to be equidistant to obtain multiple vertical cross-sections. Then, the intersection points of the trajectory with each cross-section are calculated, and a series of center points are calculated by clustering these intersection points, serving as the road centerline of the link. This method, due to its over-reliance on links, is not suitable for calculating road centerlines in scenarios without links, such as new roads. Summary of the Invention
[0003] This disclosure provides a method, apparatus, device, and storage medium for extracting road centerlines.
[0004] According to one aspect of this disclosure, a method for extracting road centerlines is provided, comprising:
[0005] Based on trajectory features, a first road model is constructed;
[0006] Based on the first road model, extract the road outline;
[0007] Based on the road outline, construct a second road model;
[0008] Based on the second road model, extract the set of road center points;
[0009] The road centerline includes the set of road center points.
[0010] According to another aspect of this disclosure, a road centerline extraction device is provided, comprising:
[0011] The first building module is used to construct the first road model based on trajectory features;
[0012] The first extraction module is used to extract road contours based on the first road model;
[0013] The second building module is used to construct a second road model based on the road outline;
[0014] The second extraction module is used to extract the set of road center points based on the second road model;
[0015] The road centerline includes the set of road center points.
[0016] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0017] At least one processor; and
[0018] The memory is communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods of any embodiment of the present disclosure.
[0020] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform a method according to any embodiment of this disclosure.
[0021] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements a method according to any embodiment of this disclosure.
[0022] This scheme extracts the road contour based on a first road model constructed from trajectory features, and then extracts the set of road center points based on a second road model constructed from the road contour, thus obtaining an accurate road centerline.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0024] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0025] Figure 1 This is a schematic flowchart of a road centerline extraction method according to an embodiment of the present disclosure;
[0026] Figure 2 This is a schematic flowchart of a road centerline extraction method according to another embodiment of the present disclosure;
[0027] Figure 3A This is a schematic flowchart of a road centerline extraction method according to another embodiment of the present disclosure;
[0028] Figure 3B This is a schematic diagram of triangle information according to another embodiment of the present disclosure;
[0029] Figure 4A This is a schematic flowchart of a road centerline extraction method according to another embodiment of the present disclosure;
[0030] Figure 4B This is a schematic diagram of triangle classification and center point according to another embodiment of the present disclosure;
[0031] Figure 5This is a schematic diagram of a road centerline extraction device according to an embodiment of the present disclosure;
[0032] Figure 6 This is a schematic diagram of a road centerline extraction device according to another embodiment of the present disclosure;
[0033] Figure 7 This is a schematic diagram of the structure of a road centerline extraction device according to another embodiment of the present disclosure;
[0034] Figure 8 This is a schematic diagram of a road centerline extraction device according to another embodiment of the present disclosure;
[0035] Figure 9 This is a schematic diagram of the first constructed triangular mesh model;
[0036] Figure 10 This is a schematic diagram of the road outline after pruning the triangular mesh model;
[0037] Figure 11 It is a directed road graph obtained by transforming the road outline;
[0038] Figure 12 It is a road optimization diagram after pruning a directed graph;
[0039] Figure 13 It is the largest connected subgraph obtained by drawing the roads;
[0040] Figure 14 This is a schematic diagram of the triangular network model constructed for the second time based on the maximum connected subgraph;
[0041] Figure 15 This is a schematic diagram of extracting the road center points from the second constructed triangular network model;
[0042] Figure 16 This is a schematic diagram of the road centerline formed by the extracted road center points;
[0043] Figure 17 This is a schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure. Detailed Implementation
[0044] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0045] Figure 1This is a schematic flowchart of a road centerline extraction method according to an embodiment of the present disclosure. The method may include:
[0046] S101. Construct the first road model based on trajectory features;
[0047] S102. Based on the first road model, extract the road outline;
[0048] S103. Based on the road outline, construct a second road model;
[0049] S104. Based on the second road model, extract the set of road center points;
[0050] The road centerline includes the set of road center points.
[0051] In this embodiment of the disclosure, vehicles and other vehicles generate motion trajectories as they move on roads. These trajectories can be obtained through maps, road traffic management platforms, and the like. If it is necessary to extract the road centerline of a certain area, vehicle trajectories within that area over a period of time can be collected. These collected vehicle trajectories can be clustered to group trajectories that are relatively close in location, and this group of trajectories can be used as the data set for subsequent extraction of the road centerline.
[0052] In this embodiment, trajectory features are extracted from N movement trajectories of a vehicle, where N is the number of trajectories to be processed, for example, the number of trajectories corresponding to a certain road is N. Then, a first road model is established based on the trajectory features. The first road model may include a triangular mesh model. This triangular mesh model may include a set of triangles, which may include several triangles. The position of each vertex of a triangle can be determined based on the position of a trajectory point. The triangular mesh model can be displayed as the overall system architecture including these triangles. A road contour can be extracted from the first road model to prepare for extracting the road centerline. The road contour can also be called a road topology or a road topology model, etc. The road contour may include multiple extracted vertices (trajectory points), and a second road model can be constructed based on these multiple vertices. For example, the second road model may also be a triangular mesh model. The number of triangles included in the second road model can be significantly reduced compared to the number of triangles included in the first road model. Based on the second road model and constraint rules, the road center point can be calculated, thereby obtaining a set of road center points and completing the extraction of the road centerline.
[0053] In this embodiment, a first road model constructed based on trajectory features is used to extract the road outline, and a second road model constructed based on the road outline is used to extract the set of road center points, thus obtaining an accurate road centerline. Therefore, it can be applied to extracting the centerline of unlabeled roads. For example, it is suitable for calculating the road centerline in scenarios without links. For scenarios with links, the road centerline extraction method of this disclosure can also be used to extract the road centerline based on trajectory features. Furthermore, the road centerline extracted based on trajectory features can be compared or fused with the road centerline extracted based on road links to obtain a more accurate road centerline.
[0054] Figure 2 This is a flowchart illustrating a road centerline extraction method according to another embodiment of the present disclosure. This embodiment includes one or more features of the road centerline extraction method embodiment described above. In one possible implementation, the method further includes:
[0055] S201. Preprocess the trajectory to be processed;
[0056] S202. Perform feature processing on the preprocessed trajectory to obtain trajectory features.
[0057] In this embodiment, preprocessing can filter out abnormal trajectories from the trajectory to be processed, resulting in a high-quality trajectory suitable for identifying the road centerline. Feature processing allows a series of trajectory points to be stitched together into a trajectory line for subsequent processing. The resulting trajectory features after feature processing can include a matrix or a multidimensional array. For example, in a matrix, rows can represent trajectory points of a trajectory, and columns can represent various attributes of each trajectory point. The meaning of the elements in the matrix can also be changed; for instance, rows can represent various attributes of each trajectory point, and columns can represent the trajectory points of a trajectory. Generally, the more estimations involved in feature processing, the richer the trajectory features, and the more accurate the subsequently obtained road centerline will be.
[0058] In one possible implementation, the preprocessing includes:
[0059] Filter out at least one of the following conditions from the trajectory to be processed: trajectory points with abnormal latitude and longitude coordinates, trajectory points with abnormal vehicle speed, trajectory lines with missing trajectory points, trajectory lines that are too short, and trajectory points with abnormal attributes.
[0060] In this embodiment, the original crowdsourced trajectory can be referred to as the trajectory to be processed. The original crowdsourced trajectory may include vehicle trajectories obtained from various sources such as maps and traffic management platforms. The original crowdsourced trajectory may suffer from problems such as GPS signal drift, noise interference, and sparse sampling intervals. Preprocessing can filter out trajectory points with abnormal latitude and longitude coordinates, trajectory points with abnormal vehicle speeds, trajectory lines with missing trajectory points, excessively short trajectory lines, and trajectory points with abnormal attributes, thereby obtaining a higher quality trajectory, which is beneficial for discovering a more accurate road centerline.
[0061] For example, if the latitude and longitude of some trajectory points on a certain trajectory exceed the normal range of latitude and longitude values, such as being negative, having excessively large values, or having incorrect latitude and longitude coordinate formats, these trajectory points can be considered to have abnormal latitude and longitude.
[0062] For example, if the vehicle speed at certain points on a certain trajectory is much greater than the normal speed or is negative, it can be considered that the vehicle speed at these points is abnormal.
[0063] For example, if the distance between points on a certain trajectory exceeds a threshold, the trajectory can be grouped to obtain multiple shorter trajectories. Trajectory lines with a significant loss of points can also be filtered out.
[0064] For example, if the length of a certain motion trajectory is less than a set threshold, the trajectory can be considered too short.
[0065] For example, if some trajectory point attributes of a certain motion trajectory are inconsistent or missing, it may be impossible to accurately calculate the vehicle speed, trajectory point motion angle, etc., and these trajectory point attributes can be considered abnormal.
[0066] After preprocessing and feature processing, the obtained trajectory features can be used to execute S101.
[0067] Figure 3A This is a flowchart illustrating a road centerline extraction method according to another embodiment of the present disclosure. This embodiment includes one or more features of the road centerline extraction method embodiment described above. In one possible implementation, S101 constructs a first road model based on trajectory features, including:
[0068] S301. Based on each trajectory point in the trajectory features, construct a first triangular network model, where each vertex of the triangle in the first triangular network model corresponds to each of the trajectory points.
[0069] In this embodiment, the first triangulation model can be, for example, a Delaunay triangulation model. Delaunay triangulation models are widely used in image processing, pattern recognition, and other fields. They enable the establishment of effective topological relationships in datasets and the extraction of features such as the centerline. The first triangulation model can be represented as the overall system architecture of the triangles it comprises. This embodiment constructs a first triangulation model based on each trajectory point in the trajectory features. The vertices of the triangles in the first triangulation model correspond to trajectory points; therefore, the spatial distribution of the road can be reflected by the trajectory of vehicles traveling on the road, preparing for subsequent extraction of the road outline and road center point.
[0070] In one possible implementation, S102 extracts the road contour based on the first road model, including:
[0071] S302. Based on the motion angle of the vertices in the first triangular mesh model, the edges in the first triangular mesh model are pruned to obtain the first contour of the road.
[0072] In this embodiment, the first triangular mesh model includes a large number of triangles. By pruning, unnecessary edges in the overall architecture of the first triangular mesh model can be reduced, resulting in the overall contour of the road and reducing the amount of data required for subsequent extraction of the road center point. For example, the edges of the triangles in the first triangular mesh model can be divided into outer contour edges and inner contour edges of the road. Removing the outer contour edges of the road yields the overall contour of the road, i.e., the first contour.
[0073] In one possible implementation, each edge of each triangle in the first triangulation model is recorded in the first data set.
[0074] In one possible implementation, S302, based on the motion angles of the vertices in the first triangular mesh model, pruning the edges in the first triangular mesh model includes:
[0075] If the motion angles of the two vertices of the edge to be processed are less than the first threshold, the angle of the edge to be processed is set to the average of the motion angles of the two vertices.
[0076] If the movement angle of the two vertices of the edge to be processed is greater than or equal to the first threshold, the angle of the edge to be processed is set to the first value.
[0077] Remove the edges in the first data set whose angle value is the first value.
[0078] In the disclosed embodiments, the first triangulation model includes multiple triangles, and one or more types of information such as the vertices, edges, and mapping relationships of each triangle can be recorded in the first data set. For example, such as... Figure 3B As shown, triangle A includes vertices D1, D2, and D3, and edges L11 (determined by D1 and D2), L12 (determined by D1 and D3), and L13 (determined by D2 and D3). Triangle B includes vertices D2, D3, and D4, and edges L13 (determined by D2 and D3), L21 (determined by D2 and D4), and L22 (determined by D3 and D4). Therefore, vertex D1 belongs to triangle A, vertices D2 and D3 belong to triangles A and B, and vertex D4 belongs to triangle B. Edges L11 and L12 belong to triangle A, and edge L13 belongs to triangles A and B.
[0079] In the disclosed embodiment, the vertices of the first triangular mesh model correspond to trajectory points. Two vertices of a triangle form an edge. The two vertices of an edge can also be called the two endpoints of the edge. The motion angle of a vertex is also the motion angle of the trajectory point corresponding to that vertex. The trajectory features may include the motion angle of the trajectory point. The motion angle can sometimes also be called the motion direction. An angle threshold, i.e., a first threshold, can be preset. If the motion angles of the two vertices of an edge differ significantly, for example, if the motion angles of both vertices exceed the first threshold, it may indicate that the edge is abnormal. Specifically, if the motion angles of both vertices of an edge exceed the first threshold, the angle of the edge is set to a first value. The first value can be, for example, 0, 1, or 360, values that are not commonly seen for motion angles. If the motion angles of both vertices of an edge do not exceed the first threshold, the angle of the edge can be set to the average of the motion angles of the two vertices, or it can be set to the motion angle of either of the two vertices, or the angle of the edge can be kept unchanged (e.g., with a default value). Then, the abnormal edge can be removed. For example, the edge with the angle value of the first value can be deleted from the first data set.
[0080] In the disclosed embodiments, edges with significantly different vertex motion angles can be removed from the first data set, thereby retaining edges that better conform to the motion patterns, obtaining the overall outline of the road, and reducing the amount of data that needs to be processed to extract the road center point in the subsequent process.
[0081] In one possible implementation, S102, based on the first road model, extracts the road contour and further includes:
[0082] S303. Based on the out-degree and / or in-degree of the vertices in the first contour, prune the edges in the first contour to obtain the second contour of the road. For example, a road can be composed of road segments, each of which generally includes straight line segments. The remaining edges in the first contour can be considered as the straight line segments corresponding to the road segments. Vehicle trajectories generally follow the endpoints of straight line segments to enter or exit. For a vertex D1, if n edges point to vertex D1, it means that vertex D1 has n in-degrees; if m edges point from vertex D1 to other vertices, it means that vertex D1 has m out-degrees. If the out-degree, in-degree, or sum of out-degree and in-degree of a vertex is too large, it indicates that some edges of that vertex may be abnormal. Abnormal edges can be removed. For example, from some edges of vertices in the first data set whose out-degree, in-degree, or sum of out-degree and in-degree is too large, prune the edges in the first contour to obtain the second contour. In this way, some edges of vertices with abnormal in-degree can be removed from the first dataset, thus retaining edges that better conform to the in-degree rule, obtaining the overall outline of the road, and reducing the amount of data that needs to be processed to extract the road center point in the later stage.
[0083] In one possible implementation, S303 prunes the edges in the first contour based on the out-degree and / or in-degree of the vertices in the first contour to obtain a second contour of the road, including:
[0084] A directed graph is generated based on each vertex included in the first contour;
[0085] Redundant edges are removed from the directed graph based on the out-degree and / or in-degree of each vertex.
[0086] In the disclosed embodiment, each vertex of the first contour corresponds to a trajectory point, and a directed graph can be generated based on the position, motion angle, etc., of these trajectory points. The directed graph can include vertices, edges, and edge directions. Based on the directions of each vertex and edge, the out-degree and / or in-degree of each vertex can be obtained. Based on the out-degree and / or in-degree of each vertex, it is determined which edges need to be retained; those that do not need to be retained can be set as redundant edges. Redundant edges can be removed from the directed graph. For example, after deleting edges with angle values of the first value from the first data set, redundant edges can continue to be deleted. The directed graph can be used to further prune the internal edges of the road, i.e., the edges within the contour, removing redundant edges and optimizing the internal edges.
[0087] In one possible implementation, redundant edges are removed from the directed graph based on the out-degree and / or in-degree of each vertex, including:
[0088] If the sum of the out-degree and in-degree of the vertex to be processed is greater than the second threshold, obtain the set of out-degree edges S1 and the set of in-degree edges S2 corresponding to the vertex to be processed.
[0089] The out-degree edge set S1 and the in-degree edge set S2 are arranged and combined to obtain a set of pairs of out-degree edges and in-degree edges {(s1,s2)|s1∈S1,s2∈S2}.
[0090] Calculate the angle difference between each pair of out-degree and in-degree edges (s1, s2) in the set of paired out-degree and in-degree edges;
[0091] The pair of out-degree edges and in-degree edges with the smallest angle difference are retained, and the other edges in the out-degree edge set S1 and the in-degree edge set S2, excluding the retained edges, are set as redundant edges.
[0092] Remove redundant edges from the directed graph.
[0093] In one possible implementation, redundant edges are removed from the directed graph based on the out-degree and / or in-degree of each vertex, including:
[0094] If the sum of the out-degree and in-degree of the vertex to be processed is less than or equal to the second threshold, no processing is required, and the edge determined by that vertex is retained.
[0095] For example, if the second threshold is equal to 2, and the sum of the out-degree and in-degree of a vertex is less than or equal to the second threshold, it means that the vertex may have only one out-degree edge and one in-degree edge, which conforms to the out-degree and in-degree rules of vehicle movement, and the two edges of this vertex can be retained.
[0096] For example, if the sum of the out-degree and in-degree of a vertex is greater than the second threshold, it indicates that the out-degree and in-degree are too large, and some edges can be retained while others are deleted. Specifically, vertex D2 has an out-degree of 2 and an in-degree of 3, and the sum of its out-degree and in-degree is 5, which is greater than the second threshold of 2. We can obtain the out-degree edge set S1 and the in-degree edge set S2 corresponding to vertex D2. Edges in S1 can be represented as s1, and edges in S2 can be represented as s2. We can then combine each edge s1 in the out-degree edge set S1 and each edge s2 in the in-degree edge set S2 to obtain a set of pairs of out-degree and in-degree edges (s1, s2). If edge s1 in S1 includes s11 and s12, and edge s2 in S2 includes s21, s22 and s23, then the set of pairs of out-degree edges and in-degree edges obtained by permutation and combination includes {(s11,s21),(s11,s22),(s11,s23),(s12,s21),(s12,s22),(s12,s23)}.
[0097] Then, the angle (also called the direction difference) between each pair of out-degree and in-degree edges in the set can be calculated. The pair of out-degree and in-degree edges with the smallest angle difference is retained. For example, (s11, s21) has the smallest angle difference, so s11 and s21 are retained. Other edges in the out-degree edge set S1 and the in-degree edge set S2, excluding the retained edges, such as s12, s22, and s23, are designated as redundant edges. Then, redundant edges s12, s22, and s23 can be removed from the directed graph. Specifically, for example, after deleting the edge with the first angle value from the first data set, redundant edges s12, s22, and s23 are then removed. By using a directed graph, edges with large angle differences between their out-degree and in-degree edges can be designated as redundant edges. Removing redundant edges optimizes internal edges, reduces unnecessary data in subsequent processing, and improves processing speed and efficiency.
[0098] In one possible implementation, S102, based on the first road model, extracts the road contour and further includes:
[0099] S304. Convert the directed graph with redundant edges removed into an undirected graph;
[0100] S305. Calculate the maximum connected subgraph of the undirected graph;
[0101] S306. Remove the edges that are not in the maximum connected subgraph to obtain the road outline map.
[0102] In this embodiment, the directed graph after removing redundant edges can be a second contour. The vertices of the second contour correspond to trajectory points in the trajectory features. Converting the directed graph to an undirected graph is equivalent to obtaining an undirected graph corresponding to the vertices and edges of the second contour. Then, the maximum connected subgraph can be calculated using the vertices in the undirected graph, which reflects the outer contour of the road. Then, from the first data set after deleting edges with angle values of the first value and redundant edges, edges not in the maximum connected subgraph are deleted. In this way, a road contour map that accurately reflects the outer contour of the road can be retained, further reducing unnecessary data in subsequent processing and improving processing speed and efficiency.
[0103] Figure 4A This is a flowchart illustrating a road centerline extraction method according to another embodiment of the present disclosure. This embodiment includes one or more features of the road centerline extraction method embodiment described above. In one possible implementation, step S103, based on the road contour, constructs a second road model and further includes:
[0104] S401. Based on the road outline map, construct a second triangular network model.
[0105] In this embodiment, the second triangulation model can be a Delaunay triangulation model. It can be a Delaunay triangulation model based on all vertices in the road contour map. The second triangulation model can include multiple triangles. Each triangle includes information such as vertices and edges. The second triangulation model constructed from the road contour map can prepare for extracting the road center point.
[0106] In one possible implementation, the mapping relationship between each edge of each triangle in the second triangulation model and its corresponding triangle is recorded in a second data set. The second data set may include the edges of each triangle in the Delaunay triangulation model constructed based on the road contour, and the mapping relationship between each edge and the triangle. An edge may belong to one triangle or multiple triangles.
[0107] In one possible implementation, S104 extracts a set of road center points based on the second road model, including:
[0108] S402. Calculate the number of triangles adjacent to each triangle at different locations on the road based on the second data set to obtain a first type of triangle and a second type of triangle; wherein the first type of triangle is adjacent to one triangle and the second type of triangle is adjacent to two triangles.
[0109] In this embodiment, the first type of triangle is adjacent to another triangle and is generally located at the beginning or end of the road. The second type of triangle is adjacent to two triangles and is generally located on the main road. Dividing the road outline into different types of triangles can distinguish the location of the road, such as the beginning, main road, and end, thereby more accurately extracting the center point of the road at each location.
[0110] In one possible implementation, S103, based on the second road model, extracts a set of road center points, and further includes:
[0111] S403. Extract the midpoints of the two long sides of a first type of triangle, and take the midpoint of the first long side as the start or end point of the road centerline. The first long side is one side of the non-adjacent triangle of the first type of triangle.
[0112] In one possible implementation, S103, based on the second road model, extracts a set of road center points, and further includes:
[0113] S404. Record the start point or end point in the point set C, and record the edge corresponding to the start point or end point in the edge set L.
[0114] In this embodiment of the disclosure, one side of each of the two long sides of the first type of triangle has no adjacent triangle, while the adjacent triangle on the other side is a second type of triangle. The third side of the first type of triangle is located at the road edge. In the first type of triangle, the side without adjacent triangles may represent the start or end position of the road. By extracting the midpoint of the side without adjacent triangles on the two long sides of the first type of triangle, the start or end point of the road centerline can be quickly and accurately determined. The determined road center points can be stored in a point set C. For example, each point determined to be on the road centerline is stored in point set C. Furthermore, processed edges can be stored in an edge set L. For example, as... Figure 4B As shown, in the second data set, triangle T1 is a first-class triangle. One of T1's longer sides, L1, has no adjacent triangles, while the other longer side, L2, has adjacent triangles. The midpoint C1 of L1 is recorded as either the start or end point of the road centerline in the point set C. Furthermore, L1 is recorded in the edge set L.
[0115] In one possible implementation, S103, based on the second road model, extracts a set of road center points, and further includes:
[0116] S405. Obtaining the midpoint of the long side of an adjacent triangle includes: obtaining the adjacent triangle of the second long side of the previously processed triangle according to the mapping relationship in the second data set, wherein the second long side is the unprocessed long side of the previously processed triangle; recording the midpoint of the second long side of the two long sides of the adjacent triangle that is not in the side set L into the point set C, and recording the second long side into the side set L.
[0117] For example, such as Figure 4B As shown, in the second data set, triangle T1 is a first-type triangle, and T1 is adjacent to a second-type triangle T2. One long side L1 of T1 belongs only to T1, and the other long side L2 belongs to both T1 and T2. Therefore, L1 corresponds to T1, and L2 corresponds to both T1 and T2. If the triangle processed last time was T1, then this time we can obtain the adjacent triangle T2 of T1 based on its other long side L2. The two long sides of T2 are L2 and L3, neither of which are in the edge set L. The midpoint C2 of L2 is recorded in the point set C. L2 is recorded in the edge set L.
[0118] For example, such as Figure 4BAs shown, continuing from the previous example, we proceed with step S405. In this process, the triangle processed last time is T2, and the second longest side of T2 is L3. Based on L3, we can obtain the adjacent triangle T3. The two longest sides of T2 are L3 and L4. We record the midpoint C3 of L3 in the point set C and L3 in the edge set L. Furthermore, the adjacent triangle obtained based on L3 could also be T2. Since edge L2 of T2 is already in the edge set L, we do not process L2 again.
[0119] S406. Repeat step S405 of obtaining the midpoint of the long side of an adjacent triangle until another triangle of the first type is obtained. Extract the midpoint of the two long sides of the other triangle of the first type, and take the midpoint of the side of the two long sides without an adjacent triangle as the end point or start point of the road centerline. Record the end point or start point in the point set C. The point set C is the set of center points of the road centerline. In this embodiment, if S403 extracts the start point of the road centerline, S406 extracts the end point of the road centerline. For example, if S403 extracts the end point of the road centerline, S406 extracts the start point of the road centerline. Figure 4B As shown, triangle T4 is a first-class triangle. The midpoint C5 of one side of the non-adjacent triangle of T4 is taken as the end point or start point of the road centerline and recorded in the point set C.
[0120] In this embodiment of the disclosure, after the centerline of a road is extracted, the set of points C is used as the set of center points of the road centerline. For example, detecting a first type of triangle again indicates that the extraction of the road centerline is about to be completed. After updating the set of points C based on the first type of triangle, the set of points C is used as the set of center points of the road centerline. For example, the set of points C includes the midpoints {C1, C2, C3, C4, C5} of the edges of T1, T2, T3, and T4.
[0121] In this embodiment of the disclosure, by extracting the midpoint of one side of the non-adjacent triangle of the two long sides of the second type of triangle, the road midpoint on the main road can be determined quickly and accurately. Furthermore, if the first type of triangle is detected again, the detection of the other endpoint of the road centerline can be completed, thus obtaining the complete road centerpoint included by the road centerline.
[0122] Figure 5 This is a schematic diagram of a road centerline extraction device according to an embodiment of the present disclosure. The device may include:
[0123] The first construction module 501 is used to construct the first road model based on trajectory features;
[0124] The first extraction module 502 is used to extract the road outline based on the first road model;
[0125] The second construction module 503 is used to construct a second road model based on the road outline;
[0126] The second extraction module 504 is used to extract a set of road center points based on the second road model;
[0127] The road centerline includes the set of road center points.
[0128] Figure 6 This is a schematic diagram of a road centerline extraction device according to another embodiment of the present disclosure. This embodiment includes one or more features of the road centerline extraction device embodiment described above. In one possible implementation, the device further includes:
[0129] Preprocessing module 601 is used to preprocess the trajectory to be processed;
[0130] The featureization module 602 is used to perform featureization on the preprocessed trajectory to obtain the trajectory features.
[0131] In one possible implementation, the preprocessing module 601 is used to filter out at least one of the following conditions from the trajectory to be processed: trajectory points with abnormal latitude and longitude coordinates, trajectory points with abnormal vehicle speeds, trajectory lines with missing trajectory points, trajectory lines that are too short, and trajectory points with abnormal attributes.
[0132] Figure 7 This is a schematic diagram of a road centerline extraction device according to another embodiment of the present disclosure. The device of this embodiment includes one or more features of the road centerline extraction device embodiment described above. In one possible implementation, the first construction module 501 is used to construct a first triangular mesh model based on each trajectory point in the trajectory features, wherein each vertex of the triangle in the first triangular mesh model corresponds to each of the trajectory points.
[0133] In one possible implementation, the first extraction module 502 includes:
[0134] The first pruning submodule 701 is used to prune the edges in the first triangular mesh model according to the motion angle of the vertices in the first triangular mesh model to obtain the first contour of the road.
[0135] In one possible implementation, each edge of each triangle in the first triangulation model is recorded in the first data set.
[0136] In one possible implementation, the first pruning submodule includes:
[0137] If the motion angles of the two vertices of the edge to be processed are less than the first threshold, the angle of the edge to be processed is set to the average of the motion angles of the two vertices.
[0138] If the movement angle of the two vertices of the edge to be processed is greater than or equal to the first threshold, the angle of the edge to be processed is set to the first value.
[0139] Remove the edges in the first data set whose angle value is the first value.
[0140] In one possible implementation, the first extraction module 502 further includes:
[0141] The second pruning submodule 702 is used to prune the edges in the first contour according to the out-degree and / or in-degree of the vertices in the first contour to obtain the second contour of the road.
[0142] In one possible implementation, the second pruning submodule 702 is used for:
[0143] A directed graph is generated based on each vertex included in the first contour;
[0144] Redundant edges are removed from the directed graph based on the out-degree and / or in-degree of each vertex.
[0145] In one possible implementation, the second pruning submodule 702 is configured to remove redundant edges from the directed graph based on the out-degree and / or in-degree of each vertex, including:
[0146] If the sum of the out-degree and in-degree of the vertex to be processed is greater than the second threshold, obtain the set of out-degree edges S1 and the set of in-degree edges S2 corresponding to the vertex to be processed.
[0147] The out-degree edge set S1 and the in-degree edge set S2 are arranged and combined to obtain a set of pairs of out-degree edges and in-degree edges {(s1,s2)|s1∈S1,s2∈S2}.
[0148] Calculate the angle difference between each pair of out-degree and in-degree edges (s1, s2) in the set of paired out-degree and in-degree edges;
[0149] The pair of out-degree edges and in-degree edges with the smallest angle difference are retained, and the other edges in the out-degree edge set S1 and the in-degree edge set S2, excluding the retained edges, are set as redundant edges.
[0150] Remove redundant edges from the directed graph.
[0151] In one possible implementation, the first extraction module 502 further includes:
[0152] The transformation submodule 703 is used to transform a directed graph with redundant edges removed into an undirected graph;
[0153] Connectivity submodule 704 is used to calculate the maximum connected subgraph of the undirected graph;
[0154] Edge removal submodule 705 is used to remove edges that are not in the maximum connected subgraph to obtain the road outline map.
[0155] Figure 8 This is a schematic diagram of a road centerline extraction device according to another embodiment of the present disclosure. This embodiment includes one or more features of the road centerline extraction device embodiment described above. In one possible implementation, the second building module is further configured to construct a second triangular mesh model based on the road outline map.
[0156] In one possible implementation, the mapping relationship between each edge of each triangle in the second triangulation model and its corresponding triangle is recorded in a second data set.
[0157] In one possible implementation, the second extraction module 504 includes:
[0158] The classification submodule 801 is used to calculate the number of triangles adjacent to a triangle at different locations on the road based on the second data set, to obtain a first type of triangle and a second type of triangle; wherein the first type of triangle is adjacent to one triangle and the second type of triangle is adjacent to two triangles.
[0159] In one possible implementation, the second extraction module 504 further includes:
[0160] The first extraction submodule 802 is used to extract the midpoint of the two long sides of a first type of triangle, and take the midpoint of the first long side as the start point or end point of the road centerline. The first long side is one side of the non-adjacent triangle of the first type of triangle.
[0161] The first recording submodule 803 is used to record the start point or end point into the point set C, and to record the edge corresponding to the start point or end point into the edge set L.
[0162] In one possible implementation, the second extraction module further includes:
[0163] The second extraction submodule 804 is used to obtain the midpoint of the long side of the adjacent triangle, including: obtaining the adjacent triangle of the second long side of the previously processed triangle according to the mapping relationship in the second data set, wherein the second long side is the unprocessed long side of the previously processed triangle; recording the midpoint of the second long side of the two long sides of the adjacent triangle that is not in the side set L into the point set C, and recording the second long side into the side set L;
[0164] The second recording submodule 805 is used to repeatedly execute the step of obtaining the midpoint of the long side of the adjacent triangle in the second extraction submodule 804 until another first type of triangle is obtained, extract the midpoint of the two long sides of the other first type of triangle, and record the midpoint of the side of the two long sides without an adjacent triangle as the end point or start point of the road centerline in the point set C; wherein, the point set C is the set of center points of the road centerline.
[0165] For a description of the specific functions and examples of each module and sub-module of the road centerline extraction device in this embodiment, please refer to the relevant descriptions of the corresponding steps in the above-described road centerline extraction method embodiments, which will not be repeated here.
[0166] The road centerline extraction method disclosed in this embodiment is a highly efficient solution for calculating road centerline elements, belonging to the fields of cloud computing and spatiotemporal big data. Road centerline profiling is one of the most important foundational data in road element mining technology, and can be widely applied in construction, vehicle information, and road opening operations. For example, by comparing and observing the latest changes in the road centerline, effective construction information can be extracted for operational use. Furthermore, changes in the road centerline can be used to determine vehicle information modifications. The road centerline extraction method disclosed in this embodiment is applicable to mining road centerline attributes in scenarios without links, facilitating the rapid development of new road construction and other mining operations, and improving recall.
[0167] This disclosure proposes a novel road centerline extraction scheme from the perspective of constructing a road topology map. This scheme can extract road centerlines in linkless scenarios and is a centerline extraction scheme based on road topology. By constructing road topology polygons, this scheme quickly extracts road centerlines, which is a link-independent centerline calculation method and can extract road centerlines in linkless business scenarios.
[0168] This scheme includes several parts: trajectory preprocessing, road network outline construction, and road centerline extraction. (1) Trajectory feature processing: By setting a series of constraint filtering conditions, the original sparse and noisy mass source trajectory is characterized, and the processed trajectory is used as a high-quality trajectory for mining road centerlines. (2) Road topology model construction: For the high-quality trajectory after the above processing, a Delaunay triangulation is constructed, and the constructed triangle set is pruned to extract the road topology, which is used to prepare for the extraction of road centerlines. (3) Road centerline extraction: Based on the pruned road topology, a Delaunay triangulation is constructed again, and the road center point is calculated according to the constraint rules to complete the extraction of road centerlines.
[0169] The specific implementation of the above parts can be divided into raw trajectory preprocessing and road centerline drawing. Raw trajectory preprocessing mainly includes trajectory feature processing, while road centerline drawing mainly includes constructing a road topology model and extracting the road centerline. These will be described in detail below:
[0170] I. Preprocessing of the original trajectory
[0171] In actual sampling, the original crowdsourced trajectories may suffer from at least one of the following problems: GPS signal drift, noise interference, or sparse sampling intervals. Therefore, this original trajectory data cannot be directly used to excavate road centerlines. In view of this problem, the embodiments of this disclosure first perform feature processing on the original trajectory points, mainly including but not limited to at least one of the following:
[0172] Filter out abnormal trajectory points at latitude and longitude coordinates;
[0173] Trajectory point speed range filtering removes trajectory points whose speed falls within the normal vehicle speed range.
[0174] Trajectory point loss filtering: When the distance between the front and back of a trajectory line exceeds a threshold, trajectory grouping is performed.
[0175] Trajectory line filtering filters out excessively short trajectory lines and invalid trajectories with chaotic trajectory angle changes;
[0176] Attribute cleaning for abnormal trajectory points resolves issues such as inconsistent timestamp formats or missing attributes.
[0177] After the preprocessing of the original trajectory described above, the feature processing of the original trajectory points can be completed. Then, a series of trajectory points are concatenated into a trajectory line for subsequent processing. For example, the original trajectory can be processed into a multi-array or matrix. For example, one row of the matrix represents the trajectory points of a trajectory line, and one column represents each attribute of the trajectory point.
[0178] Second, depict the center line of the road.
[0179] Delaunay triangulation models are widely used in image processing, pattern recognition, and other fields. They can establish effective topological relationships in datasets and extract features such as centerlines. This disclosure uses a Delaunay triangulation model to construct the spatial distribution of roads and extracts road centerlines by combining the constructed graph method. The process mainly consists of extracting road contours (i.e., constructing a road topology model) and extracting road centerlines.
[0180] 1. Extract road contours
[0181] First, based on the Delaunay triangulation model, a Delaunay triangulation is constructed using all the preprocessed trajectory points to extract the road shape. For example... Figure 9 As shown, each triangle is recorded in dataset T. Figure 9 It can be seen that the constructed overall road model can be divided into outer contour edges (which can be called external edges) and inner contour edges (which can be called internal edges). Removing the edges of the outer triangles of the road contour yields the overall road contour. Furthermore, it can be observed that the movement directions of the two trajectory points on the outer long edge differ significantly. Therefore, when constructing the triangles, the direction (angle) of each edge of the triangle can be calculated, for example:
[0182] 1) When the direction (angle) of the trajectory of the two vertices is less than 30°, the direction (angle) of the side is set to the average of the directions (angles) of the two endpoints.
[0183] 2) If the direction (angle) of the trajectory of the two vertices is greater than or equal to 30°, then set the direction (angle) of that side to 0.
[0184] Then, remove all edges (angles) of the triangles (in dataset T) where the direction is 0. This removes the outer long edges and some unnecessary inner edges, and obtains a general outline of the road, such as... Figure 10 As shown. To further extract road contours, a directed graph approach can be used to prune the internal edges of the roads. For example, the remaining parts of dataset T can be used to construct a directed graph G1, as shown. Figure 11 As shown, the points in the G1 point set are then traversed one by one, and the following processing is performed based on the degree of the vertices:
[0185] 1) If the out-degree + in-degree of a vertex is less than or equal to 2, no action is taken.
[0186] 2) If the sum of the out-degree and in-degree of a vertex is greater than 2, obtain the set of out-degree edges S1 and the set of in-degree edges S2 corresponding to that vertex. Arrange and combine the edges in S1 and S2 to obtain the set S'{(s1,s2)|s1∈S1, s2∈S2}. Then calculate the direction (angle) difference between each pair of (s1,s2) in set S', and retain the pair with the smallest direction (angle) difference. Set the other edges as redundant edges and remove them in G1.
[0187] After the above steps, the optimized pruning of the internal edges can be completed, and the desired result can be obtained. Figure 12 The optimization for the remaining internal edges is shown. This disclosure can remove redundant edges by constructing a connected graph. First, G1 is transformed into an undirected graph G2. Then, the maximum connected subgraph of graph G2 is calculated, and edges not in the maximum connected subgraph are removed from G2, as shown below. Figure 13 The image shown is the road contour map G3 obtained after extracting the road contour.
[0188] 3. Extract the road centerline
[0189] After completing the above steps to extract the road contour, a complete road contour map G3 was obtained. Based on all vertices in G3, a Delaunay triangulation model was reconstructed. Figure 14 As shown. Furthermore, to facilitate the extraction of the road centerline, the set of triangles T' and the mapping relationship Q between each edge and its corresponding triangle are recorded when constructing the triangulation model. It can be analyzed that triangles at different locations along the road will be adjacent to different numbers of triangles. Based on the number of adjacent triangles, the internal triangles can be divided into two categories:
[0190] 1) A triangle of the first kind is adjacent to a triangle;
[0191] 2) The second type of triangle is adjacent to two triangles.
[0192] Type I triangles typically appear at the beginning / end of a road, while Type II triangles appear on the main road. Therefore, when extracting the road centerline, a Type I triangle (at the beginning / end of the road) can be randomly selected. The midpoints of its two longer sides are extracted, and the midpoint of the side without adjacent triangles is used as the starting point of the road centerline, recorded in the point set C. The edge is recorded in the edge set L. Then, based on Q, the adjacent triangle (Type II triangle) of the other longer side of the previously processed triangle is obtained, and the midpoint of the longer side of that triangle that is not in L is calculated and added to C. The edge is also recorded in set L. This process is repeated until a Type I triangle is encountered again, thus completing the extraction of the road centerline. The point set C is the set of center points of the road centerline. Figure 15 and Figure 16 As shown.
[0193] The novel road centerline calculation method provided in this disclosure can extract road centerlines using Delaunay triangulation and graph processing methods, without relying on link calculations, and can be applied to new road projects. Therefore, it can more quickly mine new road information and improve information recall. Furthermore, it is applicable to all projects that utilize road centerlines, such as those under construction, to enhance recall and ultimately realize the vision of faster and more accurate depiction and display of road changes in map products.
[0194] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0195] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0196] Figure 17 A schematic block diagram of an example electronic device 1700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0197] like Figure 17 As shown, device 1700 includes a computing unit 1701, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1702 or a computer program loaded into random access memory (RAM) 1703 from storage unit 1708. The RAM 1703 may also store various programs and data required for the operation of device 1700. The computing unit 1701, ROM 1702, and RAM 1703 are interconnected via bus 1704. Input / output (I / O) interface 1705 is also connected to bus 1704.
[0198] Multiple components in device 1700 are connected to I / O interface 1705, including: input unit 1706, such as a keyboard, mouse, etc.; output unit 1707, such as various types of displays, speakers, etc.; storage unit 1708, such as a disk, optical disk, etc.; and communication unit 1709, such as a network card, modem, wireless transceiver, etc. Communication unit 1709 allows device 1700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0199] The computing unit 1701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1701 performs the various methods and processes described above, such as the road centerline extraction method. For example, in some embodiments, the road centerline extraction method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1708. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1700 via ROM 1702 and / or communication unit 1709. When the computer program is loaded into RAM 1703 and executed by the computing unit 1701, one or more steps of the road centerline extraction method described above may be performed. Alternatively, in other embodiments, the computing unit 1701 may be configured to perform a road centerline extraction method by any other suitable means (e.g., by means of firmware).
[0200] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0201] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0202] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0203] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0204] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0205] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0206] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0207] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for extracting a road centerline, comprising: constructing a first road model based on trajectory features; extracting a road contour based on the first road model; wherein the first road model is a first triangular mesh model; extracting a road contour based on the first road model comprises: pruning edges of triangles in the first triangular mesh model according to motion angles of vertices of the triangles and an angle threshold, to obtain a first contour of a road; generating a directed graph based on each vertex included in the first contour; removing redundant edges from the directed graph according to outdegrees and / or indegrees of each vertex, to obtain a second contour of the road; wherein the redundant edges are determined in the following manner: in a case where a sum of an outdegree and an indegree of a vertex to be processed is greater than a second threshold, obtaining an outdegree edge set S1 and an indegree edge set S2 corresponding to the vertex to be processed; arranging and combining the outdegree edge set S1 and the indegree edge set S2 to obtain a set of pairs of outdegree edges and indegree edges {(s1, s2) | s1∈S1, s2∈S2}; calculating an angle difference between each pair of outdegree edges and indegree edges (s1, s2) in the set of pairs of outdegree edges and indegree edges; retaining a pair of outdegree edges and indegree edges with a minimum angle difference, and setting other edges in the outdegree edge set S1 and the indegree edge set S2 except the retained edges as redundant edges; constructing a second road model based on the road contour; extracting a set of road center points based on the second road model; wherein the road centerline comprises the set of road center points. 2.The method of claim 1, further comprising: preprocessing a trajectory to be processed; performing feature processing on the preprocessed trajectory to obtain the trajectory features.
3. The method of claim 2, wherein, The preprocessing comprises: filtering out at least one of the following from the trajectory to be processed: a trajectory point with abnormal latitude and longitude coordinates, a trajectory point with abnormal vehicle speed, a trajectory line with missing trajectory points, a trajectory line that is too short, and a trajectory point with abnormal attributes.
4. The method of any one of claims 1 to 3, wherein, constructing a first road model based on the trajectory features comprises: constructing a first triangular mesh model based on each trajectory point in the trajectory features.
5. The method of claim 1, wherein, Each edge of each triangle of the first triangular mesh model is recorded in a first data set; pruning edges of triangles in the first triangular mesh model according to motion angles of vertices of the triangles and an angle threshold comprises: in a case where motion angles of two vertices of an edge to be processed are less than a first threshold, setting an angle of the edge to be processed as an average of the motion angles of the two vertices; in a case where motion angles of two vertices of an edge to be processed are greater than or equal to a first threshold, setting an angle of the edge to be processed as a first value; removing edges in the first data set with the angle set as the first value. 6.The method of claim 1, extracting a road contour based on the first road model further comprises: converting the directed graph with the redundant edges removed into an undirected graph; calculating a maximum connected subgraph of the undirected graph; removing edges not in the maximum connected subgraph to obtain a road contour graph.
7. The method of claim 6, wherein constructing a second road model based on the road profile further comprises: constructing a second TIN model based on the road profile map.
8. The method of claim 7, wherein, a mapping relationship between each edge of each triangle of the second TIN model and its corresponding triangle is recorded in a second data set, wherein extracting a set of road center points based on the second road model further comprises: calculating a number of triangles adjacent to a triangle at different positions of the road according to the second data set to obtain first type triangles and second type triangles, wherein the first type triangles are adjacent to one triangle and the second type triangles are adjacent to two triangles.
9. The method of claim 8, wherein, extracting a set of road center points based on the second road model further comprises: extracting a midpoint of two long edges of a first type triangle, and taking a midpoint of a first long edge of the two long edges as a starting point or an ending point of the road centerline, the first long edge being an edge of the first type triangle without an adjacent triangle; recording the starting point or the ending point into a point set C and recording an edge corresponding to the starting point or the ending point into an edge set L.
10. The method of claim 9, wherein, extracting a set of road center points based on the second road model further comprises: obtaining a midpoint of a long edge of an adjacent triangle, including: obtaining an adjacent triangle of a second long edge of a last processed triangle according to the mapping relationship in the second data set, the second long edge being an unprocessed long edge of the last processed triangle; recording a midpoint of the second long edge of the adjacent triangle, which is not in the edge set L, into the point set C, and recording the second long edge into the edge set L; repeating the step of obtaining the midpoint of the long edge of the adjacent triangle until another first type triangle is obtained again, extracting a midpoint of two long edges of the another first type triangle, and taking a midpoint of an edge without an adjacent triangle as an ending point or a starting point of the road centerline, and recording the ending point or the starting point into the point set C, wherein the point set C is a set of center points of the road centerline.
11. A device for extracting a road centerline, the device comprising: a first constructing module configured to construct a first road model based on a track feature; The first extraction module is configured to extract a road contour based on the first road model; the first road model is a first triangular mesh model; each vertex of a triangle in the first triangular mesh model corresponds to a trajectory point in the trajectory feature; the first extraction module comprises a first pruning submodule; the first pruning submodule is configured to prune edges of triangles in the first triangular mesh model according to an angle of motion of a vertex of a triangle in the first triangular mesh model and an angle threshold value, to obtain a first contour of a road; generate a directed graph based on each vertex included in the first contour; remove redundant edges from the directed graph according to out-degree and / or in-degree of each vertex, to obtain a second contour of the road; the determination manner of the redundant edges comprises: in a case where a sum of the out-degree and the in-degree of a to-be-processed vertex is greater than a second threshold value, obtaining an out-degree edge set S1 and an in-degree edge set S2 corresponding to the to-be-processed vertex; arranging and combining the out-degree edge set S1 and the in-degree edge set S2 to obtain a set of pairs of out-degree edges and in-degree edges {(s1, s2) | s1∈S1, s2∈S2}; calculating an angle difference between each pair of out-degree edges and in-degree edges (s1, s2) in the set of pairs of out-degree edges and in-degree edges; retaining a pair of out-degree edges and in-degree edges with the smallest angle difference, and setting other edges in the out-degree edge set S1 and the in-degree edge set S2 except the retained edges as redundant edges; The second construction module is configured to construct a second road model based on the road contour; The second extraction module is configured to extract a set of road center points based on the second road model; The road centerline comprises the set of road center points.
12. The apparatus according to claim 11, further comprising: a preprocessing module configured to preprocess a to-be-processed trajectory; a featureization module configured to perform featureization processing on the preprocessed trajectory, to obtain the trajectory feature.
13. The apparatus of claim 12, wherein, The preprocessing module is configured to filter out at least one of the following from the to-be-processed trajectory: a trajectory point with abnormal latitude and longitude coordinates, a trajectory point with abnormal vehicle speed, a trajectory line with missing trajectory points, a trajectory line that is too short, and a trajectory point with abnormal attributes.
14. The apparatus of any one of claims 11-13, wherein, The first construction module is configured to construct a first triangular mesh model based on each trajectory point in the trajectory feature.
15. The apparatus of claim 11, wherein, Each edge of each triangle of the first triangular mesh model is recorded in a first data set; the first pruning submodule is configured to: in a case where the angle of motion of two vertices of a to-be-processed edge is less than a first threshold value, set the angle of the to-be-processed edge as an average of the angles of motion of the two vertices; in a case where the angle of motion of two vertices of a to-be-processed edge is greater than or equal to the first threshold value, set the angle of the to-be-processed edge as a first value; remove edges in the first data set with the angle taking the first value.
16. The apparatus according to claim 11, wherein the first extraction module further comprises: a conversion submodule configured to convert the directed graph with the removed redundant edges into an undirected graph; a connectivity submodule configured to calculate a maximum connected subgraph of the undirected graph; an edge removal submodule configured to remove edges not in the maximum connected subgraph, to obtain a road contour graph.
17. The apparatus of claim 16, wherein the second constructing module is further configured to construct a second TIN based on the road profile map.
18. The apparatus of claim 17, wherein, The mapping relationship between each edge of each triangle of the second TIN and its corresponding triangle is recorded in a second data set, and the second extracting module comprises: a classifying submodule configured to calculate the number of triangles adjacent to a triangle at different positions of the road based on the second data set to obtain first-class triangles and second-class triangles, wherein the first-class triangles are adjacent to one triangle, and the second-class triangles are adjacent to two triangles.
19. The apparatus of claim 18, wherein, The second extracting module further comprises: a first extracting submodule configured to extract the midpoints of two long edges of a first-class triangle, and take the midpoint of a first long edge of the two long edges as a starting point or an ending point of the road centerline, the first long edge being an edge of the first-class triangle without an adjacent triangle; a first recording submodule configured to record the starting point or the ending point in a point set C and record the edge corresponding to the starting point or the ending point in an edge set L.
20. The apparatus of claim 19, wherein, The second extracting module further comprises: a second extracting submodule configured to obtain the midpoints of long edges of an adjacent triangle, including: obtaining, based on the mapping relationship in the second data set, an adjacent triangle of a second long edge of a last processed triangle, the second long edge being an unprocessed long edge of the last processed triangle; recording the midpoint of the second long edge of the two long edges of the adjacent triangle, which is not in the edge set L, in the point set C, and recording the second long edge in the edge set L; a second recording submodule configured to record the ending point or the starting point in the point set C after repeating the step of obtaining the midpoints of the long edges of the adjacent triangle until another first-class triangle is obtained again, extracting the midpoints of the two long edges of the another first-class triangle, and taking the midpoint of an edge without an adjacent triangle as an ending point or a starting point of the road centerline; wherein the point set C is a center point set of the road centerline.
21. An electronic device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
22. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-10.
23. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-10.
Citation Information
Patent Citations
Geographic information extraction and target tracking method based on SMR target trajectory
CN110988880A
Lane-level urban road extraction method based on track position and direction information of floating car
CN113538482A