A road left-turn guide line optimization design method based on vehicle trajectory data

By analyzing vehicle trajectory data and vehicle types, polynomial fitting technology is used to correct the left-turn guide line, which solves the problem of lack of adaptability and deviation in left-turn guide line design in the existing technology, improves traffic safety and traffic efficiency, and is suitable for many applications. types of intersections.

CN118470976BActive Publication Date: 2024-09-13JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410918460.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-09-13
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

The existing technology fails to fully consider the behavioral habits of traffic participants and the width differences of different vehicle types when designing left-turn guide lines, resulting in a lack of adaptability in the design of left-turn guide lines, which may lead to side collision accidents and cannot be effectively applied to different vehicles. Regular intersection.

Method used

By using historical vehicle trajectory big data, we calculate the overlap density of vehicle trajectory data, analyze driver behavior habits, and combine the width of different vehicle types, use video data processing and vehicle detection models to determine the left turn guidance area and guidance line, and perform polynomial Fit to correct the guide line to ensure that the guide line conforms to human factors engineering principles.

Benefits of technology

This method can solve the problem of left-turn guide line deviation caused by different vehicle models, improve the traffic efficiency of left-turn vehicles, ensure traffic safety at intersections, and is suitable for standard intersections and irregular intersections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470976B
    Figure CN118470976B
Patent Text Reader

Abstract

The present invention belongs to the technical field of road intersection channelization, and relates to a road left-turn guide line optimization design method based on vehicle trajectory data. The method uses historical vehicle trajectory big data, analyzes the behavior habits of left-turn vehicle drivers by calculating the coincidence density of vehicle trajectory data, and comprehensively considers the influence of the behavior habits of left-turn vehicle drivers and the width of different vehicle types on the left-turn guide line when designing the left-turn guide line, that is, the left-turn guide area is determined according to the pixel density, the left-turn guide line is determined according to the left-turn guide area, and then the left-turn guide line is corrected according to the vehicle type data, so as to determine the final left-turn guide line. The method is more in line with human factor engineering, has universality, can solve the deviation problem of left-turn guide lines caused by different vehicle models, ensure the traffic efficiency of left-turn vehicles, and ensure the traffic safety of intersections.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of road intersection channelization; specifically, it relates to a road left-turn guide line optimization design method based on vehicle trajectory data. Background Art

[0002] The "Standards for Setting Traffic Signs and Markings on Urban Roads" (GB51038-2015) states that "intersection guide lines should be set up when the intersection is large, the traffic organization is complex, or the traffic flow conflicts are serious." Left-turn intersection guide lines are used to regulate the driving order of left-turning vehicles at intersections, and play a good auxiliary role in the normal passage of complex road intersections.

[0003] At present, there are few studies on the design methods of left-turn guide lines. At present, the design of left-turn guide lines usually refers to the "Urban Road Traffic Signs and Markings Setting Specifications" (GB51038-2015), but there is no specific design method in the specifications. Most of them rely on the experience of designers and construction personnel, as well as static geometric calculations. For example, the patent with publication number CN 105568802 A uses the geometric parameters of the intersection for design. This design method is limited to cross intersections. The design of left-turn guide lines does not fully consider the behavioral habits of traffic participants, and left-turning vehicles may cause unnecessary traffic accidents such as side collisions. For irregular intersections, left-turn guide lines that meet the linear requirements cannot be designed according to standard specifications, and this design method lacks adaptability.

[0004] The current specification "Highway Route Design Specification" (JTGD20-2017) "10.4 Turning Design" proposes the design principle that "the linear shape and road width of the plane intersection turning curve should be determined according to the turning trajectory of the design vehicle", but still does not give a specific method. Although some studies have proposed using the vehicle driving trajectory to set the left turn guide line, such as the patent with publication number CN 117286751 A, the vehicles waiting to turn left are divided into three areas, and the trajectory with the shortest sum of the travel time from the detection line to the exit stop line of two consecutive vehicles is selected for fitting and translation to obtain the left turn guide lines of different areas. However, this method is based on the intersection with the left turn waiting area, and cannot be well applied to the intersection without the left turn waiting area, and it does not consider the deviation of the left turn intersection guide line caused by the different widths of different vehicle types. Therefore, it is necessary to provide a universal left-turn guide line optimization design method that complies with the current specification design principle that "the line shape and road width of the flat intersection turning curve should be determined according to the turning trajectory of the design vehicle", so as to solve the deviation problem of the left-turn guide line caused by different vehicle models, ensure the traffic efficiency of left-turn vehicles, and ensure traffic safety at the intersection. Summary of the invention

