Method and device for generating intersection connection lines
By generating intersection connection lines, the problem of difficult path planning at complex intersections in autonomous driving is solved, and simple and fast path planning is achieved even without high-precision maps.
Patent Information
- Application Number
- CN202511234401.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-01
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-09-01
AI Technical Summary
In the field of autonomous driving, especially in the absence of high-precision maps, it is difficult to detect how to pass through complex intersections, such as multiple intersections under an overpass, using pure perception technology, which leads to difficulties in path planning.
The method for generating intersection connectors involves detecting intersection elements to generate intersection regions, truncating traffic trajectories, segmenting and clustering traffic trajectories to generate intersection trajectory clusters, and finally determining the intersection connectors.
It enables the simple and quick generation of intersection connection lines even without high-precision maps, supporting better route planning.
Smart Images

Figure CN120748210B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of intersection road topology construction, and in particular to a method and device for generating intersection connection lines. BACKGROUND
[0002] In the field of autonomous driving, it is sometimes difficult to detect how to pass through a complex intersection, such as a complex overpass underneath, with many intersections, by pure perception (visual perception or laser radar perception) without a high-precision map. This brings difficulties to path planning. For example, if the navigation tells the user to turn left, and the user does not know which intersection can turn left, a reasonable trajectory cannot be planned. SUMMARY
[0003] Embodiments of the present application provide a method and device for generating intersection connection lines, which can generate intersection connection lines between intersection roads to achieve better path planning.
[0004] In a first aspect, embodiments of the present application provide a method for generating intersection connection lines, comprising:
[0005] generating an intersection area based on a detected target intersection element;
[0006] truncating at least part of the trajectories in the vehicle flow trajectory based on the intersection area, and taking each trajectory segment that completely passes through the intersection area after truncation as an intersection trajectory;
[0007] dividing each intersection trajectory into multiple segments, generating at least one first cluster based on the starting segments of the intersection trajectories, and generating at least one second cluster based on the ending segments of the intersection trajectories;
[0008] for each target first cluster in the first clusters, generating a third cluster based on the intersection of each target second cluster in at least part of the second clusters and the intersection trajectories corresponding to the target first cluster and the target second cluster, respectively, and determining an intersection connection line from a first road corresponding to the target first cluster to a second road corresponding to the target second cluster based on the intersection trajectories in the third cluster.
[0009] In an implementation, generating at least one first cluster based on the starting segments of the intersection trajectories comprises:
[0010] taking the distance between the starting points of the starting segments as a first similarity, clustering the starting segments based on the first similarities, and generating the first clusters;
[0011] In an implementation, generating at least one second cluster based on the ending segments of the intersection trajectories comprises:
[0012] taking the distance between the ending points of the ending segments as a second similarity, clustering the ending segments based on the second similarities, and generating the second clusters.
[0013] In an embodiment, the first similarity is used to cluster the start segments into first clusters, including:
[0014] The start segments are clustered into fourth clusters, and the first similarity between any two start segments in a fourth cluster is less than a first threshold value;
[0015] At least part of the fourth clusters are aggregated to generate first clusters, and the first similarity between any two start segments in a first cluster is less than a second threshold value, the second threshold value being greater than the first threshold value;
[0016] The second similarity is used to cluster the end segments into second clusters, including:
[0017] The end segments are clustered into fifth clusters, and the second similarity between any two end segments in a fifth cluster is less than the first threshold value;
[0018] At least part of the fifth clusters are aggregated to generate second clusters, and the second similarity between any two end segments in a second cluster is less than the second threshold value.
[0019] In an embodiment, the aggregation of the fourth clusters includes:
[0020] Fourth clusters with a number of trajectories equal to a preset number are removed from the fourth clusters, and the remaining fourth clusters are aggregated;
[0021] The aggregation of the fifth clusters includes:
[0022] Fifth clusters with a number of trajectories equal to a preset number are removed from the fifth clusters, and the remaining fifth clusters are aggregated.
[0023] In an embodiment, the first clusters and the second clusters each include trajectory indexes of corresponding intersection trajectories;
[0024] The third cluster is generated by:
[0025] The intersection of the trajectory indexes in a target second cluster and the trajectory indexes in a target first cluster generates the third cluster.
[0026] In an embodiment, the method further includes:
[0027] An initial driving direction of each intersection trajectory in the third cluster is determined;
[0028] A target driving direction of the third cluster and the connection line of the intersection is determined as the initial driving direction with the largest number among the initial driving directions.
[0029] In an embodiment, the intersection connection line from the first road corresponding to the target second type cluster to the second road corresponding to the target second type cluster is determined, comprising:
[0030] Based on the trajectory points in each intersection trajectory, the intersection plane of the intersection region is determined;
[0031] The intersection plane is divided into a grid of a preset size;
[0032] The sum of the densities of each grid through which each intersection trajectory in the third type cluster passes is determined;
[0033] Based on the target intersection trajectory corresponding to the maximum value in each sum of densities, the intersection connection line is generated.
[0034] In an embodiment, the intersection connection line is generated, comprising:
[0035] The target intersection trajectory is taken as the intersection connection line.
[0036] In an embodiment, the intersection connection line is generated, comprising:
[0037] Based on the trajectory segment other than the starting segment and the ending segment in the above-mentioned multiple segments of the target intersection trajectory, the intersection connection line is determined.
[0038] In a second aspect, the embodiments of the present application provide a device for generating an intersection connection line, comprising:
[0039] A generation unit is configured to generate an intersection region based on the detected target intersection element;
[0040] A first determination unit is configured to truncate at least part of the trajectories in the traffic flow trajectory based on the intersection region, and take each trajectory segment that passes through the intersection region completely after truncation as an intersection trajectory;
[0041] A clustering unit is configured to divide each intersection trajectory into multiple segments, generate at least one first type cluster based on the starting segment of each intersection trajectory, and generate at least one second type cluster based on the ending segment of each intersection trajectory;
[0042] A second determination unit is configured to, for each target first type cluster in each first type cluster, generate a third type cluster based on the intersection of each intersection trajectory corresponding to the target first type cluster and each target second type cluster in at least part of the second type clusters, and determine the intersection connection line from the first road corresponding to the target first type cluster to the second road corresponding to the target second type cluster based on the intersection trajectory in the third type cluster.
[0043] The scheme provided by the embodiments of the present application can generate a road intersection region simply and quickly based on the detected target road intersection element. Then, at least part of the trajectories in the vehicle flow trajectory can be truncated based on the road intersection region, and each trajectory segment that completely passes through the road intersection region after being truncated is taken as a road intersection trajectory. Then, each road intersection trajectory is divided into multiple segments, at least one first type cluster is generated based on the starting segments of the road intersection trajectories, and at least one second type cluster is generated based on the ending segments of the road intersection trajectories. Then, for each target first type cluster in the first type clusters, a third type cluster is generated based on the intersection of the road intersection trajectories corresponding to each target second type cluster and the target first type cluster in the at least part of the second type clusters, and a road intersection connection line from a first road corresponding to the target first type cluster to a second road corresponding to the target second type cluster is determined based on the road intersection trajectories in the third type cluster. In this way, the road intersection connection line between the road intersections can be generated simply and quickly, so as to achieve better path planning. BRIEF DESCRIPTION OF DRAWINGS
[0044] The technical scheme and other beneficial effects of the present application will become apparent after a detailed description of the specific embodiments of the present application is provided in combination with the accompanying drawings.
[0045] Figure 1 is a flowchart of the method for generating a road intersection connection line provided by the embodiments of the present application;
[0046] Figure 2 is a schematic diagram of the road intersection trajectories in the embodiments of the present application;
[0047] Figure 3 is a schematic diagram of the trajectories of the starting segments before and after clustering in the embodiments of the present application;
[0048] Figure 4 is a schematic diagram of the coarse-aimed road intersection connection line in the embodiments of the present application;
[0049] Figure 5 is a schematic diagram of the fine-aimed road intersection connection line in the embodiments of the present application;
[0050] Figure 6 is a schematic diagram of the first road polygon and the second road polygon in the embodiments of the present application;
[0051] Figure 7 is another flowchart of the method for generating a road intersection connection line provided by the embodiments of the present application;
[0052] Figure 8 is a structural schematic diagram of the device for generating a road intersection connection line in the embodiments of the present application.
[0053] The reference signs: 801, generation unit; 802, first determination unit; 803, clustering unit; 804, second determination unit. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0055] In the description of the present application, it should be noted that, unless otherwise explicitly specified and limited, the term "and / or" in the present application is only to describe the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. In addition, the character " / " in the present application generally represents an "or" relationship between the associated objects without special explanation.
[0056] As described above, in the field of automatic driving, it is sometimes difficult to detect how to pass through a certain complex intersection, such as a complex overpass underneath, with many intersections, by pure perception (visual perception or laser radar perception) without a high-precision map. This brings difficulties to path planning. If the navigation tells the user to turn left, and the user does not know which intersection can turn left, it is impossible to plan a reasonable trajectory.
[0057] The embodiments of the present application provide a method and device for generating an intersection connection line, which can generate an intersection connection line between intersection roads to achieve better path planning.
[0058] In some embodiments, the method for generating an intersection connection line provided by the present application can be executed by any platform, system, server, device, device cluster or device with computing and processing capabilities.
[0059] Figure 1 is a flowchart of the method for generating an intersection connection line provided by the embodiments of the present application. The method includes the following steps:
[0060] S101: generating an intersection area based on the detected target intersection element;
[0061] S103: truncating at least part of the trajectory in the vehicle flow trajectory based on the intersection area, and taking each trajectory segment that passes through the intersection area completely after truncation as an intersection trajectory;
[0062] S105: dividing each intersection trajectory into multiple segments, generating at least one first type of cluster based on the starting segment of each intersection trajectory, and generating at least one second type of cluster based on the ending segment of each intersection trajectory;
[0063] S107: For each target first cluster in the first clusters, generating a third cluster based on the intersection of each target second cluster in the second clusters and the intersection trajectories corresponding to the target first cluster and the target second cluster respectively, and determining the intersection connection line from the first road corresponding to the target first cluster to the second road corresponding to the target second cluster based on the intersection trajectories in the third cluster.
[0064] In Figure 1 In the scheme provided by the corresponding embodiments, the intersection region can be simply and quickly generated based on the detected target intersection elements. Then, at least part of the trajectories in the vehicle flow trajectories can be truncated based on the intersection region, and each trajectory segment that passes through the intersection region completely after being truncated is taken as an intersection trajectory. Then, each intersection trajectory is divided into multiple segments, at least one first cluster is generated based on the starting segments of the intersection trajectories, and at least one second cluster is generated based on the ending segments of the intersection trajectories. Then, for each target first cluster in the first clusters, a third cluster is generated based on the intersection of each target second cluster in the second clusters and the intersection trajectories corresponding to the target first cluster and the target second cluster respectively, and the intersection connection line from the first road corresponding to the target first cluster to the second road corresponding to the target second cluster is determined based on the intersection trajectories in the third cluster. In this way, the intersection connection line between the intersection roads can be simply and quickly generated for better path planning.
[0065] Next, steps S101 to S107 are described.
[0066] In step S101, the intersection region is generated based on the detected target intersection elements.
[0067] In practice, the vehicle flow trajectories and the target intersection elements can be obtained by using a data acquisition system. The data acquisition system can include a vehicle end pure vision BEV (Bird's Eye View) detection system. The vehicle flow trajectories include trajectory data of the ego vehicle and other vehicles. The target intersection elements include intersection static elements such as stop lines and / or sidewalks.
[0068] Currently, the perception and positioning technologies of automatic driving have been greatly developed, so a pure vision BEV detection system can be easily deployed at the vehicle end, which can detect other vehicles and track the other vehicles, such as Kalman tracking, and also can detect static elements such as stop lines and / or sidewalks at the intersection. The Kalman tracking is a target tracking method based on Kalman filtering algorithm, and the core idea is to realize continuous and stable tracking of dynamic targets by predicting and updating the state of the target. The positioning module at the vehicle end realizes the odometer using sensors such as GPS (Global Positioning System), which is used to obtain the pose of the vehicle, and the trajectory data of the detected other vehicles and the static elements at the intersection are transformed into the global coordinate system.
[0069] In an implementation, in order to reduce the amount of data, the trajectory data is down-sampled according to a preset interval time length, and each piece of trajectory data obtained is stored in time sequence. The preset interval time length may be, for example, 1 second or 2 seconds, which can be set according to actual needs and is not specifically limited here.
[0070] According to the foregoing description, the target intersection element in step S101 can be a target intersection element that has been transformed into a global coordinate system. It should be noted that if the road segment detects the target intersection element, it is considered that the road segment has an intersection, so that the stop line or sidewalk in the target intersection element can be extended to obtain a rough intersection envelope, and the rough intersection envelope is determined as the intersection area.
[0071] For example, in the case where the target intersection element includes a stop line, the stop line can be extended in the extension direction of the stop line itself (such as the direction of crossing the road) to both sides, and the distance of the extension on both sides may be, for example, the length of the stop line itself, which is in meters. Then, the extended stop line can be regarded as a geometric figure, and its convex hull (the smallest convex polygon that can completely wrap the extended stop line) can be taken as the rough intersection envelope.
[0072] In addition, in the case where the target intersection element includes a sidewalk, the sidewalk can be extended in the extension direction of the sidewalk (the direction of pedestrian crossing) to both sides by a preset length (for example, 5 meters). Then, the extended sidewalk can be regarded as a geometric figure, and its convex hull (the smallest convex polygon that can completely wrap the extended sidewalk) can be taken as the rough intersection envelope.
[0073] In step S103, at least part of the trajectories in the vehicle flow trajectory are truncated based on the intersection area, and each trajectory segment that completely passes through the intersection area after truncation is taken as an intersection trajectory. Each trajectory in the vehicle flow trajectory has been transformed into a global coordinate system. Further, each trajectory in the vehicle flow trajectory has been down-sampled as described above.
[0074] It should be noted that after the intersection area is used to truncate at least part of the vehicle flow trajectory, for each trajectory segment intersecting with the intersection area, the trajectory segment with the starting point or the ending point located in the intersection area is removed, that is, the shorter trajectory segment is removed, only the trajectory segment completely passing through the intersection area is retained, and the trajectory segment is determined as the intersection trajectory.
[0075] In step S105, each intersection trajectory is divided into multiple segments, at least one first type cluster is generated based on the starting segment of each intersection trajectory, and at least one second type cluster is generated based on the ending segment of each intersection trajectory.
[0076] Specifically, each intersection trajectory can be divided into N segments, N being an integer greater than or equal to 3. Further, in order to quickly and accurately segment each intersection trajectory, the intersection trajectory can be first smoothed by using a preset filter, and then the smoothed path trajectory is divided into N segments. The filter includes but is not limited to a Savitzky-Golay filter. In practice, the Savitzky-Golay filter is a digital filter for signal smoothing and noise reduction, which preserves the characteristics of the signal trend and peak value by polynomial fitting of data in a sliding window, while reducing noise interference. The filter has wide application in the fields of spectral analysis, image processing, time series data processing, etc. Its core idea is to approximate the signal with a low-order polynomial in a local range, and solve the polynomial coefficients by least squares method, so as to realize the smoothing processing of data.
[0077] Further, when segmenting the intersection trajectory, it can be determined whether the intersection trajectory is a straight line or a curve. When it is determined that the intersection trajectory is a straight line, a segmentation method corresponding to the straight line is used to segment the intersection trajectory. When it is determined that the intersection trajectory is a curve, a segmentation method corresponding to the curve is used to segment the intersection trajectory.
[0078] In determining whether the intersection trajectory is a straight line or a curve, as an implementation manner, the curvature of all points in the intersection trajectory can be determined, and in the case that the curvature of all points in the intersection trajectory is less than a curvature threshold (such as 0.05) and the angle between the direction vectors of the start point and the end point of the intersection trajectory is less than an angle threshold (such as 30°), the intersection trajectory is determined to be a straight line. In addition, in the case that the curvature of all points in the intersection trajectory is not less than the curvature threshold, or the angle between the direction vectors of the start point and the end point of the intersection trajectory is greater than or equal to the angle threshold, the intersection trajectory is determined to be a curve. It should be noted that in trajectory analysis, curvature is a physical quantity describing the bending degree of a curve (trajectory), which quantifies the rate of change of the tangent direction of a point on the trajectory with respect to the arc length. The greater the curvature, the more severe the bending of the trajectory at the point; the smaller the curvature (tending to 0), the closer the trajectory to a straight line. Since the calculation method of curvature is a known technology, it will not be described here.
[0079] Taking N=3 as an example, in the case that the intersection trajectory is a straight line, the length 1 / 3 and 2 / 3 of the intersection trajectory are taken as the division points, and the intersection trajectory is divided into three segments from the division points. In the case that the intersection trajectory is a curve, the intersection trajectory is first divided into two halves, and the maximum curvature points of the first half and the second half are taken as the division points, and the intersection trajectory can be further divided into three segments from the division points. In the case that the intersection trajectory is divided into three segments, the trajectory segment containing the start point of the intersection trajectory can be referred to as the start segment, the trajectory segment containing the end point of the intersection trajectory can be referred to as the end segment, and the trajectory segment in the middle can be referred to as the middle segment.
[0080] After each intersection trajectory is divided into multiple segments, at least one first cluster is generated based on the start segment of the intersection trajectory, and at least one second cluster is generated based on the end segment of each intersection trajectory. Specifically, the distance between the start points of each start segment is taken as the first similarity, each start segment is clustered based on each first similarity, and each first cluster is generated. The distance between the end points of each end segment is taken as the second similarity, each end segment is clustered based on each second similarity, and each second cluster is generated.
[0081] Further, the starting segments are clustered based on the first similarity, to generate first clusters, including: clustering the starting segments into fourth clusters, any two starting segments in a fourth cluster have a first similarity less than a first threshold; and performing aggregation processing on at least part of the fourth clusters to generate the first clusters, any two starting segments in a first cluster have a first similarity less than a second threshold, the second threshold is greater than the first threshold. The ending segments are clustered based on the second similarity, to generate second clusters, including: clustering the ending segments into fifth clusters, any two ending segments in a fifth cluster have a second similarity less than the first threshold; and performing aggregation processing on at least part of the fifth clusters to generate the second clusters, any two ending segments in a second cluster have a second similarity less than the second threshold. The unit of the distance is meter. In an example, the first threshold is 2 meters, and the second threshold is 15 meters. It should be understood that the first threshold and the second threshold can be set according to actual needs, which are not limited herein.
[0082] In practice, there can be abnormal trajectories in the intersection trajectories. As shown in FIG. 3, the intersection trajectory pointed by label 21 turns left from the leftmost lane, and the intersection trajectory pointed by label 22 turns left to the opposite lane, which are both abnormal trajectories. Figure 2 Figure 2 is a schematic diagram of the intersection trajectories in the embodiments of the present application.
[0083] To filter out abnormal trajectories, the fourth clusters are further aggregated, including: removing the fourth clusters with a preset number of trajectories from the fourth clusters, and performing aggregation processing on the remaining fourth clusters. The fifth clusters are aggregated, including: removing the fifth clusters with a preset number of trajectories from the fifth clusters, and performing aggregation processing on the remaining fifth clusters. In an example, the preset number is 1. By removing the fourth clusters with a preset number of trajectories from the fourth clusters, and removing the fifth clusters with a preset number of trajectories from the fifth clusters, abnormal trajectories can be removed. As shown in FIG. 4, the left side is a starting segment trajectory, and the right side is a clustered trajectory. The abnormal trajectories pointed by labels 31 and 32 on the left side are filtered out. Figure 3 Figure 3 is a schematic diagram of the starting segment trajectories before and after clustering in the embodiments of the present application.
[0084] The two-stage clustering can be achieved by using the clustering process described in the foregoing, and abnormal trajectories can be filtered out by using the two-stage clustering strategy.
[0085] In step S107, for each target first cluster in the first clusters, a third cluster is generated based on the intersection of each target second cluster in the at least part of the second clusters and the intersection trajectories corresponding to the target first cluster, and a connection line of an intersection from a first road corresponding to the target first cluster to a second road corresponding to the target second cluster is determined based on the intersection trajectories in the third cluster.
[0086] Specifically, the first clusters and the second clusters each include trajectory indexes of the corresponding intersection trajectories. When generating the third cluster, the intersection of each trajectory index in the target second cluster and each trajectory index in the target first cluster can be used to generate the third cluster.
[0087] In an implementation, the connection line of the intersection can be obtained based on a maximum density grid principle. Specifically, determining the connection line of the intersection from the first road corresponding to the target first cluster to the second road corresponding to the target second cluster includes:
[0088] Determining an intersection plane of the intersection region based on the trajectory points in the intersection trajectories;
[0089] Dividing the intersection plane into grids of a preset size;
[0090] Determining a sum of densities of the grids passed through by each intersection trajectory in the third cluster;
[0091] Generating the connection line of the intersection based on a target intersection trajectory corresponding to a maximum value in the sums of densities.
[0092] The trajectory points in each intersection trajectory include an X coordinate value and a Y coordinate value. When determining the intersection plane of the intersection region, the minimum X coordinate value, the maximum X coordinate value, the minimum Y coordinate value, and the maximum Y coordinate value in the intersection trajectories are obtained, then a lower-left vertex is determined based on the minimum X coordinate value and the minimum Y coordinate value, a upper-right vertex is determined based on the maximum X coordinate value and the maximum Y coordinate value, and then a rectangle is generated based on the lower-left vertex and the upper-right vertex, and the rectangle is used as the intersection plane.
[0093] The grid of the preset size can be, for example, 0.5 m The grid of 0.5 m. Wherein, m is a unit, representing meters. In practice, if a trajectory passes through a grid, the density of the grid increases by 1; in other words, each grid counts the number of trajectories passing through it. Based on this, the sum of densities of the grids passed through by each intersection trajectory in the third cluster can be determined, and the connection line of the intersection is generated based on a target intersection trajectory corresponding to a maximum value in the sums of densities.
[0094] Further, in one example, the target intersection trajectory can be directly determined as the intersection connection line. In this case, the intersection connection line can be referred to as a coarse-aim connection line. The coarse-aim connection line can be affected by the stagnation data during the waiting time of the traffic light, and thus is referred to as "coarse-aim".
[0095] In another example, the intersection connection line can be determined based on the trajectory segments of the target intersection trajectory except the start segment and the end segment. For example, one of the intermediate segments of the target intersection trajectory can be determined as the intersection connection line. In this case, the intersection connection line can be referred to as a fine-aim connection line. The intermediate segment trajectory has already been in the intersection, and thus is less affected by the stagnation data. In addition, the intermediate segment trajectory does not generally indicate a specific lane, and thus is referred to as "fine-aim".
[0096] It should be noted that the coarse-aim connection line can be used as a reference when the vehicle needs to plan a trajectory before entering the intersection, and the fine-aim connection line can be used as a reference when the vehicle is in the intersection. In this case, Figure 4 a coarse-aim intersection connection line is shown, Figure 5 a fine-aim intersection connection line is shown. Figure 4 is a schematic diagram of the coarse-aim intersection connection line in the embodiment of the present application, Figure 5 is a schematic diagram of the fine-aim intersection connection line in the embodiment of the present application.
[0097] In one embodiment, a first intersection connection line as a coarse-aim connection line and a second intersection connection line as a fine-aim connection line can be generated based on the target intersection trajectory.
[0098] In one embodiment, the initial driving direction of each intersection trajectory in the third type of cluster can be determined, and the initial driving direction with the largest number in the initial driving directions can be determined as the target driving direction of the third type of cluster and the intersection connection line. For example, the initial driving direction can be one of straight, left turn, right turn, and U-turn. For example, assuming that the third type of cluster is formed by four intersection trajectories, the initial driving direction of one of the intersection trajectories in the third type of cluster is straight, and the initial driving directions of the other three intersection trajectories are left turn. Since the number of left turns is the largest, the left turn can be determined as the target driving direction of the third type of cluster and the intersection connection line. It can be understood that after the initial driving direction with the largest number is determined as the target driving direction of the third type of cluster, the driving direction of each intersection trajectory in the third type of cluster is the target driving direction.
[0099] Further, the initial driving direction of each intersection trajectory in the third type of cluster can be determined, including:
[0100] a first direction vector start_vec of the start point is determined by using the first two trajectory points of the intersection trajectory;
[0101] a second direction vector end_vec of the end point determined by the last two trajectory points of the intersection trajectory;
[0102] calculate an angle between start_vec and end_vec, and normalize it to [-180, 180], and let abs_angle be the absolute value of angle;
[0103] in the case that abs_angle is less than 30 degrees, determine the initial driving direction of the intersection trajectory as straight;
[0104] in the case that abs_angle is greater than 135 degrees, determine the initial driving direction of the intersection trajectory as U-turn;
[0105] in the case that abs_angle is greater than or equal to 30 degrees and less than or equal to 135 degrees, if angle is less than 0 degrees, determine the initial driving direction of the intersection trajectory as right turn; if angle is greater than 0 degrees, determine the initial driving direction of the intersection trajectory as left turn.
[0106] It can be understood that the angle and the value in [-180, 180] are both in degrees.
[0107] In an embodiment, the first road corresponding to the target first type cluster can be represented by a first road polygon of the target first type cluster, and the first road polygon is determined based on each start segment in the target first type cluster. Correspondingly, the second road corresponding to the target second type cluster can be represented by a second road polygon of the target second type cluster, and the second road polygon is determined based on each end segment in the target second type cluster.
[0108] It should be noted that when determining the first road polygon of the target first type cluster, for example, the trajectory segments of a preset length before each start segment in the target first type cluster can be combined together to form a convex hull as the first road polygon of the target first type cluster. When determining the second road polygon of the target second type cluster, for example, the trajectory segments of a preset length after each end segment in the target second type cluster can be combined together to form a convex hull as the second road polygon of the target second type cluster. The preset length is, for example, 10 meters. It should be understood that the preset length can be set according to actual needs, which is not limited specifically herein. In this embodiment, the preset length is 10 meters. Figure 6 is a schematic diagram of the first road polygon and the second road polygon in the embodiment. In Figure 6 , the solid polygon schematically represents the first road polygon of each target first type cluster, and the dashed polygon schematically represents the second road polygon of each target second type cluster.
[0109] In an embodiment, after generating the third type of cluster based on the intersection of each intersection trajectory corresponding to the target second type of cluster and the target first type of cluster, an initial driving direction of each intersection trajectory in the third type of cluster is determined, and a type of initial driving direction with the largest number in the initial driving directions is determined as a target driving direction of the third type of cluster. In addition, after determining the intersection connection line from the first road corresponding to the target first type of cluster to the second road corresponding to the target second type of cluster based on the intersection trajectory in the third type of cluster, the driving direction of the intersection connection line is determined as the target driving direction, and a road topology relationship of the intersection is established, which indicates the first road, the second road, the intersection connection line from the first road to the second road, and the target driving direction of the intersection connection line. Further, in the road topology relationship of the intersection, the first road is represented by the first road polygon of the target first type of cluster, and the second road is represented by the second road polygon of the target second type of cluster.
[0110] Figure 7 is another flowchart of the method for generating the intersection connection line in the embodiment of the present application. The method comprises:
[0111] S701: generating an intersection region based on the detected target intersection element;
[0112] S703: truncating at least part of the trajectories in the traffic flow trajectory based on the intersection region, and taking each trajectory segment that passes through the intersection region completely after being truncated as an intersection trajectory;
[0113] S705: dividing each intersection trajectory into multiple segments;
[0114] S707: clustering the starting segments into multiple fourth type of clusters with the distance between the starting points of the starting segments of each intersection trajectory as a first similarity, and the first similarity between any two starting segments in the fourth type of cluster being less than a first threshold value;
[0115] S709: removing the fourth type of cluster with a preset number of trajectories from each fourth type of cluster, and performing aggregation processing on the remaining fourth type of clusters to generate at least one first type of cluster, the first similarity between any two starting segments in the first type of cluster being less than a second threshold value, and the second threshold value being greater than the first threshold value;
[0116] S711: clustering the ending segments into multiple fifth type of clusters with the distance between the ending points of the ending segments of each intersection trajectory as a second similarity, and the second similarity between any two ending segments in the fifth type of cluster being less than the first threshold value;
[0117] S713: removing the fifth type of cluster with a preset number of trajectories from each fifth type of cluster, and performing aggregation processing on the remaining fifth type of clusters to generate at least one second type of cluster, the second similarity between any two ending segments in the second type of cluster being less than the second threshold value;
[0118] S715: For each target first-type cluster in the first-type clusters, generating a third-type cluster based on the intersection of each target second-type cluster in the at least part of the second-type clusters and the intersection trajectory corresponding to the target first-type cluster respectively;
[0119] S717: Determining an intersection plane of the intersection region based on the track points in the intersection trajectories;
[0120] S719: Dividing the intersection plane into grids of a preset size;
[0121] S721: Determining the sum of densities of the grids passed through by each intersection trajectory in the third-type cluster;
[0122] S723: Generating an intersection connection line from the first road corresponding to the target first-type cluster to the second road corresponding to the target second-type cluster based on the target intersection trajectory corresponding to the maximum value in the sum of densities.
[0123] Wherein, the explanation about steps S701 to S723 can refer to the related description in the foregoing, which will not be repeated here.
[0124] In Figure 7 In the corresponding embodiment, the intersection region can be simply and quickly generated based on the detected target intersection element. In addition, the abnormal trajectories are filtered out and the first-type clusters and the second-type clusters are obtained using the two-stage clustering. Furthermore, the intersection connection line is obtained based on the maximum density grid principle.
[0125] Figure 8 is a structural schematic diagram of the intersection connection line generation device in the embodiment of the present application. As Figure 8 shown, the generation device comprises:
[0126] The generation unit 801 is configured to generate an intersection region based on the detected target intersection element;
[0127] The first determination unit 802 is configured to truncate at least part of the trajectories in the traffic flow trajectories based on the intersection region, and take each trajectory segment passing through the intersection region completely after the truncation as an intersection trajectory;
[0128] The clustering unit 803 is configured to divide each intersection trajectory into multiple segments, generate at least one first-type cluster based on the starting segment of each intersection trajectory, and generate at least one second-type cluster based on the ending segment of each intersection trajectory;
[0129] The second determining unit 804 is configured to, for each target first cluster, generate a third cluster based on the intersection of each target second cluster in the at least part of the second clusters and the intersection trajectory corresponding to the target first cluster respectively, and determine a connection line of an intersection from a first road corresponding to the target first cluster to a second road corresponding to the target second cluster based on the intersection trajectory in the third cluster.
[0130] In an embodiment, the clustering unit 803 is configured to generate at least one first cluster based on the start segments of the intersection trajectories, including:
[0131] The clustering unit 803 is configured to take the distance between the start points of the start segments as a first similarity, cluster the start segments based on the first similarities, and generate the first clusters.
[0132] The clustering unit 803 is configured to generate at least one second cluster based on the end segments of the intersection trajectories, including:
[0133] The clustering unit 803 is configured to take the distance between the end points of the end segments as a second similarity, cluster the end segments based on the second similarities, and generate the second clusters.
[0134] In an embodiment, the clustering unit 803 is configured to cluster the start segments based on the first similarities, and generate the first clusters, including:
[0135] The start segments are clustered into a plurality of fourth clusters, and the first similarity between any two start segments in the fourth cluster is less than a first threshold value;
[0136] At least part of the fourth clusters is aggregated to generate the first clusters, and the first similarity between any two start segments in the first cluster is less than a second threshold value, and the second threshold value is greater than the first threshold value;
[0137] The clustering unit 803 is configured to cluster the end segments based on the second similarities, and generate the second clusters, including:
[0138] The end segments are clustered into a plurality of fifth clusters, and the second similarity between any two end segments in the fifth cluster is less than a first threshold value;
[0139] At least part of the fifth clusters is aggregated to generate the second clusters, and the second similarity between any two end segments in the second cluster is less than a second threshold value.
[0140] In an embodiment, the clustering unit 803 is configured to aggregate at least part of the fourth clusters, including:
[0141] The clustering unit 803 is configured to remove the fourth type cluster whose number of trajectories is equal to the preset number from each fourth type cluster, and perform an aggregation processing on the remaining fourth type clusters;
[0142] The clustering unit 803 is configured to perform an aggregation processing on at least part of the fifth type clusters, including:
[0143] The clustering unit 803 is configured to remove the fifth type cluster whose number of trajectories is equal to the preset number from each fifth type cluster, and perform an aggregation processing on the remaining fifth type clusters.
[0144] In an embodiment, the first type cluster and the second type cluster each include a trajectory index of a corresponding intersection trajectory;
[0145] The second determining unit 804 is configured to generate the third type cluster including:
[0146] The second determining unit 804 is configured to generate the third type cluster from an intersection of each trajectory index in the target second type cluster and each trajectory index in the target first type cluster.
[0147] In an embodiment, the second determining unit 804 is further configured:
[0148] Determine an initial driving direction of each intersection trajectory in the third type cluster;
[0149] Determine a target driving direction of the third type cluster and the intersection connection line as the initial driving direction with the largest number in each initial driving direction.
[0150] In an embodiment, the second determining unit 804 is configured to determine the intersection connection line from a first road corresponding to the target second type cluster to a second road corresponding to the target second type cluster, including:
[0151] Determine an intersection plane of the intersection region based on the trajectory points in each intersection trajectory;
[0152] Divide the intersection plane into a grid with a preset size;
[0153] Determine a sum of densities of each grid passed by each intersection trajectory in the third type cluster;
[0154] Generate the intersection connection line based on a target intersection trajectory corresponding to a maximum value in each sum of densities.
[0155] In an embodiment, the second determining unit 804 is configured to generate the intersection connection line, including:
[0156] The second determining unit 804 is configured to take the target intersection trajectory as the intersection connection line.
[0157] In an embodiment, the second determining unit 804 is configured to generate the intersection connection line, including:
[0158] The second determining unit 804 is configured to determine the intersection connection line based on the trajectory segments of the target intersection trajectory except the starting segment and the ending segment.
[0159] It should be noted that other aspects and specific details of the intersection connection line generation apparatus provided by the embodiments of the present application are the same as or similar to the intersection connection line generation method described above, and will not be described here.
[0160] The embodiments of the present application also provide a computer device, which comprises a memory and a processor, and the memory stores a computer program, and the processor executes the computer program to realize the intersection connection line generation method as Figure 1 or Figure 7 described above.
[0161] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the intersection connection line generation method as Figure 1 or Figure 7 described above.
[0162] The embodiments of the present application also provide a computer program product, which comprises computer program / instructions, and the computer program / instructions are executed by a processor to realize the intersection connection line generation method as Figure 1 or Figure 7 described above.
[0163] The above is only some of the embodiments of the present application, and does not limit the present application in any form, the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of simple modifications, equivalent changes and modifications within the technical range disclosed by the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.
Claims
1. A method for generating intersection connectors, characterized in that, include: Based on the target intersection elements detected by the vehicle, an intersection region is generated; wherein, the target intersection elements include stop lines and / or sidewalks, the stop lines or sidewalks in the target intersection elements are extended to obtain a coarse intersection envelope, and the coarse intersection envelope is determined as the intersection region; Based on the intersection area, at least a portion of the vehicle flow trajectory detected by the vehicle is truncated, and each trajectory segment that completely passes through the intersection area after truncation is taken as the intersection trajectory. Each intersection trajectory is divided into multiple segments, and at least one first cluster is generated based on the starting segment of each intersection trajectory, and at least one second cluster is generated based on the ending segment of each intersection trajectory. For each target first cluster in each first cluster, a third cluster is generated based on the intersection of the intersection trajectories corresponding to each target second cluster in at least a portion of the second clusters and the target first cluster, and an intersection connection line from the first road corresponding to the target first cluster to the second road corresponding to the target second cluster is determined based on the intersection trajectory in the third cluster.
2. The generation method according to claim 1, characterized in that, At least one first-class cluster is generated based on the starting segment of the trajectory at each intersection, including: Using the distance between the starting points of each of the starting segments as the first similarity, each of the starting segments is clustered based on the first similarity to generate each first cluster; At least one second-class cluster is generated based on the ending segment of the trajectory at each intersection, including: Using the distance between the end points of each of the said end segments as the second similarity, each of the said end segments is clustered based on the second similarity to generate each of the second clusters.
3. The generation method according to claim 2, characterized in that, Based on the first similarity, each of the starting segments is clustered to generate each of the first clusters, including: Each of the starting segments is clustered into multiple fourth clusters, and the first similarity between any two starting segments in the fourth cluster is less than a first threshold. At least a portion of the fourth clusters are aggregated to generate each first cluster, wherein the first similarity between any two starting segments in the first cluster is less than a second threshold, and the second threshold is greater than the first threshold. Based on the second similarity, each of the ending segments is clustered to generate each of the second clusters, including: Each of the said ending segments is clustered into multiple fifth clusters, and the second similarity between any two of the said ending segments in the fifth cluster is less than the first threshold. At least a portion of the fifth clusters are aggregated to generate each of the second clusters, wherein the second similarity between any two ending segments in the second cluster is less than the second threshold.
4. The generation method according to claim 3, characterized in that, Aggregation processing is performed on at least a portion of the fourth type of clusters, including: Remove a number of fourth-category clusters equal to a preset number from each of the fourth-category clusters, and then perform aggregation processing on the remaining fourth-category clusters; Aggregation processing is performed on at least a portion of the fifth type of clusters, including: Remove the fifth clusters from each of the fifth clusters with a number of trajectories equal to the preset number, and then perform aggregation processing on the remaining fifth clusters.
5. The generation method according to claim 1, characterized in that, Both the first cluster and the second cluster include trajectory indexes for the corresponding intersection trajectories; The generation of the third type of cluster includes: The third cluster is generated by the intersection of each trajectory index in the second target cluster and each trajectory index in the first target cluster.
6. The generation method according to claim 1, characterized in that, Also includes: Determine the initial driving direction of the trajectory at each intersection in the third cluster; The initial driving direction with the most occurrences among all the initial driving directions is determined as the target driving direction of the third cluster and the intersection connection line.
7. The generation method according to any one of claims 1-6, characterized in that, Determining the intersection connection line from the first road corresponding to the first target cluster to the second road corresponding to the second target cluster includes: Based on the trajectory points in each of the intersection trajectories, the intersection plane of the intersection area is determined; The intersection plane is divided into a grid of preset size; Determine the sum of the densities of each of the grids traversed by the trajectory of each intersection in the third cluster; The intersection connection line is generated based on the target intersection trajectory corresponding to the maximum value among the sums of the densities.
8. The generation method according to claim 7, characterized in that, Generating the intersection connection line includes: The trajectory of the target intersection is used as the intersection connection line.
9. The generation method according to claim 7, characterized in that, Generating the intersection connection line includes: Based on the trajectory segments other than the starting segment and the ending segment among the multiple segments of the target intersection trajectory, the intersection connecting line is determined.
10. A device for generating intersection connecting lines, characterized in that, include: The generation unit is configured to generate an intersection region based on the target intersection elements detected by the vehicle; wherein the target intersection elements include a stop line and / or a pedestrian crossing, the stop line or the pedestrian crossing in the target intersection elements is extended to obtain a coarse intersection envelope, and the coarse intersection envelope is determined as the intersection region; The first determining unit is configured to truncate at least a portion of the vehicle flow trajectory detected by the vehicle based on the intersection area, and to take each trajectory segment that completely passes through the intersection area after truncation as the intersection trajectory. A clustering unit is configured to divide each intersection trajectory into multiple segments, generate at least one first cluster based on the starting segment of each intersection trajectory, and generate at least one second cluster based on the ending segment of each intersection trajectory. The second determining unit is configured to, for each target first cluster in each first cluster, generate a third cluster based on the intersection of the intersection trajectories corresponding to each target second cluster and the target first cluster in at least a portion of the second clusters, and determine an intersection connection line from the first road corresponding to the target first cluster to the second road corresponding to the target second cluster based on the intersection trajectory in the third cluster.
Citation Information
Patent Citations
Road generation method, electronic device and storage medium
CN112579924A
Method and device for generating topological structure of road intersection
CN116363856A