Lane line processing method and device, computer device and storage medium
By selecting target images and performing curve fitting and sampling, the problem of lane line error in 3D point cloud acquisition was solved, improving the accuracy and precision of lane lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN DEEPROUTE AI CO LTD
- Filing Date
- 2022-09-08
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, lane lines generated from 3D point cloud acquisition are subject to errors due to obstruction by vehicles or obstacles, resulting in inaccurate lane lines.
By acquiring multiple frames of images and their pose points of the target road segment, the target image is selected based on the road segment features and speed, and the target lane line is generated, including curve fitting and sampling, to reduce errors and improve accuracy.
By reducing the number of images used to generate lane lines, the accuracy and representativeness of lane lines are improved, thus enhancing the accuracy of lane lines.
Smart Images

Figure CN115588174B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving, and in particular to a method, apparatus, computer device, and storage medium for lane line processing. Background Technology
[0002] Autonomous driving relies heavily on semantic maps, which contain traffic element information such as roads, traffic signs, lane lines, and traffic lights, and are used to control vehicle steering, speed, and path planning.
[0003] In traditional technologies, three-dimensional point clouds representing lane lines are collected using devices such as LiDAR. The lane lines in the semantic map are then processed. However, due to obstructions from vehicles or other obstacles, the three-dimensional point clouds may be miscollected, resulting in inaccurate lane lines. Summary of the Invention
[0004] Therefore, it is necessary to provide a lane line processing method, apparatus, computer equipment, and computer-readable storage medium that can improve lane line accuracy in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a lane line processing method. The method includes:
[0006] Acquire multiple frames of images of the target road segment and the pose points corresponding to each frame of the image;
[0007] The road segment characteristics and road segment speed of the target road segment are determined based on the pose points;
[0008] The target image is obtained by selecting from the multiple frames of images based on the road segment features and the road segment speed;
[0009] The target lane lines of the target road segment are generated based on the target image.
[0010] In one embodiment, selecting the target image from the multiple frames of images based on the road segment features and the road segment speed includes:
[0011] If the speed of the target road segment is zero, then one frame is selected from the multiple frames as the target image;
[0012] If the target road segment is a straight road segment and the road segment speed is not zero, then the number of targets is determined based on the road segment speed, and the target number of target images is selected from the multi-frame images;
[0013] If the target road segment is a curved road segment and the road segment speed is not zero, then the multi-frame images are used as the target images.
[0014] In one embodiment, generating the target lane lines for the target road segment based on the target image includes:
[0015] Obtain the set of three-dimensional sampling points corresponding to each frame of the target image;
[0016] The individual three-dimensional sampling points are collected and combined into a fused sampling point set;
[0017] Curve fitting and sampling are performed on the fused sampling point set to obtain the target sampling point set;
[0018] The target lane line is generated based on the target sampling point set.
[0019] In one embodiment, generating the target lane lines for the target road segment based on the target image includes:
[0020] If the speed of the road segment corresponding to the target road segment is not zero and includes straight road segments and curved road segments, then the first target image corresponding to the straight road segment and the second target image corresponding to the curved road segment are selected respectively.
[0021] The set of three-dimensional sampling points corresponding to the first target image is used to form a first sampling point set, and the set of three-dimensional sampling points corresponding to the second target image is used to form a second sampling point set;
[0022] Curve fitting and sampling are performed on the first set of sampling points and the second set of sampling points respectively to obtain the target set of sampling points;
[0023] The target lane line is generated based on the target sampling point set.
[0024] In one embodiment, the lane line processing method further includes:
[0025] If the target road segment has a reference lane line, then obtain the set of reference sampling points corresponding to the reference lane line;
[0026] Based on the target sampling point set and the reference sampling point set, calculate the phase separation degree between the target lane line and the reference lane line;
[0027] The phase separation degree is compared with the phase separation degree threshold. If the phase separation degree is less than the phase separation degree threshold, curve fitting and sampling are performed on the reference sampling point set and the target sampling point set to obtain an updated sampling point set. An updated lane line is generated based on the updated sampling point set. If the phase separation degree is equal to or greater than the phase separation degree threshold, an updated lane line is generated based on the target sampling point set.
[0028] Update the reference lane line with the updated lane line.
[0029] In one embodiment, calculating the phase separation between the target lane line and the reference lane line based on the target sampling point set and the reference sampling point set includes:
[0030] Obtain the target sampling points from the target sampling point set;
[0031] Calculate the interval distance between the target sampling point and the reference sampling points in the reference sampling point set, and determine two control sampling points corresponding to the target sampling point from the reference sampling point set based on the interval distance;
[0032] Calculate the perpendicular distance from the target sampling point to the straight line containing the two control sampling points;
[0033] By calculating each of the vertical distances, the separation degree between the target lane line and the reference lane line is obtained.
[0034] In one embodiment, the lane line processing method further includes:
[0035] If the target road segment has multiple target lane lines, then obtain the target sampling point set and pose error average value corresponding to the multiple target lane lines;
[0036] Select the set of target sampling points corresponding to the target lane line whose average pose error is less than the error threshold as the set of matching sampling points;
[0037] The sets of matching sampling points are combined into a set of matching fusion sampling points. The set of matching fusion sampling points is then subjected to curve fitting and sampling to obtain a set of matching target sampling points.
[0038] A matching target lane line is generated based on the set of matching target sampling points.
[0039] Secondly, this application also provides a lane line processing device. The device includes:
[0040] The acquisition module is used to acquire multiple frames of images of the target road segment and the pose points corresponding to each frame of the image;
[0041] The determination module is used to determine the road segment characteristics and road segment speed of the target road segment based on the pose point;
[0042] The selection module is used to select from the multiple frames of images based on the road segment features and the road segment speed to obtain a target image;
[0043] The generation module is used to generate the target lane lines of the target road segment based on the target image.
[0044] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0045] Acquire multiple frames of images of the target road segment and the pose points corresponding to each frame of the image;
[0046] The road segment characteristics and road segment speed of the target road segment are determined based on the pose points;
[0047] The target image is obtained by selecting from the multiple frames of images based on the road segment features and the road segment speed;
[0048] The target lane lines of the target road segment are generated based on the target image.
[0049] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0050] Acquire multiple frames of images of the target road segment and the pose points corresponding to each frame of the image;
[0051] The road segment characteristics and road segment speed of the target road segment are determined based on the pose points;
[0052] The target image is obtained by selecting from the multiple frames of images based on the road segment features and the road segment speed;
[0053] The target lane lines of the target road segment are generated based on the target image.
[0054] The aforementioned lane line processing method, apparatus, computer equipment, and storage medium acquire multiple frames of images of a target road segment and the pose points corresponding to each frame. Based on the pose points, the road segment features and speed of the target road segment are determined. Based on the road segment features and speed, a target image is selected from the multiple frames, and a target lane line is generated based on the target image. By determining the road segment features and speed through pose points and selecting the target image based on these features and speeds, the number of target images involved in generating the target lane line is reduced, thereby reducing the error in the target lane line and improving its representativeness. Generating the target lane line based on the target image improves the accuracy of the target lane line. Attached Figure Description
[0055] Figure 1 This is an application environment diagram of the lane line processing method in one embodiment;
[0056] Figure 2This is a flowchart illustrating a lane line processing method in one embodiment;
[0057] Figure 3 This is a flowchart illustrating the target lane line generation steps in one embodiment;
[0058] Figure 4 This is a flowchart illustrating the target lane line generation step in another embodiment;
[0059] Figure 5 This is a flowchart illustrating the lane line update steps in one embodiment;
[0060] Figure 6 This is a flowchart illustrating the phase separation calculation steps in one embodiment;
[0061] Figure 7 This is a schematic diagram of the vertical distance in one embodiment;
[0062] Figure 8 This is a flowchart illustrating the lane line processing method in another embodiment;
[0063] Figure 9 This is a structural block diagram of a lane line processing device in one embodiment;
[0064] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0066] The lane line processing method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated on server 104 or placed on the cloud or other network servers. Both the terminal and the server can be used independently to execute the lane line processing method provided in this embodiment. The terminal and server can also work together to execute the lane line processing method provided in this embodiment. For example, terminal 102 sends a lane line processing request to server 104. Server 104 receives the lane line processing request, acquires multiple frames of images of the target road segment and the pose points corresponding to each frame, determines the road segment features and speed of the target road segment based on the pose points, selects the target image from the multiple frames based on the road segment features and speed, and generates the target lane line for the target road segment based on the target image. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0067] In one embodiment, such as Figure 2 As shown, a lane line processing method is provided. This method can be applied to a computer device, which can be a terminal or a server. It can be executed independently by the terminal or server, or through interaction between the terminal and the server. This embodiment illustrates the method applied to a computer device as an example, including the following steps:
[0068] Step 202: Obtain multiple frames of images of the target road segment and the pose points corresponding to each frame.
[0069] In this context, a pose point refers to a point that possesses both position and attitude information. It can be understood as a point representing the vehicle's position and orientation information. Position information can be represented by coordinates, while attitude information can be represented by angles.
[0070] For example, the computer device acquires multiple frames of images collected in the target road segment from the vehicle system, server, or cloud, as well as the pose points corresponding to each frame of the image.
[0071] Step 204: Determine the road segment characteristics and road segment speed of the target road segment based on the pose points.
[0072] Among them, road segment features refer to the shape characteristics of a road segment. This can be understood as the shape of the road segment. Road segment features can be straight or curved, with curved segments further subdivided into various types of curved segments with different degrees of curvature. Road segment speed refers to the speed at which the vehicle carrying the image acquisition device travels on the target road segment.
[0073] For example, the computer device performs calculations based on the pose points corresponding to each frame of the image, and determines the road segment characteristics and road segment speed of the target road segment based on the calculation results.
[0074] In one embodiment, the computer device acquires the current pose point from multiple pose points corresponding to the target road segment, acquires the next adjacent pose point of the current pose point as the first reference pose point, acquires the next adjacent pose point of the first reference pose point as the second reference pose point, calculates the first slope between the current pose point and the first reference pose point, and the second slope between the first reference pose point and the second reference pose point, calculates the difference between the second slope and the first slope to obtain the curvature corresponding to the current pose point, calculates the difference between the curvatures corresponding to two adjacent current pose points, and if the difference is less than the difference threshold, the target road segment is a straight road segment; if the difference is greater than the difference threshold, the target road segment is a curved road segment. For example, given three pose points A(x1,y1), B(x2,y2), and C(x3,y3), if point A is taken as the current pose point, then point B is the first reference pose point, and point C is the second reference pose point. The slope between points A and B is (y2-y1) / (x2-x1), the slope between points B and C is (y3-y2) / (x3-x2), and the curvature of point A is (y3-y2) / (x3-x2)-(y2-y1) / (x2-x1).
[0075] In one embodiment, the computer device obtains a reference table showing the correspondence between the average curvature and the road segment features, then adds up the curvature corresponding to each current pose point to obtain the curve curvature, divides the curve curvature by the number of pose points to obtain the target average curvature, and looks up the road segment features corresponding to the target average curvature in the reference table to obtain the road segment features of the target road segment.
[0076] In one embodiment, the computer device performs curve fitting on multiple pose points to obtain a fitted curve, solves the curvature expression corresponding to the fitted curve according to the curvature solution formula, substitutes the pose points into the curvature expression to obtain the curvature corresponding to the pose points, calculates the difference between the curvatures corresponding to two pose points with a preset number of pose points between them, and if the difference is less than the difference threshold, the target road segment is a straight road segment; if the difference is greater than the difference threshold, the target road segment is a curved road segment.
[0077] In one embodiment, the computer device acquires the first pose point and the last pose point corresponding to the target road segment, as well as the first time point corresponding to the first pose point and the second time point corresponding to the last pose point, calculates the physical distance between the first pose point and the last pose point, and the time interval between the first time point and the second time point, and calculates the road segment speed based on the physical distance and the time interval.
[0078] In one embodiment, the computer device acquires the time corresponding to each pose point, calculates the physical distance between two adjacent pose points, calculates the time interval between the corresponding times of two adjacent pose points, divides the physical distance by the time interval to obtain the velocity between two adjacent pose points, adds the velocities corresponding to each adjacent pose point to obtain the total velocity, counts the number of added velocities to obtain the total number, and divides the total velocity by the total number to obtain the road segment velocity of the target road segment.
[0079] Step 206: Select from multiple frames of images based on road segment features and road segment speed to obtain the target image.
[0080] For example, the computer device determines a selection scheme based on the road segment characteristics and road speed of the target road segment, and then selects the target image from multiple frames of images according to the selection scheme.
[0081] In one embodiment, the computer device obtains a matching table between road segment attributes and selection schemes. The road segment attributes include multiple feature attributes, and a combination of these feature attributes corresponds to a selection scheme. The device queries the matching table for the selection scheme corresponding to the target road segment based on these multiple feature attributes. For example, the first feature attribute in the matching table is the road segment feature, specifically divided into straight road segments and curved road segments with multiple degrees of curvature. The second feature attribute in the matching table is the road segment speed, specifically divided into multiple speed ranges. The selection scheme corresponding to the target road segment is determined based on the road segment feature and the road segment speed. Then, the target image is selected from multiple frames of images according to the selection scheme.
[0082] Step 208: Generate the target lane lines for the target road segment based on the target image.
[0083] Lane markings are the lines on a road that restrict and protect vehicle movement. They are important traffic signs. Lane markings include, but are not limited to, white dashed lines, white solid lines, yellow dashed lines, and yellow solid lines. Examples include pedestrian crossings that allow pedestrians to cross, and lane dividers that separate vehicles traveling in the same direction.
[0084] For example, a computer device generates target lane lines for a target road segment based on a target image.
[0085] In the lane line processing method described above, multiple frames of images of the target road segment and the pose points corresponding to each frame are acquired. The road segment features and speed of the target road segment are determined based on the pose points. Based on these road segment features and speeds, a target image is selected from the multiple frames, and a target lane line is generated based on the target image. By determining the road segment features and speeds through pose points and selecting a target image based on these features and speeds, the number of target images used in generating the target lane line is reduced, thereby reducing the error in the target lane line and improving its representativeness. Generating the target lane line based on the target image improves the accuracy of the target lane line.
[0086] In one embodiment, selecting from multiple frames of images based on road segment features and road segment speed to obtain a target image includes:
[0087] If the speed of the target road segment is zero, then one frame is selected from multiple frames as the target image; if the target road segment is a straight road segment and the speed of the road segment is not zero, then the number of targets is determined based on the speed of the road segment, and the target images of the target number are selected from multiple frames; if the target road segment is a curved road segment and the speed of the road segment is not zero, then multiple frames are used as the target images.
[0088] For example, if the computer device obtains that the speed of the road segment corresponding to the target road segment is zero, then select one frame image from multiple frames as the target image. If the target road segment is a straight road segment, then determine the number of targets based on the road segment speed, and then select the target number of target images from multiple frames. If the target road segment is a curved road segment and the road segment speed is not zero, then use all images corresponding to the target road segment as target images.
[0089] In one embodiment, the computing device selects target images from target images by random sampling. For example, if the target road segment is a straight road segment, the number of targets is determined based on the road segment speed, and then the target images of the target number are randomly selected from multiple frames of images.
[0090] In one embodiment, the computer device selects target images from the target graphics for interval sampling. For example, if the target road segment is a straight road segment, the number of targets is determined according to the road segment speed. Then, the total number of images corresponding to the target road segment is divided by the number of targets to obtain the sampling interval. Then, one target image is selected from the multiple frames of images at each sampling interval.
[0091] In this embodiment, the target image is selected based on the road segment characteristics and road segment speed, which reduces the number of target images involved in generating the target lane line, thereby reducing the error of the target lane line and improving the representativeness of the target images involved in generating the target lane line.
[0092] In one embodiment, such as Figure 3 As shown, the target lane lines for the target road segment generated based on the target image include:
[0093] Step 302: Obtain the set of three-dimensional sampling points corresponding to each frame of the target image.
[0094] In this context, a three-dimensional sampling point set refers to a collection of three-dimensional coordinate points representing lane lines in an image. A three-dimensional coordinate point is a point with meaning, defined by three independent variables. These points represent points in space and have different representations in different three-dimensional coordinate systems. For example, in a three-dimensional Cartesian coordinate system, a three-dimensional coordinate point (x, y, z) has x, y, and z as the coordinate values of the X, Y, and Z axes, which share a common origin and are mutually orthogonal.
[0095] For example, a computer device acquires a set of three-dimensional sampling points representing lane lines in each frame of a target image.
[0096] Step 304: Collect and combine the individual 3D sampling points into a fused sampling point set.
[0097] For example, a computer device combines multiple sets of three-dimensional sampling points into a fused set of sampling points.
[0098] Step 306: Perform curve fitting and sampling on the fused sampling point set to obtain the target sampling point set;
[0099] Curve fitting is a method of approximating discrete data using analytical expressions. It can be understood as using a continuous curve to approximate or analogize a set of discrete points on a plane. Sampling refers to the process of selecting individuals from a population. Sampling includes random sampling and non-random sampling. Random sampling refers to selecting individuals from the population according to randomization principles, while non-random sampling refers to selecting individuals from the population according to predefined rules.
[0100] For example, a computer device performs curve fitting on the fused sampling point set to obtain a fitted curve, and then samples the fitted curve to obtain a target sampling point set.
[0101] Step 308: Generate target lane lines based on the target sampling point set.
[0102] For example, a computer device generates a target lane line based on a set of target sampling points.
[0103] In one embodiment, the computer device connects any two adjacent target sampling points with line segments, and the target sampling points and the line segments between adjacent target sampling points form the target lane line.
[0104] In one embodiment, the computer device performs smoothing filtering on the target sampling point set to obtain an optimized target sampling point set, and generates a target lane line based on the optimized target sampling point sequence.
[0105] In this embodiment, a set of three-dimensional sampling points representing lane lines in each frame of the target image is obtained. Multiple sets of three-dimensional sampling points are combined into a fused sampling point set. Curve fitting is performed on the fused sampling point set to obtain a fitted curve. Then, the fitted curve is sampled to obtain a target sampling point set. The target lane line is generated based on this target sampling point set. By performing curve fitting and sampling on the fused sampling point set to obtain the target sampling point set, the curve fitting process filters out three-dimensional sampling points that deviate from the overall pattern, reducing the number of erroneous target sampling points in the target sampling point set and improving the smoothness and accuracy of the target lane line.
[0106] In one embodiment, such as Figure 4 As shown, the target lane lines for the target road segment generated based on the target image include:
[0107] Step 402: If the speed of the road segment corresponding to the target road segment is not zero and includes straight road segments and curved road segments, then select the first target image corresponding to the straight road segment and the second target image corresponding to the curved road segment respectively.
[0108] For example, if the computer device determines that the speed of the target road segment is not zero and that the target road segment includes straight road segments and curved road segments, then it calculates the speed of the straight road segment based on the corresponding pose point of the straight road segment, determines the number of targets based on the speed of the straight road segment, and then selects the first target image of the target number from the multi-frame images corresponding to the straight road segment, and uses all the images corresponding to the curved road segment as the second target image.
[0109] Step 404: The set of three-dimensional sampling points corresponding to the first target image is combined into a first sampling point set, and the set of three-dimensional sampling points corresponding to the second target image is combined into a second sampling point set.
[0110] For example, the computer device acquires a set of three-dimensional sampling points corresponding to a first target image, combines the set of three-dimensional sampling points corresponding to the first target image into a first sampling point set, and then acquires a set of three-dimensional sampling points corresponding to a second target image, and combines the set of three-dimensional sampling points corresponding to the second target image into a second sampling point set.
[0111] Step 406: Perform curve fitting and sampling on the first set of sampling points and the second set of sampling points respectively to obtain the target set of sampling points.
[0112] For example, the computer device performs curve fitting on the first set of sampling points to obtain a first fitted curve, samples the first fitted curve to obtain a first target set of sampling points, then performs curve fitting on the second set of sampling points to obtain a second fitted curve, samples the second fitted curve to obtain a second target set of sampling points, and finally combines the first target set of sampling points and the second target set of sampling points to form a target set of sampling points.
[0113] Step 408: Generate target lane lines based on the target sampling point set.
[0114] For example, a computer device generates a target lane line based on a set of target sampling points.
[0115] In this embodiment, curve fitting is performed on the first set of sampling points corresponding to the curved road segment and the second set of sampling points corresponding to the straight road segment, respectively. This preserves the distribution characteristics of the first and second sets of sampling points, improving the accuracy of curve fitting and thus improving the accuracy of the target sampling point set. The target lane line is then generated based on the target sampling point set, further improving the accuracy of the target lane line.
[0116] In one embodiment, such as Figure 5 As shown, lane marking processing methods also include:
[0117] Step 502: If a reference lane line exists in the target road segment, then obtain the set of reference sampling points corresponding to the reference lane line.
[0118] Among them, the reference lane line refers to the lane line corresponding to the target road segment that already exists in the semantic map.
[0119] For example, a computer device queries the semantic map to see if there is a reference lane line for the target road segment. If it does, it obtains the set of reference sampling points corresponding to the reference lane line.
[0120] Step 504: Calculate the phase separation between the target lane line and the reference lane line based on the target sampling point set and the reference sampling point set.
[0121] The degree of separation refers to the degree of distance between objects. It can be expressed as the distance between objects, the average distance between objects, or other methods.
[0122] For example, the computer device calculates the phase separation between the target lane line and the reference lane line based on the target sampling point set and the reference sampling point set.
[0123] Step 506: Compare the phase separation degree with the phase separation degree threshold. If the phase separation degree is less than the phase separation degree threshold, perform curve fitting and sampling on the reference sampling point set and the target sampling point set to obtain an updated sampling point set, and generate an updated lane line based on the updated sampling point set. If the phase separation degree is equal to or greater than the phase separation degree threshold, generate an updated lane line based on the target sampling point set.
[0124] For example, the computer device compares the phase separation degree with the phase separation degree threshold. If the phase separation degree is less than the phase separation degree threshold, the reference sampling point set and the target sampling point set are combined to form a fused sampling point set. The fused sampling point set is then subjected to curve fitting and sampling to obtain an updated sampling point set, which is used to generate an updated lane line. If the phase separation degree is equal to or greater than the phase separation degree threshold, the target sampling point set is used to generate an updated lane line.
[0125] Step 508: Update the reference lane lines with updated lane lines.
[0126] For example, a computer device replaces a reference lane line in a semantic map with an updated lane line.
[0127] In this embodiment, if a reference lane line corresponding to the target lane already exists in the semantic map, the disjointness between the reference sampling point set and the target sampling point set corresponding to the reference lane line is calculated. If the disjointness is less than the disjointness threshold, it indicates that the deviation between the reference sampling point set and the target sampling point set is small. In this case, the reference sampling point set and the target sampling point set are curve fitted and sampled, and the updated sampling point set is used to generate the updated lane line. This can be understood as using the target sampling point set to adjust the reference sampling point set and improve the accuracy of the updated lane line. If the disjointness is greater than or equal to the disjointness threshold, it indicates that the error of the reference sampling point set is large. In this case, the updated lane line is directly generated using the target sampling point set, and the updated lane line replaces the reference lane line, thereby improving the accuracy of the lane lines in the semantic map.
[0128] In one embodiment, such as Figure 6 As shown, based on the target sampling point set and the reference sampling point set, the phase separation between the target lane line and the reference lane line is calculated as follows:
[0129] Step 602: Obtain the target sampling points in the target sampling point set.
[0130] For example, a computer device acquires a target sampling point from a set of target sampling points.
[0131] Step 604: Calculate the interval distance between the target sampling point and the reference sampling point in the reference sampling point set, and determine two control sampling points corresponding to the target sampling point from the reference sampling point set based on the interval distance.
[0132] For example, the computer device calculates the interval distance between the target sampling point and each reference sampling point in the set of reference sampling points, and selects two control sampling points corresponding to the target sampling point based on the interval distance.
[0133] In one embodiment, the computer device compares multiple interval distances corresponding to the target sampling point and selects the reference sampling point corresponding to the shortest interval distance and the second shortest interval distance as the control sampling point.
[0134] In one embodiment, the computer device adds the interval distances to obtain a total distance, divides the total distance by the number of interval distances to obtain an average interval distance, compares each interval distance with the average interval distance, selects the two reference interval distances that are closest to the average interval distance, and uses the reference sampling points corresponding to the two reference interval distances as control sampling points.
[0135] Step 606: Calculate the perpendicular distance from the target sampling point to the straight line containing the two control sampling points.
[0136] For example, the computer device calculates the perpendicular distance from the target sampling point to the line containing the two control points based on a method for calculating the perpendicular distance from a sampling point to a line in three-dimensional space. For instance, as... Figure 7 As shown, the target sampling point is A, and the two control sampling points are B and C. A, B, and C are all represented by sampling coordinate points. Subtracting the control sampling point B from the target sampling point A yields vector BA, and subtracting the control sampling point C from the control sampling point B yields vector BC. The cross product of vector BA and vector BC is performed to obtain the cross product result. The length of vector BA is multiplied by the length of vector BC to obtain the product result. The cross product result is divided by the product result to obtain the sine value of the angle α between vector BA and vector BC. The length of vector BA is multiplied by the sine value of α to obtain the perpendicular distance from the target sampling point A to the line containing the control sampling points B and C.
[0137] Step 608: Calculate the vertical distances to obtain the separation degree between the target lane line and the reference lane line.
[0138] For example, the computer device performs statistical analysis on each vertical distance according to the set calculation rules to obtain the separation degree between the target sampling point set and the reference sampling point set.
[0139] In one embodiment, the computer device compares the various vertical distances and selects the median value of the vertical distances as the separation between the target sampling point set and the reference sampling point set.
[0140] In one embodiment, the computer device adds up the vertical distances corresponding to each target sampling point in the target sampling point set, and divides the sum by the total number of target sampling points in the target sampling point set to obtain the separation degree between the target sampling point set and the reference sampling point set.
[0141] In this embodiment, two control sampling points are selected from the set of reference sampling points, and the vertical distance from the target sampling point to the line containing the two control sampling points is calculated. The vertical distance can accurately represent the distance between the target sampling point and the set of reference sampling points. By statistically analyzing each vertical distance, the separation degree between the target sampling point set and the set of reference sampling points is obtained, which can accurately represent the separation degree between the target sampling point set and the set of reference sampling points, thus improving the accuracy of the separation degree calculation.
[0142] In one embodiment, the lane line processing method further includes:
[0143] If there are multiple target lane lines in the target road segment, obtain the target sampling point set and the average pose error of the target lane lines corresponding to the multiple target lane lines; select the target sampling point set corresponding to the target lane line whose average pose error is less than the error threshold as the matching sampling point set; combine the various matching sampling point sets into a matching fusion sampling point set, perform curve fitting and sampling on the matching fusion sampling point set to obtain the matching target sampling point set; generate the matching target lane line based on the matching target sampling point set.
[0144] The average pose error refers to the average value of the pose point errors. It can be understood as the average value of the pose point errors corresponding to the target road segment, and it measures the accuracy of the pose points of the target road segment. Pose point errors can be relative pose errors, absolute trajectory errors, etc.
[0145] For example, a computer device acquires target lane lines corresponding to target road segments provided by multiple vehicles, then acquires the target sampling point set and pose error average value corresponding to each target lane line, compares each pose error average value with an error threshold, and if the pose error average value is less than the error threshold, then the target sampling point set corresponding to the pose error average value is determined as a matching sampling point set. The various matching sampling point sets are combined into a matching fusion sampling point set, and curve fitting and sampling are performed on the matching fusion sampling point set to obtain a matching target sampling point set. A matching lane line is generated based on the matching target sampling point set, and then the matching lane line is used as the lane line of the target road segment in the semantic map.
[0146] In this embodiment, by comparing the average pose error with the error threshold, the set of target sampling points with an average pose error less than the error threshold is selected as the matching sampling point set. A small average pose error indicates high accuracy of the pose points, and the set of target sampling points corresponding to the average pose error has high accuracy. Using the set of target sampling points with high accuracy as the matching sampling point set improves the accuracy of matching the target sampling point set. The target lane line is generated based on the matching target sampling point set, which improves the accuracy of matching the target lane line.
[0147] In one exemplary embodiment, the lane line processing method is as follows: Figure 8 As shown:
[0148] The system acquires multiple images taken on the target road segment, along with the pose of the target vehicle at the time each image was captured. The perception model in the vehicle system then converts the target lane lines in each image into a set of three-dimensional sampling points.
[0149] The calculation is performed based on the pose points. The road segment features and road segment speed of the target road segment are determined according to the calculation results. If the road segment speed corresponding to the target road segment is zero, one frame image is selected from multiple frames as the target image. If the target road segment is a straight road segment, the number of targets is determined according to the road segment speed, and then the target images of the target number are selected from multiple frames. If the target road segment is a curved road segment and the road segment speed is not zero, all images corresponding to the target road segment are used as target images.
[0150] Obtain the set of three-dimensional sampling points corresponding to each frame of the target image, combine multiple sets of three-dimensional sampling points into a fused sampling point set, perform curve fitting on the fused sampling point set to obtain the fitted curve, and then sample the fitted curve to obtain the target sampling point set.
[0151] The system queries the semantic map to determine if a reference lane line for the target road segment exists. If a reference lane line exists, it retrieves the set of reference sampling points corresponding to the reference lane line, calculates the disjointness between the target sampling point set and the reference sampling point set, and compares the disjointness with a disjointness threshold. If the disjointness is less than the disjointness threshold, it combines the reference sampling point set and the target sampling point set into a fused sampling point set. The fused sampling point set is then subjected to curve fitting and sampling to obtain an updated sampling point set, which is used to generate the target lane line. If the disjointness is equal to or greater than the disjointness threshold, the target lane line is generated using the target sampling point set.
[0152] If no reference lane line for the target road segment exists in the semantic map, the system queries whether multiple target sampling point sets provided by vehicles exist for the target road segment. If multiple target sampling point sets exist, the system obtains the target sampling point sets provided by multiple vehicles and the average pose error corresponding to each target sampling point set. The average pose error of each set is compared with an error threshold. If the average pose error is less than the error threshold, the target sampling point set corresponding to the average pose error is determined as the matching sampling point set. The matching sampling point sets are then combined into a matching fusion sampling point set. Curve fitting and sampling are performed on the matching fusion sampling point set to obtain the matching target sampling point set. A matching target lane line is generated based on the matching target sampling point set and used as the lane line for the target road segment in the semantic map. If no multiple target sampling point sets exist, a target lane line is generated based on the aforementioned target sampling point set and used as the lane line for the target road segment in the semantic map.
[0153] In this embodiment, multiple frames of images of the target road segment and the pose points corresponding to each frame are acquired. The road segment features and speed of the target road segment are determined based on the pose points. Based on the road segment features and speed, a target image is selected from the multiple frames, and a target lane line for the target road segment is generated based on the target image. Determining the road segment features and speed by using pose points and selecting the target image based on these features and speeds reduces the number of target images involved in generating the target lane line, thereby reducing the error of the target lane line and improving its representativeness. Generating the target lane line based on the target image improves the accuracy of the target lane line.
[0154] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0155] Based on the same inventive concept, this application also provides a lane line processing device for implementing the lane line processing method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more lane line processing device embodiments provided below can be found in the limitations of the lane line processing method described above, and will not be repeated here.
[0156] In one embodiment, such as Figure 9 As shown, a lane line processing device is provided, including an acquisition module, a determination module, a selection module, and a generation module, wherein:
[0157] The acquisition module 902 is used to acquire multiple frames of images of the target road segment and the pose points corresponding to each frame of the image.
[0158] The determination module 904 is used to determine the road segment characteristics and road segment speed of the target road segment based on the pose point;
[0159] Selection module 906 is used to select from multiple frames of images based on road segment features and road segment speed to obtain the target image;
[0160] The generation module 908 is used to generate target lane lines for the target road segment based on the target image.
[0161] In one embodiment, the selection module 906 is further configured to: if the road speed of the target road segment is zero, select one frame image from multiple frames as the target image; if the target road segment is a straight road segment and the road speed is not zero, determine the target quantity based on the road speed and select the target image of the target quantity from multiple frames; if the target road segment is a curved road segment and the road speed is not zero, use multiple frames as the target image.
[0162] In one embodiment, the generation module 908 is further configured to: acquire a set of three-dimensional sampling points corresponding to each frame of the target image; combine the collected three-dimensional sampling points into a fused sampling point set; perform curve fitting and sampling on the fused sampling point set to obtain a target sampling point set; and generate a target lane line based on the target sampling point set.
[0163] In one embodiment, the generation module 908 is further configured to: if the road segment speed corresponding to the target road segment is not zero and includes straight road segments and curved road segments, select the first target image corresponding to the straight road segment and the second target image corresponding to the curved road segment respectively; form a first sampling point set by combining the three-dimensional sampling point set corresponding to the first target image and form a second sampling point set by combining the three-dimensional sampling point set corresponding to the second target image; perform curve fitting and sampling on the first sampling point set and the second sampling point set respectively to obtain the target sampling point set; and generate a target lane line based on the target sampling point set.
[0164] In one embodiment, the generation module 908 further includes a first acquisition unit, a phase separation calculation unit, a comparison unit, and an update unit, wherein:
[0165] The first acquisition unit is used to acquire the set of reference sampling points corresponding to the reference lane line if the target road segment has a reference lane line.
[0166] The phase separation calculation unit is used to calculate the phase separation between the target lane line and the reference lane line based on the target sampling point set and the reference sampling point set;
[0167] The comparison unit is used to compare the phase separation degree with the phase separation degree threshold. If the phase separation degree is less than the phase separation degree threshold, curve fitting and sampling are performed on the reference sampling point set and the target sampling point set to obtain an updated sampling point set, and an updated lane line is generated based on the updated sampling point set. If the phase separation degree is equal to or greater than the preset phase separation degree, an updated lane line is generated based on the target sampling point set.
[0168] The update unit is used to update the reference lane lines with the updated lane lines.
[0169] In one embodiment, the phase separation calculation unit is further configured to: obtain target sampling points in the target sampling point set; calculate the interval distance between the target sampling point and the reference sampling point in the reference sampling point set, and determine two control sampling points corresponding to the target sampling point from the reference sampling point set based on the interval distance; calculate the vertical distance from the target sampling point to the straight line where the two control sampling points are located; and statistically analyze each vertical distance to obtain the phase separation between the target lane line and the reference lane line.
[0170] In one embodiment, the generation module 908 is further configured to: if there are multiple target lane lines in the target road segment, obtain the target sampling point set and the average pose error of the multiple target lane lines; select the target sampling point set corresponding to the target lane line whose average pose error is less than the error threshold as the matching sampling point set; combine the various matching sampling point sets into a matching fusion sampling point set, perform curve fitting and sampling on the matching fusion sampling point set to obtain the matching target sampling point set; and generate the target lane line based on the matching target sampling point set.
[0171] Each module in the aforementioned lane marking processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0172] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 10As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a lane line adjustment method. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0173] Those skilled in the art will understand that Figure 10 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Exemplarily, the computer device may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.
[0174] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0175] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0176] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0178] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0179] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0180] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A lane line processing method characterized by, The method includes: Acquire multiple frames of images of the target road segment and the pose points corresponding to each frame; the pose points represent vehicle position information and orientation information; The road segment characteristics and road segment speed of the target road segment are determined based on the pose points; The target image is obtained by selecting from the multiple frames of images based on the road segment features and the road segment speed; Generate the target lane lines for the target road segment based on the target image; If the target road segment has multiple target lane lines, then obtain the target sampling point set and pose error average value corresponding to the multiple target lane lines; the pose error average value is the average value of the pose point error corresponding to the target road segment; Select the set of target sampling points corresponding to the target lane line whose average pose error is less than the error threshold as the set of matching sampling points; The sets of matching sampling points are combined into a set of matching fusion sampling points. The set of matching fusion sampling points is then subjected to curve fitting and sampling to obtain a set of matching target sampling points. A matching target lane line is generated based on the set of matching target sampling points.
2. The method of claim 1, wherein, The step of selecting the target image from the multiple frames of images based on the road segment features and the road segment speed includes: If the speed of the target road segment is zero, then one frame is selected from the multiple frames as the target image; If the target road segment is a straight road segment and the road segment speed is not zero, then the number of targets is determined based on the road segment speed, and the target number of target images is selected from the multi-frame images; If the target road segment is a curved road segment and the road segment speed is not zero, then the multi-frame images are used as the target images.
3. The method of claim 1, wherein, The step of generating the target lane lines for the target road segment based on the target image includes: Obtain the set of three-dimensional sampling points corresponding to each frame of the target image; The individual three-dimensional sampling points are collected and combined into a fused sampling point set; Curve fitting and sampling are performed on the fused sampling point set to obtain the target sampling point set; The target lane line is generated based on the target sampling point set.
4. The method of claim 1, wherein, The step of generating the target lane lines for the target road segment based on the target image includes: If the speed of the road segment corresponding to the target road segment is not zero and includes straight road segments and curved road segments, then the first target image corresponding to the straight road segment and the second target image corresponding to the curved road segment are selected respectively. The set of three-dimensional sampling points corresponding to the first target image is used to form a first sampling point set, and the set of three-dimensional sampling points corresponding to the second target image is used to form a second sampling point set; Curve fitting and sampling are performed on the first set of sampling points and the second set of sampling points respectively to obtain the target set of sampling points; The target lane line is generated based on the target sampling point set.
5. The method of claim 3, wherein, The method further includes: If the target road segment has a reference lane line, then obtain the set of reference sampling points corresponding to the reference lane line; Based on the target sampling point set and the reference sampling point set, calculate the phase separation degree between the target lane line and the reference lane line; The phase separation degree is compared with the phase separation degree threshold. If the phase separation degree is less than the phase separation degree threshold, curve fitting and sampling are performed on the reference sampling point set and the target sampling point set to obtain an updated sampling point set. An updated lane line is generated based on the updated sampling point set. If the phase separation degree is equal to or greater than the phase separation degree threshold, an updated lane line is generated based on the target sampling point set. Update the reference lane line with the updated lane line.
6. The method of claim 5, wherein, The step of calculating the phase separation between the target lane line and the reference lane line based on the target sampling point set and the reference sampling point set includes: Obtain the target sampling points from the target sampling point set; Calculate the interval distance between the target sampling point and the reference sampling points in the reference sampling point set, and determine two control sampling points corresponding to the target sampling point from the reference sampling point set based on the interval distance; Calculate the perpendicular distance from the target sampling point to the straight line containing the two control sampling points; By calculating each of the vertical distances, the separation degree between the target lane line and the reference lane line is obtained.
7. The method of claim 6, wherein, The step of calculating the phase separation between the target lane line and the reference lane line by statistically analyzing each of the vertical distances includes: Each of the vertical distances is compared, and the median value of the vertical distances is selected as the separation degree between the target lane line and the reference lane line.
8. An apparatus for lane line processing, the apparatus comprising: The device includes: The acquisition module is used to acquire multiple frames of images of the target road segment and the pose points corresponding to each frame of the image; the pose points represent vehicle position information and orientation information. The determination module is used to determine the road segment characteristics and road segment speed of the target road segment based on the pose point; The selection module is used to select from the multiple frames of images based on the road segment features and the road segment speed to obtain a target image; A generation module is used to generate target lane lines for the target road segment based on the target image; if there are multiple target lane lines for the target road segment, the module obtains the target sampling point set and the average pose error value corresponding to the multiple target lane lines; the average pose error value is the average pose point error value corresponding to the target road segment; the module selects the target sampling point set corresponding to the target lane line whose average pose error value is less than the error threshold as the matching sampling point set; the module combines the matching sampling point sets into a matching fusion sampling point set, performs curve fitting and sampling on the matching fusion sampling point set to obtain a matching target sampling point set; and generates a matching target lane line based on the matching target sampling point set. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for rapid traffic lane detection based on GrowCut
CN102156979A
A multi-scene adaptive driving deviation and turning early warning method based on machine vision
CN109829365A
Lane line change detection method and device and computer readable storage medium
CN114758321A
Three-dimensional lane line generation method and device, electronic equipment and computer readable medium
CN114842448A