[0005] In view of the above technical problems and defects, the purpose of the present invention is to provide a road left-turn guide line optimization design method based on vehicle trajectory data. The method uses historical vehicle trajectory big data to analyze the behavior habits of left-turn vehicle drivers by calculating the overlap density of vehicle trajectory data. When designing the left-turn guide line, the behavior habits of left-turn vehicle drivers and the influence of the width of different vehicle types on the left-turn guide line are comprehensively considered. The method is more in line with ergonomics, has universality, can solve the deviation problem of left-turn guide lines caused by different vehicle models, ensure the traffic efficiency of left-turn vehicles, and ensure traffic safety at intersections.

[0006] To achieve the above object, the present invention adopts the following technical solution:

[0007] A method for optimizing the design of a road left-turn guide line based on vehicle trajectory data, the method comprising the following steps:

[0008] Step S1: Shoot a video of the road turning intersection area, process the video data, and obtain a video clip of the vehicle turning left;

[0009] Step S2: using the left-turning video clip of the vehicle to identify the vehicle type, extracting the vehicle driving trajectory and converting the extracted vehicle driving trajectory into real coordinates;

[0010] Step S3: determining the vehicle left turn guide area according to the vehicle driving trajectory;

[0011] Step S3.1: Calculation of the density of each pixel in the vehicle driving area

[0012] The lane lines and vehicle trajectories in the world coordinate system are scaled to the two-dimensional plane at the same scale to establish the intersection Coordinate system; initialize the pixels in the entire plane area U , is the horizontal coordinate of the pixel point, is the vertical coordinate of the pixel point, The number of times a pixel is driven by a vehicle, the default value is 0. It is the density of pixels, the default value is 0;

[0013] The scaled and coordinate-converted vehicle trajectory is plotted on the plane area U, and the vehicle trajectory is fitted with a quadratic polynomial using the least squares method. , use the least square method to perform linear fitting and solve the driving trajectory curve of the left-turning vehicle;

[0014] Take each point on the solved driving trajectory curve as the midpoint, draw a line segment of length W in the normal direction, connect the end points on the same side of the obtained line segment, and form two outer edge curves of the left-turn vehicle driving area. The vehicle's left-turn driving area is determined based on the two outer edge curves; according to the pixel points of the plane area U for all vehicles' left-turn driving areas The values ​​are superimposed to obtain the final value;

[0015] Step S3.2: determining a left-turn guide area according to pixel density;

[0016] Calculate the value, , The total number of vehicles is the area formed by the pixels with a density greater than 50% as the left-turn guide area, and the pixels in the left-turn guide area form set B;

[0017] Step S4: determining a left turn guide line according to the left turn guide area;

[0018] Step S4.1: Edge fitting of the left-turn guide area

[0019] There are two left-turn lanes. In the area composed of , select pixels that meet the following conditions from set B: same, is the maximum value; when same, is the minimum value, forming a set D; using a cubic polynomial The pixel points in set D are fitted with the inner starting point SP1 of the first left-turn entrance lane and the inner end point TP1 of the first left-turn exit lane to find the optimal solution, and the inner left-turn guide line is obtained; where a, b, c, and d are all constants; the line where the outermost left-turn entrance lane line is located is axis, with the line where the stop line of the outermost left-turn entrance lane is located as axis, Indicates the width of the first left-turn entrance lane on the inside. Indicates the width of the second left-turn entrance lane on the inside; Indicates the first left turn exit lane inner end point The distance between the axes, Indicates the first left turn exit lane inner end point The distance between the axes;

[0020] exist In the area composed of , select pixels that meet the following conditions from set B: same, is the minimum value; when same, is the maximum value, forming a set E; using a cubic polynomial The pixel points in set E are fitted with the outer starting point SP2 of the second left-turn entrance road and the outer end point TP2 of the second left-turn exit road to obtain the optimal solution, and the outer left-turn guide line is obtained; wherein, Indicates the outer end of the second left turn exit lane to The distance between the axes, Indicates the outer end of the second left turn exit lane to The distance between the axes;

[0021] Compare the inner and outer left-turn guide lines with the vehicle's left-turn driving area, count the number of vehicles that exceed the left-turn guide lines by type, and divide the total number of vehicles of the corresponding type to obtain the ratio ,when q Within the threshold range, it is determined that the left-turn guide line meets the requirements, otherwise it is necessary to execute step S4.2;

[0022] Step S4.2: Correction of the left-turn guide line;

[0023] Determine whether the number of vehicles of different types is balanced. If not, determine whether the number of left-turn videos of vehicles of different types can be increased to make the number of left-turn videos of vehicles of different types balanced. If so, increase the number of left-turn videos of vehicles and execute steps S2 to S4. Otherwise, execute step S3.1 to recalculate the density of each pixel in the vehicle driving area or execute step S3.2 to re-determine the left-turn guide area to correct the left-turn guide line to meet the requirements.

[0024] When recalculating the density of each pixel in the vehicle driving area, the pixel points in the vehicle left turning driving area formed by a large number of vehicle types are Value +1, for the pixels in the left-turn zone formed by a small number of vehicles of the same type value + n, n>1;

[0025] When redefining the left-turn guide area, lower the pixel density selection condition of the left-turn guide area and control it within 30-50%.

[0026] As a preferred embodiment of the present invention, a left turn guide line is further provided between the inner left turn guide line and the outer left turn guide line, and the specific design method is: make a straight line through SP1, SP2 and intersect the straight line through TP1, TP2 at point M, and make m rays from point M to the fan-shaped area formed by the two straight lines, m is usually 5-10, and the intersection points of the m rays and the inner left turn guide line and the outer left turn guide line constitute a set H={(P11,P12),(P21,P22),……,(Pm1,Pm2)}; take the midpoint of the line segment (Pm1, Pm2) to form a set F; use a cubic polynomial to fit the pixel points in the set F with the outer starting point SP of the first left turn entrance road and the outer end point TP of the first left turn exit road to obtain the optimal solution.

[0027] As a preferred embodiment of the present invention, the specific steps of step S2 are as follows:

[0028] Step S2.1: Detect the vehicle using the improved vehicle detection model to determine the vehicle type;

[0029] Step S2.2: Extract the left-turn vehicle trajectories and bind them to the vehicle types one by one to obtain a vehicle set , is the number of vehicles. Each vehicle element in the vehicle set contains a vehicle type and a series of pixel positions. , Represents the vehicle type; The vehicle trajectory pixels;

[0030] Step S2.3: Coordinate conversion of the left-turn vehicle's driving trajectory. The calculation formula between any point in the world coordinate system and the corresponding point in the pixel coordinate system is:

[0031] ;

[0032] In the formula, Represents the coordinates of a point in the world coordinate system, Represents the coordinates of the point in the camera coordinate system. Represents the coordinates of the point in the pixel coordinate system. is the internal parameter of the camera; It is the camera external parameter, which is determined by the position of the camera in the world coordinate system.

[0033] As a preferred embodiment of the present invention, the improved vehicle detection model is obtained by training the E-RT-DETR model, and the E-RT-DETR model adopts the EfficientViT Backbone module; before model training, the vehicles are classified according to their body widths, and the relationship between vehicle type and vehicle width is redefined to produce a vehicle target data set; then the vehicle target data set is divided into a training set and a validation set, and the E-RT-DETR model is trained using the training set and the validation set, thereby obtaining an improved vehicle detection model.

[0034] As a preferred embodiment of the present invention, the steps of step S2.2 are as follows:

[0035] Step S2.2.1: Input the vehicle left turn video data into the improved vehicle detection model and read the frame image of the video;

[0036] Step S2.2.2: Perform E-RT-DETR vehicle detection on the frame image. If it is the first frame image, initialize the Kalman filter tracker and execute step S2.2.3;

[0037] Step S2.2.3: Calculate the detection box and prediction box based on Mahalanobis distance and measure the appearance feature similarity based on cosine distance;

[0038] Step S2.2.4: Perform weighted fusion correlation matrix operation and Hungarian algorithm matching on the output of step S2.2.3 in sequence; if the cascade matching and IoU matching are successful, output the vehicle trajectory and determine whether the read frame image is the last frame. If it is the last frame, end the task, otherwise continue to read the next frame and execute step S2.2.3; if the cascade matching and IoU matching are unsuccessful, determine whether the target has left the screen. If it has not left the screen, it is determined that the target appears for the first time, initialize a new Kalman filter tracker and execute step S2.2.3.

[0039] Advantages and beneficial effects of the present invention:

[0040] (1) The method provided by the present invention utilizes historical vehicle trajectory big data and analyzes the behavior habits of left-turn vehicle drivers by calculating the overlap density of vehicle trajectory data. When designing the left-turn guide line, the behavior habits of left-turn vehicle drivers and the influence of the width of different vehicle types on the left-turn guide line are comprehensively considered. This method is more in line with human factors engineering and can solve the deviation problem of left-turn guide lines caused by different vehicle models, thereby ensuring the traffic efficiency of left-turn vehicles and ensuring traffic safety at intersections.

[0041] (2) The method provided by the present invention combines the E-RT-DETR algorithm with the DeepSORT algorithm, uses E-RT-DETR to detect vehicles, determines the type of vehicles in the image, and then binds the vehicle types to the generated vehicle trajectories one by one to obtain a vehicle set. This method can realize multi-target vehicle trajectory extraction, and the determination of vehicle types is conducive to the subsequent correction of the left-turn guide line.

[0042] (3) The method provided by the present invention calculates the trajectory overlap density based on the extracted vehicle trajectory lines and vehicle widths, selects the area with a trajectory overlap density greater than 50% as the left-turn guide area, and performs fitting correction on the edge of the left-turn guide area to finally obtain the left-turn guide line. The left-turn guide line fitted by this method better meets the linear requirements of the intersection guide line, and is applicable to both standard cross intersections and irregular intersections with left-turn waiting areas, and is universal. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] By referring to the following description in conjunction with the accompanying drawings, and with a more comprehensive understanding of the present invention, other objects and results of the present invention will become more apparent and easy to understand. In the accompanying drawings:

[0044] Figure 1 It is a flow chart of the left-turn guide line optimization design method based on vehicle trajectory data of the present invention;

[0045] Figure 2 The vehicle trajectory extraction flow chart of the present invention;

[0046] Figure 3 For standard intersections Coordinate system diagram;

[0047] Figure 4 This is a schematic diagram of the left-turn driving area for left-turning vehicles;

[0048] Figure 5 It is a schematic diagram of the left-turn guide area with a pixel density greater than 50%;

[0049] Figure 6 A schematic diagram of a left-turn guide line determined by edge fitting of a left-turn guide area at a standard crossroad;

[0050] Figure 7 The diagram is a schematic diagram of a left-turn guide line determined by edge fitting of a left-turn guide area at an irregular intersection with a left-turn waiting area. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the technical solution and advantages of the present invention, the present application is described in detail below in conjunction with the accompanying drawings, but it is not intended to limit the protection scope of the present invention.

[0052] like Figures 1 to 6 As shown, this embodiment provides a left-turn guide line optimization design method based on vehicle trajectory data, the method comprising the following steps:

[0053] Step S1: Shoot a video of the road turning intersection area, process the video data, and obtain a video clip of the vehicle turning left. The specific steps are as follows:

[0054] Step S1.1: Video data acquisition

[0055] Use drones to shoot videos of road turning intersections to ensure that the drone's flight line position is consistent and the flight is stable. In order to fully reflect the left turn situation of vehicles at intersections, the data collection process should fully consider and collect video data under various traffic scenarios.

[0056] Step S1.2: Data preprocessing

[0057] For the intersection video data taken by drones, we will review the video content and use professional editing software to locate and separate the continuous video clips of vehicles turning left. We will then perform optimization processing such as adjusting color and removing noise to improve the video quality. The processed video clips will be used to extract the trajectories of left-turning vehicles.

[0058] Step S2: using the left-turning video clip of the vehicle to identify the vehicle type, extracting the vehicle driving trajectory and converting the extracted vehicle driving trajectory into real coordinates;

[0059] In this embodiment, computer vision technology is used to distinguish vehicle types and extract vehicle driving trajectories and convert them into real coordinates. The specific steps are as follows:

[0060] Step S2.1: Detect vehicles using the improved vehicle detection model

[0061] Step S2.1.1: Improve the RT-DETR (Real-Time DEtection TRansformer) target detection model;

[0062] Specifically, the original Backbone part of the RT-DETR model is replaced with the EfficientViT Backbone, thereby improving the efficiency and effect of the model in processing images and reducing the computational cost. The improved model is E-RT-DETR.

[0063] Step S2.1.2: Classification of left-turn vehicle types

[0064] According to the width of the vehicle, a vehicle target data set is prepared. Vehicles can be divided into N categories. For simplicity and practicality, this embodiment divides vehicles into 3 categories, which are recorded as , redefine the relationship between vehicle type and vehicle width, as shown in the following table:

[0065] type Realistic vehicle width Redefine vehicle width <![CDATA[C1(Small Car)]]> <2050mm <![CDATA[1900mm, denoted as W1]]> <![CDATA[C2(Medium Car)]]> 2050mm-2350mm <![CDATA[2200 mm, denoted as W2]]> <![CDATA[C3(Big car)]]> >2350mm <![CDATA[2500mm, denoted as W3]]>

[0066] Among them, the vehicle width is redefined as , corresponding to the vehicle types respectively.

[0067] Step S2.1.3: training the improved E-RT-DETR target detection model to obtain an improved vehicle detection model;

[0068] Specifically, the vehicle target data set mentioned in step S2.1.2 is divided into a training set and a validation set. The training set and the validation set are used to train the E-RT-DETR target detection model to determine the optimal weight parameters of the model.

[0069] Step S2.2: Extract the left-turn vehicle trajectory

[0070] This embodiment combines the E-RT-DETR algorithm with the DeepSORT algorithm to complete multi-target vehicle trajectory extraction. The specific process is as follows: Figure 2 As shown, the following steps are included:

[0071] Step S2.2.1: Input the vehicle left turn video data into the trained E-RT-DETR model (improved vehicle detection model) and read the frame image of the video;

[0072] Step S2.2.2: Perform E-RT-DETR vehicle detection on the frame image. If it is the first frame image, initialize the Kalman filter tracker and execute step S2.2.3;

[0073] Step S2.2.3: Calculate the detection box and prediction box based on Mahalanobis distance and measure the appearance feature similarity based on cosine distance;

[0074] Step S2.2.4: Perform weighted fusion correlation matrix operation and Hungarian algorithm matching on the output of step S2.2.3 in sequence; if the cascade matching and IoU matching are successful, output the vehicle trajectory and determine whether the read frame image is the last frame. If it is the last frame, end the task, otherwise continue to read the next frame and execute step S2.2.3; if the cascade matching and IoU matching are unsuccessful, determine whether the target has left the screen. If it has not left the screen, it is determined that the target appears for the first time, initialize a new Kalman filter tracker and execute step S2.2.3.

[0075] In this embodiment, by performing E-RT-DETR vehicle detection on the frame image, the vehicle type in the image can be determined and bound one by one with the vehicle trajectory generated later. Therefore, a vehicle set can be obtained through the above steps. , is the number of vehicles. Each vehicle element in the vehicle set contains a vehicle type and a series of pixel positions. , Represents the vehicle type; is the trajectory of the vehicle Pixels.

[0076] Step S2.3: Left-turn vehicle trajectory coordinate conversion

[0077] The vehicle's position information in the camera image is represented in the form of pixel coordinates, which cannot be directly used to analyze the vehicle's driving trajectory in the real world. Represents the coordinates of a point in the world coordinate system, Represents the coordinates of the point in the camera coordinate system. Represents the coordinates of the point in the pixel coordinate system. The calculation formula between any point in the world coordinate system and the corresponding point in the pixel coordinate system is:

[0078] ;

[0079] In the formula, is the internal parameter of the camera; is the camera extrinsic parameter, which is determined by the position of the camera in the world coordinate system; thus, the trajectory transformation between the pixel coordinate system and the world coordinate system can be obtained.

[0080] Step S3: determining the vehicle left turn guide area according to the vehicle driving trajectory;

[0081] In this embodiment, in a two-dimensional coordinate system, the number of times each pixel point is traveled by a vehicle is determined, thereby obtaining the density of the pixel points and further determining the left-turn guide area. The specific steps are as follows:

[0082] Step S3.1: Calculation of the density of each pixel in the vehicle driving area

[0083] The driving behavior of left-turn drivers is reflected in the turning radius and lane selection of the vehicle. The density of vehicle driving trajectories can reflect the driving habits of left-turn drivers as a whole. Therefore, the lane lines and vehicle trajectories in the world coordinate system are scaled to the two-dimensional plane at the same ratio to establish the intersection. Coordinate system, taking a standard intersection with two left-turn lanes as an example, Figure 3 As shown in the figure, the line where the outermost left-turn entrance lane is located is Axis, with the straight line where the entrance stop line is located as axis, Indicates the width of the first left-turn entrance lane on the inside. It indicates the width of the second left-turn entrance on the inside, and so on; Indicates the first left turn exit lane inner end point The distance between the axes, Indicates the first left turn exit lane inner end point Axis distance.

[0084] Initialize the pixels in the entire plane area U , is the horizontal coordinate of the pixel point, is the vertical coordinate of the pixel point, The number of times a pixel is driven by a vehicle, the default value is 0. The density of pixels. The default value is 0.

[0085] The scaled and coordinate-converted vehicle trajectory is plotted on the plane area U, and a quadratic polynomial is fitted to the trajectory using the least squares method. , use the least squares method to perform linear fitting, that is, estimate In .

[0086] ;

[0087] In the formula, In the plane area U x The average value of In the plane area U y The average value of In the plane area U xy The average value of In the plane area U x 2 The average value of In the plane area U x 3 The average value of In the plane area U x 4 The average value of .

[0088] In this embodiment, the driving trajectory curve of the left-turning vehicle is obtained by the above method. Then, each point on the trajectory curve is taken as the midpoint, and a line segment with a length of W is drawn in the normal direction. The end points on the same side of the obtained line segment are connected, so as to form two outer edge curves of the vehicle driving area. The two outer edge curves and the straight line The area formed by the Y axis is the left-turn driving area of ​​the vehicle (such as Figure 4 as shown).

[0089] The pixels of this area The values ​​are superimposed, that is ; Execute all left-turn vehicle trajectories according to the above steps, and the final value.

[0090] Step S3.2: Determine the left-turn guide area based on pixel density

[0091] Calculate the value of each pixel in the plane area U value, , For the total number of vehicles, the area formed by the pixel points with a density greater than 50% is set as the left-turn guiding area (also called the left-turn guidance area), and the points in this area constitute the set B.

[0092] like Figure 5 As shown, the pixel density in the area is greater than 50%.

[0093] Step S4: Determine the left turn guide line according to the left turn guide area

[0094] Step S4.1: Edge fitting of the left-turn guide area

[0095] exist In the area composed of , select pixels that meet the following conditions from set B: same, is the maximum value; when same, is the minimum value, forming a set D; using a cubic polynomial The pixel points in set D are fitted with the inner starting point SP1 of the first left-turn entrance lane and the inner end point TP1 of the first left-turn exit lane to find the optimal solution, so as to obtain the inner left-turn guide line of the first left-turn lane (such as Figure 3 , Figure 6 shown);

[0096] exist In the area composed of , select pixels that meet the following conditions from set B: same, is the minimum value; when same, is the maximum value, forming a set E; using a cubic polynomial The pixel points in set E are fitted with the outer starting point SP2 of the second left-turn entrance lane and the outer end point TP2 of the second left-turn exit lane to find the optimal solution, and the outer left-turn guide line of the second left-turn lane (such as Figure 6 shown); where, Indicates the outer end of the second left turn exit lane to The distance between the axes, Indicates the outer end of the second left turn exit lane to Axis distance.

[0097] The method provided in this embodiment is also applicable to irregular intersections with a left-turn waiting area. In actual operation, an inner left-turn guide line can be set at the innermost side of the left-turn lane at the intersection, and an outer left-turn guide line can be set at the outermost side; of course, a left-turn guide line can also be set between the inner left-turn guide line and the outer left-turn guide line. The following is an example of an irregular intersection with a left-turn waiting area:

[0098] like Figure 7 As shown, according to the above method, inner and outer left-turn guide lines are made respectively, and a straight line passing through SP1 and SP2 intersects with a straight line passing through TP1 and TP2 at point M. From point M, m rays (m is usually 5-10) are made in the fan-shaped area formed by the two straight lines, intersecting the inner and outer left-turn guide lines at the set H={(P11, P12), (P21, P22), ..., (Pm1, Pm2)}; the midpoints of the line segments (Pm1, Pm2) are taken to form a set F; a cubic polynomial is used to fit the pixel points in the set F with the outer starting point SP of the first left-turn entrance lane and the outer end point TP of the first left-turn exit lane (also called the inner end point of the second left-turn exit lane) to obtain the optimal solution, and the left-turn guide line of the irregular intersection with a left-turn waiting area is obtained.

[0099] When the above method provided by the present invention is actually used, the left turn guide line may not meet the requirements of large vehicles turning left well because there are too many vehicle tracks of Small cars and too few vehicle tracks of Medium cars and Big cars. Therefore, it is necessary to compare the obtained left turn guide line with the vehicle left turn driving area formed by Medium cars and Big cars, and divide the number of Medium cars and Big cars that exceed the left turn guide line by the total number of Medium cars and Big cars to obtain a ratio. ,when (adjusted according to actual conditions), it is determined that the left-turn guide line meets the requirements, otherwise it is necessary to execute step S4.2;

[0100] Step S4.2: Correction of left turn guide line

[0101] Determine whether the number of the three types of vehicles is balanced. If not, determine whether the number of left-turn videos of Medium Car and Big car vehicles can be increased to balance with the number of left-turn videos of Small car vehicles. If so, increase the number of left-turn videos of Medium Car and Big car vehicles and execute steps S2 to S4; otherwise, execute step S3.1 to recalculate the pixel density of the vehicle driving area or execute step S3.2 to redefine the left-turn guide area to correct the left-turn guide line to meet the requirements.

[0102] In this embodiment, when recalculating the density of each pixel in the vehicle driving area, the weight of the pixels in the vehicle left turning driving area formed by the Medium Car and the Big Car is increased; specifically, the pixel points in the vehicle left turning driving area formed by each Small car are The value is +1, and the pixel points in the left-turn driving area formed by the Medium Car and the Big Car value + n (n>1, can be determined according to actual conditions);

[0103] When redefining the left-turn guiding area, the pixel density selection condition of the left-turn guiding area is lowered (usually controlled at 30-50%); specifically, by controlling the selection density of the left-turn guiding area, the number and position of the pixels entering the B set are controlled, that is: by lowering the pixel density condition, the number of pixels entering the B set is increased, so that the position of the pixels in the set D is further outward than before (without lowering the density selection condition) (assuming that the direction of expanding the left-turn guiding area is outside, and the direction of shrinking the left-turn guiding area is inside).

[0104] This embodiment uses the above method to correct the left-turn guide line, and then compares the corrected left-turn guide line with the vehicle left-turn driving area formed by the Medium Car and the Big Car, and divides the number of vehicles that exceed the left-turn guide line by the total number of Medium Car and Big Car vehicles to obtain a ratio ,when (Adjust according to actual situation) when the correction is deemed to be completed.

[0105] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art of the present invention, according to the idea of ​​the present invention, some simple deductions, deformations or substitutions can be made. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A road left-turn guide line optimization design method based on vehicle trajectory data, characterized in that: The method comprises the following steps: Step S1: Shoot a video of the road turning intersection area, process the video data, and obtain a video clip of the vehicle turning left; Step S2: using the left-turning video clip of the vehicle to identify the vehicle type, extracting the vehicle driving trajectory and converting the extracted vehicle driving trajectory into real coordinates; Step S3: determining the vehicle left turn guide area according to the vehicle driving trajectory; Step S3.1: Calculation of the density of each pixel in the vehicle driving area The lane lines and vehicle trajectories in the world coordinate system are scaled to the two-dimensional plane at the same scale to establish the intersection Coordinate system; initialize the pixels in the entire plane area U , is the horizontal coordinate of the pixel point, is the vertical coordinate of the pixel point, The number of times a pixel is driven by a vehicle, the default value is 0. It is the density of pixels, the default value is 0; The scaled and coordinate-converted vehicle trajectory is plotted on the plane area U, and the vehicle trajectory is fitted with a quadratic polynomial using the least squares method. , use the least square method to perform linear fitting and solve the driving trajectory curve of the left-turning vehicle; Take each point on the solved driving trajectory curve as the midpoint, draw a line segment of length W in the normal direction, connect the end points on the same side of the obtained line segment, and form two outer edge curves of the left-turn vehicle driving area. The vehicle's left-turn driving area is determined based on the two outer edge curves; according to the pixel points of the plane area U for all vehicles' left-turn driving areas The values ​​are superimposed to obtain the final value; Step S3.2: determining a left-turn guide area according to pixel density; Calculate the value, , The total number of vehicles is the area formed by the pixels with a density greater than 50% as the left-turn guide area, and the pixels in the left-turn guide area form set B; Step S4: determining a left turn guide line according to the left turn guide area; Step S4.1: Edge fitting of the left-turn guide area There are two left-turn lanes. In the area composed of , select pixels that meet the following conditions from set B: same, is the maximum value; when same, is the minimum value, forming a set D; using a cubic polynomial The pixel points in set D are fitted with the inner starting point SP1 of the first left-turn entrance lane and the inner end point TP1 of the first left-turn exit lane to find the optimal solution, and the inner left-turn guide line is obtained; where a, b, c, and d are all constants; the line where the outermost left-turn entrance lane line is located is axis, with the line where the stop line of the outermost left-turn entrance lane is located as axis, Indicates the width of the first left-turn entrance lane on the inside. Indicates the width of the second left-turn entrance lane on the inside; Indicates the first left turn exit lane inner end point The distance between the axes, Indicates the first left turn exit lane inner end point The distance between the axes; exist In the area composed of , select pixels that meet the following conditions from set B: same, is the minimum value; when same, is the maximum value, forming a set E; using a cubic polynomial The pixel points in set E are fitted with the outer starting point SP2 of the second left-turn entrance road and the outer end point TP2 of the second left-turn exit road to obtain the optimal solution, and the outer left-turn guide line is obtained; wherein, Indicates the outer end of the second left turn exit lane to The distance between the axes, Indicates the outer end of the second left turn exit lane to The distance between the axes; Compare the inner and outer left-turn guide lines with the vehicle's left-turn driving area, count the number of vehicles that exceed the left-turn guide lines by type, and divide the total number of vehicles of the corresponding type to obtain the ratio ,when q Within the threshold range, it is determined that the left-turn guide line meets the requirements, otherwise it is necessary to execute step S4.2; Step S4.2: Correction of the left-turn guide line; Determine whether the number of vehicles of different types is balanced. If not, determine whether the number of left-turn videos of vehicles of different types can be increased to make the number of left-turn videos of vehicles of different types balanced. If so, increase the number of left-turn videos of vehicles and execute steps S2 to S4. Otherwise, execute step S3.1 to recalculate the density of each pixel in the vehicle driving area or execute step S3.2 to re-determine the left-turn guide area to correct the left-turn guide line to meet the requirements. When recalculating the density of each pixel in the vehicle driving area, the pixel points in the vehicle left turning driving area formed by a large number of vehicle types are Value +1, for the pixels in the left-turn zone formed by a small number of vehicles of the same type value + n, n>1; When redefining the left-turn guide area, lower the pixel density selection condition of the left-turn guide area and control it within 30-50%.

2. The method for optimizing the design of left-turn guide lines on a road based on vehicle trajectory data according to claim 1, characterized in that: A left turn guide line is also set between the inner left turn guide line and the outer left turn guide line. The specific design method is: make a straight line through SP1 and SP2 and intersect the straight line through TP1 and TP2 at point M, and make m rays from point M to the fan-shaped area formed by the two straight lines. m is usually 5-10, and the intersection points of the m rays and the inner left turn guide line and the outer left turn guide line constitute a set H={(P11,P12),(P21,P22),……,(Pm1,Pm2)}; take the midpoint of the line segment (Pm1,Pm2) to form a set F; use a cubic polynomial to fit the pixel points in the set F with the outer starting point SP of the first left turn entrance road and the outer end point TP of the first left turn exit road to obtain the optimal solution.

3. The method for optimizing the design of left-turn guide lines on a road based on vehicle trajectory data according to claim 1, characterized in that: The specific steps of step S2 are as follows: Step S2.1: Detect the vehicle using the improved vehicle detection model to determine the vehicle type; Step S2.2: Extract the left-turn vehicle trajectories and bind them to the vehicle types one by one to obtain a vehicle set , is the number of vehicles. Each vehicle element in the vehicle set contains a vehicle type and a series of pixel positions. , Represents the vehicle type; The vehicle trajectory pixels; Step S2.3: Coordinate conversion of the left-turn vehicle's driving trajectory. The calculation formula between any point in the world coordinate system and the corresponding point in the pixel coordinate system is: ; In the formula, Represents the coordinates of a point in the world coordinate system, Represents the coordinates of the point in the camera coordinate system. Represents the coordinates of the point in the pixel coordinate system. is the internal parameter of the camera; It is the camera external parameter, which is determined by the position of the camera in the world coordinate system.

4. The method for optimizing the design of left-turn guide lines on roads based on vehicle trajectory data according to claim 3, characterized in that: In step S2.1, the improved vehicle detection model is obtained by training the E-RT-DETR model, and the E-RT-DETR model adopts the EfficientViT Backbone module; before model training, the vehicles are classified according to their body widths, and the relationship between vehicle type and vehicle width is redefined to create a vehicle target data set; then the vehicle target data set is divided into a training set and a validation set, and the E-RT-DETR model is trained using the training set and the validation set to obtain the improved vehicle detection model.

5. The method for optimizing the design of left-turn guide lines on roads based on vehicle trajectory data according to claim 3, characterized in that: The steps of step S2.2 are as follows: Step S2.2.1: Input the vehicle left turn video data into the improved vehicle detection model and read the frame image of the video; Step S2.2.2: Perform E-RT-DETR vehicle detection on the frame image. If it is the first frame image, initialize the Kalman filter tracker and execute step S2.2.3; Step S2.2.3: Calculate the detection box and prediction box based on Mahalanobis distance and measure the appearance feature similarity based on cosine distance; Step S2.2.4: Perform weighted fusion correlation matrix operation and Hungarian algorithm matching on the output of step S2.2.3 in sequence; if the cascade matching and IoU matching are successful, output the vehicle trajectory and determine whether the read frame image is the last frame. If it is the last frame, end the task, otherwise continue to read the next frame and execute step S2.2.3; if the cascade matching and IoU matching are unsuccessful, determine whether the target has left the screen. If it has not left the screen, it is determined that the target appears for the first time, initialize a new Kalman filter tracker and execute step S2.2.3.