Methods, apparatus, electronic devices and storage media for lane line data grouping
By mapping GPS coordinates to target images in lane line data grouping and combining them with driving trajectories to determine the coordinates of lane line pixels, and using detection areas and directions to determine marker points, efficient grouping of lane line data is achieved while reducing computational load, reducing noise and occlusion effects, and improving grouping accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-30
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the process of grouping lane line data involves a large amount of computation, relies heavily on vehicle GPS trajectories, has high requirements for image quality, and is significantly affected by noise and missing elements.
By converting the pixels in the lane line image into GPS coordinates and mapping them onto the target image according to a preset ratio, and combining the driving trajectory of the target vehicle to determine the coordinates of the lane line pixels, the system uses a detection area of a specified shape and size and direction to determine marker points, thus forming lane line coordinates, which are then grouped in the road coordinate system.
It reduces computational load, minimizes the impact of noise and occlusion on calculation results, and improves computational efficiency and grouping accuracy.
Smart Images

Figure CN116052107B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lane line recognition technology, and in particular to methods, apparatus, electronic devices and storage media for lane line data grouping. Background Technology
[0002] In the field of autonomous driving, the operation of autonomous vehicles relies on high-precision electronic maps. In the process of creating electronic maps, lane lines need to be fitted. Before fitting lane lines, the lane line data needs to be grouped.
[0003] In related technologies, the process of grouping lane line data requires converting the lane line data in images (static images or frame images in videos) into GPS coordinates. Then, the data is grouped based on the relative positional relationship between these calculated GPS coordinates and the GPS trajectory of the vehicle. However, since there are a large number of calculated GPS coordinates, the computational load in the grouping process is very large. Furthermore, related technologies are highly dependent on the vehicle's GPS trajectory and have high requirements for the quality of the acquired images. Image noise or missing elements have a significant impact on the calculation results. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this application provides a method, apparatus, electronic device and storage medium for grouping lane line data, which can achieve the grouping of lane line data while reducing the amount of computation.
[0005] The first aspect of this application provides a method for grouping lane line data, including:
[0006] Solve for GPS coordinates of lane line pixels in at least one lane line image;
[0007] The GPS coordinates of the at least one lane line image are mapped onto the target image according to a preset ratio to form lane line pixels.
[0008] The lane line coordinates of the lane line pixels are determined at least based on the driving trajectory of the target vehicle.
[0009] The coordinate points of the lane lines are grouped.
[0010] Optionally, determining the lane line coordinates of the lane line pixels based at least on the driving trajectory of the target vehicle includes:
[0011] The starting marker point in the lane line pixels and the detection direction corresponding to the starting marker point are determined at least based on the driving trajectory of the target vehicle.
[0012] Taking the initial marker point as the first currently determined marker point, multiple marker points in the lane line pixels and the detection direction corresponding to each marker point are determined sequentially.
[0013] In the process of sequentially determining multiple marker points in the lane line pixels and the detection direction corresponding to each marker point, a detection area of a specified shape and size is determined based on the currently determined marker point and the detection direction corresponding to the currently determined marker point.
[0014] Determine the road direction of the currently determined marker point within the detection area;
[0015] Record the lane line pixel points within the detection area in a first coordinate system based on the currently determined marker point and the road direction.
[0016] Optionally, in the process of sequentially determining multiple marker points in the lane line pixels and the detection direction corresponding to each marker point, after determining the road direction of the currently determined marker point, the road direction is used as the detection direction of the next marker point, and the marker point detection process is executed cyclically until the number of empty marker points reaches a specified number.
[0017] The marker detection process includes:
[0018] Based on the currently determined marker point, determine whether a lane line pixel is detected at a position that increases by a specified length along the detection direction. If yes, the detected lane line pixel is determined as the next marker point. If no, an empty marker point is marked at the position, the empty marker point is determined as the next marker point, and the number of empty marker points is accumulated.
[0019] Optionally, when the number of empty marker points reaches the specified number, the marker point re-probing process is repeated until the target vehicle's driving trajectory ends.
[0020] The re-probe process for the marker points includes:
[0021] The detection of the marker point is interrupted at the current detection direction, and the undetected lane line pixels in the lane line pixels are re-detected based on the driving trajectory of the target vehicle, so as to re-determine the next marker point in the lane line pixels and the detection direction corresponding to the marker point; and
[0022] After calculating the road direction of the currently determined marker point, the marker point detection process is executed cyclically until the number of empty marker points reaches the specified number.
[0023] Optionally, determining the road direction of the currently determined marker point within the detection area includes:
[0024] Establish a first coordinate system with the currently determined marker point as the origin, and within the detection area, use different specified angle directions as the vertical coordinate direction and the direction perpendicular to the vertical coordinate direction as the horizontal coordinate direction. Project the lane line pixels within the detection area onto the horizontal coordinate direction and calculate the projection width.
[0025] The angular direction in the first coordinate system with the smallest projection width is determined as the road direction of the currently determined marker point.
[0026] Optionally, grouping the lane line coordinate points includes:
[0027] Convert the lane line coordinates in the first coordinate system to lane line coordinates in the road coordinate system;
[0028] The lane line coordinate points are grouped based on the x-coordinate values of the lane line coordinate points in the road coordinate system.
[0029] Optionally, the calculation of the projection width includes:
[0030] The projection width is calculated based on the weights of at least two lane lines formed by the lane line pixels within the detection area; wherein the weight of the lane line is proportional to the distance of the lane line from the currently determined marker point.
[0031] Optionally, the lane line images include at least two images; the preset ratio is a preset precision ratio, used to map at least two GPS coordinate points to the same lane line pixel.
[0032] A second aspect of this application provides an apparatus for grouping lane line data, comprising:
[0033] The first calculation unit is used to calculate the GPS coordinates of the lane line pixels in at least one lane line image;
[0034] The first mapping unit is used to map the GPS coordinate points of the at least one lane line image onto the target image according to a preset ratio to form lane line pixels.
[0035] The first determining unit is used to determine the lane line coordinates of the lane line pixels based at least on the driving trajectory of the target vehicle.
[0036] The first grouping unit is used to group the lane line coordinate points.
[0037] Optionally, the first determining unit includes:
[0038] The first determining module is used to determine, at least based on the driving trajectory of the target vehicle, the starting marker point in the lane line pixels and the detection direction corresponding to the starting marker point;
[0039] The second determining module is used to determine multiple marker points in the lane line pixels and the detection direction corresponding to each marker point in sequence, taking the starting marker point as the first currently determined marker point;
[0040] The region determination module is used to determine a detection region of a specified shape and size based on the currently determined marker point and the detection direction corresponding to the currently determined marker point, during the process of the second determination module sequentially determining multiple marker points in the lane line pixels and the detection direction corresponding to each marker point.
[0041] A direction determination module is used to determine the road direction of the currently determined marker point within the detection area;
[0042] The coordinate recording module is used to record the lane line pixel points within the detection area in a first coordinate system based on the currently determined marker point and the road direction.
[0043] Optionally, the second determining module is specifically used to, in the process of sequentially determining multiple marker points in the lane line pixels and the detection direction corresponding to each marker point, after the direction determining module determines the road direction of the currently determined marker point, use the road direction as the detection direction of the next marker point, and cyclically execute the marker point detection process until the number of empty marker points reaches a specified number.
[0044] The marker detection process includes:
[0045] Based on the currently determined marker point, determine whether a lane line pixel is detected at a position that increases by a specified length along the detection direction. If yes, the detected lane line pixel is determined as the next marker point. If no, an empty marker point is marked at the position, the empty marker point is determined as the next marker point, and the number of empty marker points is accumulated.
[0046] Optionally, the second determining module is further configured to, when the number of empty marker points reaches the specified number, repeatedly execute the marker point re-probing process until the target vehicle's driving trajectory ends:
[0047] The re-probe process for the marker points includes:
[0048] The detection of the marker point is interrupted at the current detection direction, and the undetected lane line pixels in the lane line pixels are re-detected based on the driving trajectory of the target vehicle, so as to re-determine the next marker point in the lane line pixels and the detection direction corresponding to the marker point; and
[0049] After the direction determination module calculates the road direction of the currently determined marker point, the marker point detection process is executed cyclically until the number of empty marker points reaches the specified number.
[0050] Optionally, the direction determination module is specifically used to establish a first coordinate system with the currently determined marker point as the origin, different specified angle directions as the vertical coordinate direction in the detection area, and a direction perpendicular to the vertical coordinate direction as the horizontal coordinate direction; projecting the lane line pixels in the detection area onto the horizontal coordinate direction and calculating the projection width; and
[0051] The angular direction in the first coordinate system with the smallest projection width is determined as the road direction of the currently determined marker point.
[0052] Optionally, the first grouping unit includes:
[0053] The first conversion module is used to convert lane line coordinate points in the first coordinate system into lane line coordinate points in the road coordinate system.
[0054] The first grouping module is used to group the lane line coordinate points based on the horizontal coordinate values of the lane line coordinate points in the road coordinate system.
[0055] Optionally, the direction determination module calculates the projection width by: calculating the projection width based on the weights of at least two lane lines formed by the lane line pixels within the detection area; wherein the weight of the lane line is proportional to the distance of the lane line from the currently determined marker point.
[0056] Optionally, the lane line images include at least two images; the preset ratio is a preset precision ratio, used to map at least two GPS coordinate points to the same lane line pixel.
[0057] A third aspect of this application provides an electronic device, comprising:
[0058] Processor; and
[0059] A memory that stores executable code, which, when executed by the processor, causes the processor to perform the method described above.
[0060] A fourth aspect of this application provides a non-transitory machine-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method described above.
[0061] The technical solution provided in this application can include the following beneficial effects: This application maps GPS coordinate points calculated from lane line pixels in at least one lane line image to the target image according to a preset ratio to form lane line pixels. This transforms the calculation of a large number of GPS coordinate points into the calculation of pixels in the target image, reducing the amount of computation to a certain extent. Furthermore, through the preset ratio mapping, multiple GPS coordinate points can be mapped to the same pixel, reducing the total amount of data overall. In addition, the lane line coordinate points of the lane line pixels are determined at least based on the driving trajectory of the target vehicle, and the lane line coordinate points are grouped. This achieves the grouping of lane line data while reducing the amount of computation. Moreover, by merging the calculation results of multiple lane line images, the impact of noise and occlusion of a single image on the calculation results can be reduced to the greatest extent, and the computational efficiency can be improved by reducing redundant data.
[0062] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0063] The above and other objects, features and advantages of this application will become more apparent from the more detailed description of exemplary embodiments thereof in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments thereof.
[0064] Figure 1 This is a flowchart illustrating a method for grouping lane line data according to one embodiment of this application;
[0065] Figure 2 This is a schematic diagram illustrating an embodiment of the present application of mapping GPS coordinate points of multiple lane line images to a target image to form lane line pixels;
[0066] Figure 3a This is a schematic diagram showing a rectangular detection area in another embodiment of the method of this application;
[0067] Figure 3b This is a schematic diagram showing a fan-shaped detection area in another embodiment of the method of this application;
[0068] Figure 4 This is a schematic diagram illustrating the establishment of multiple first coordinate systems after the target image detection process is completed, as shown in another embodiment of the method of this application;
[0069] Figure 5 This is a schematic diagram of the structure of a device for grouping lane line data, as shown in one embodiment of this application;
[0070] Figure 6 This is a schematic diagram of the structure of the first determining unit in a device for grouping lane line data, as shown in another embodiment of this application;
[0071] Figure 7 This is a schematic diagram of the structure of an electronic device shown in one embodiment of this application. Detailed Implementation
[0072] Preferred embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0073] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0074] It should be understood that although the terms "first," "second," "third," etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0075] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.
[0076] Figure 1 This is a flowchart illustrating a method for grouping lane line data according to one embodiment of this application. See also... Figure 1 The method may include the following steps:
[0077] Step 101: Calculate the GPS coordinates of the lane line pixels in at least one lane line image;
[0078] In this embodiment of the application, the lane line image is an image obtained by the vehicle-mounted image acquisition device on the target vehicle to capture lane lines and then processing the images. In addition to the identified lane line pixels, these images also contain continuous positioning information, such as GPS (Global Positioning System) data. For these lane line images, the lane line pixels can be converted into a series of GPS coordinate points based on the intrinsic and extrinsic parameters of the vehicle-mounted image acquisition device, such as the camera, and the positioning information.
[0079] Lane line images can originate from frames in videos captured by in-vehicle image acquisition devices, or from still images captured by such devices. Step 101 involves converting the lane line pixels in each lane line image into GPS coordinates.
[0080] Step 102: Map the GPS coordinate points of the at least one lane line image onto the target image according to a preset ratio to form lane line pixels;
[0081] The preset ratio can be flexibly set based on actual conditions, and this application does not impose any limitations. It should be noted that the GPS coordinates of all lane line images are mapped to the same target image. This mapping allows multiple GPS coordinate points to be mapped to the same pixel in the target image, thus significantly reducing the total data volume. Furthermore, this mapping enables data supplementation from other images when data is missing in a single image (e.g., due to vehicle occlusion).
[0082] Optionally, the preset ratio in this application can be a preset precision ratio, used to map at least two GPS coordinate points to the same lane line pixel. That is, this application can map GPS coordinate points calculated based on at least two lane line images to the target image to form lane line pixels according to a preset precision ratio. Under this preset precision ratio, multiple GPS coordinate points can be mapped to the same lane line pixel, significantly reducing the total data volume. Furthermore, if a single lane line image has missing information, such as occlusion, it can be supplemented from other lane line images.
[0083] The preset precision ratio can be flexibly set based on the actual situation, and this application does not limit it. For example, the preset precision ratio is 10cm / pixel.
[0084] As a concrete example, see Figure 2 This is an example diagram illustrating how GPS coordinates of multiple lane line images are mapped to the same target image, as shown in an embodiment of this application. Specifically, Figure 2It is based on GPS coordinates calculated from multiple lane line images and mapped according to a certain precision ratio, realizing the merging of calculation results from multiple lane line images to minimize the impact of noise and occlusion from a single image on the calculation results.
[0085] Step 103: Determine the lane line coordinates of the lane line pixels based at least on the driving trajectory of the target vehicle;
[0086] The target vehicle is the vehicle that acquired the aforementioned lane line image. The target vehicle's driving trajectory is specifically a series of ordered GPS coordinate points, which can indicate the position and direction of the target vehicle at each point in time during its driving process. Therefore, the lane line coordinates of the lane line pixels in the target image can be determined at least based on the target vehicle's driving trajectory.
[0087] Step 104: Group the lane line coordinate points.
[0088] In this embodiment, GPS coordinates calculated from lane line pixels in at least one lane line image are mapped to the target image according to a preset ratio to form lane line pixels. This transforms the calculation of a large number of GPS coordinates into the calculation of pixels in the target image, reducing the computational load to a certain extent. Furthermore, the preset ratio mapping allows multiple GPS coordinates to be mapped to the same pixel, reducing the overall data volume. The lane line coordinates of the lane line pixels are determined at least based on the target vehicle's driving trajectory, and these coordinates are grouped. This grouping of lane line data reduces the computational load. Moreover, by merging the calculation results of multiple lane line images, the impact of noise and occlusion from a single image on the calculation results is minimized, further improving computational efficiency by reducing redundant data.
[0089] Another method embodiment of this application provides a method for grouping lane line data. This embodiment mainly describes the specific implementation of the step "determining the lane line coordinates of the lane line pixels based at least on the driving trajectory of the target vehicle".
[0090] Specifically, determining the lane line coordinates of the lane line pixels based at least on the target vehicle's driving trajectory can include the following process:
[0091] (1.1) Determine the starting marker point in the lane line pixels and the detection direction corresponding to the starting marker point based at least on the driving trajectory of the target vehicle;
[0092] The target vehicle's driving trajectory is specifically a series of ordered GPS coordinate points, which can indicate the position and direction of the target vehicle at each point in time during its driving process. Therefore, the series of GPS coordinate points used to characterize the target vehicle's driving trajectory are also mapped onto the target image according to the same preset ratio as mentioned above, forming pixels for the target vehicle's driving trajectory. This allows for the detection of the starting marker point in the lane line pixels and the detection direction corresponding to the starting marker point in chronological order and direction.
[0093] During the detection of the initial marker point, lane line pixels can be detected sequentially within a specified range, based on the pixels of the driving trajectory. If a lane line pixel exists and can be connected with other lane line pixels to form a shape similar to a "line", then the lane line pixel is determined as the initial marker point. The detection direction is determined based on the driving direction corresponding to the current pixel of the driving trajectory and the direction of the "line". Specifically, it should be roughly consistent with the driving direction corresponding to the current pixel of the driving trajectory and the direction of the "line" (i.e., the direction angle error is within the allowable error range).
[0094] (1.2) Taking the initial marker point as the first currently determined marker point, determine multiple marker points in the lane line pixels and the detection direction corresponding to each marker point in sequence.
[0095] In the process of determining the marker points in sequence, each marker point is determined as the currently determined marker point. Then, the following steps (1.3) to (1.5) need to be performed on the currently determined marker point.
[0096] (1.3) In the process of sequentially determining multiple marker points in the lane line pixels and the detection direction corresponding to each marker point, a detection area of a specified shape and size is determined based on the currently determined marker point and the detection direction corresponding to the currently determined marker point.
[0097] The shape and size of the detection area are preset, and the specific form is not limited in this application. For example, the detection area can be rectangular, starting from the currently determined marker point, extending a first length along the detection direction, and then extending a first width to the left and right of the detection direction perpendicular to the detection direction and based on the currently determined marker point to form a rectangular detection area. The values of the first length and the first width can be flexibly set based on the actual situation.
[0098] Figure 3aA specific example of a rectangular detection area is shown. Starting from the currently determined marker point A1, the detection direction is extended by L1, and then extended by a first width d1 to the left and right of the detection direction, perpendicular to the detection direction and based on the currently determined marker point A1, to form a rectangular area composed of dashed boxes. This rectangular area is the detection area.
[0099] As another way to determine the rectangular detection area, the currently determined marker point is used as the center of the rectangular area. A second length is extended along the detection direction and in the opposite direction to form the length of the rectangle, and a second width is used as the width of the rectangle, thus establishing a rectangular detection area. The values of the second length and the second width can be flexibly set based on the actual situation.
[0100] Of course, the detection area can also be a fan-shaped area, with the currently determined marker point as the center point and the third length as the radius, extending to the left and right of the detection direction by a first angle to form a fan-shaped detection area. The values of the third length and the first angle can be flexibly set based on the actual situation.
[0101] Figure 3b A specific example of a fan-shaped detection area is shown. With the currently determined marker point A1 as the center point and the radius r1, the fan-shaped area is formed by the dashed frame by extending to the left and right sides of the detection direction by a first angle θ1. This fan-shaped area is the detection area.
[0102] (1.4) Determine the road direction of the currently determined marker within the detection area;
[0103] In this embodiment, determining the road direction of the currently determined marker point within the detection area may include the following process:
[0104] A first coordinate system is established with the currently determined marker point as the origin, and different specified angle directions as the vertical coordinate directions and directions perpendicular to the vertical coordinate directions as the horizontal coordinate directions within the detection area. The lane line pixels within the detection area are projected onto the horizontal coordinate directions, the projection width is calculated, and the angle direction with the smallest projection width in the first coordinate system is determined as the road direction of the currently determined marker point.
[0105] In the above process, taking the currently determined marker point as the origin, multiple different first coordinate systems can be established within the detection area. The specified angle direction under each coordinate system is different, and the specific specified angle direction can be flexibly set based on the actual situation. For example, a first coordinate system can be established every 5°, or other angle directions can be achieved.
[0106] The projection width can be the sum of the projection widths of all lane line pixels within the detection area projected onto the horizontal coordinate, or it can be the average of the sum of the projection widths of all lane line pixels within the detection area projected onto the horizontal coordinate relative to the number of lane lines formed by all lane line pixels within the detection area. For example, if all lane line pixels within the detection area form three lane lines, then the projection width can be the average of the projection widths of the three lane lines projected onto the horizontal coordinate.
[0107] To improve the accuracy of calculating the projection width, optionally, in this embodiment of the application, calculating the projection width may include: calculating the projection width based on the weights of at least two lane lines formed by the lane line pixels within the detection area.
[0108] The weight of a lane line is proportional to its distance from the currently determined marker point. In this embodiment, each lane line formed by lane line pixels within the detection area can be assigned a weight, with higher weights closer to the marker point and lower weights farther away.
[0109] (1.5) Record the lane line pixel points in the detection area in the first coordinate system formed based on the currently determined marker point and the road direction.
[0110] The specific recorded data can be the correspondence between the currently determined marker point and road direction and the lane line coordinate points of the lane line pixels in the detection area in the first coordinate system. The marker point and the road direction corresponding to the marker point can be determined in a large coordinate system established with the target image, and the lane line coordinate points of the lane line pixels are determined in the first coordinate system.
[0111] In another embodiment of the method in this application, grouping the lane line coordinate points may include the following process:
[0112] The lane line coordinate points in the first coordinate system are converted into lane line coordinate points in the road coordinate system, and the lane line coordinate points are grouped based on the horizontal coordinate values of the lane line coordinate points in the road coordinate system.
[0113] During the conversion, the ordinate values of the lane line coordinate points in the first coordinate system are converted to the ordinate values of the lane line coordinate points in the road coordinate system. In other words, the abscissa values of the lane line coordinate points in the first coordinate system can be directly used as the abscissa values of the lane line coordinates in the road coordinate system.
[0114] The ordinate value is transformed based on the position of the marker point corresponding to the first coordinate system. Specifically, the ordinate value of the lane line coordinate point in the road coordinate system is obtained by adding the distance between the marker point corresponding to the first coordinate system and the first starting marker point to the ordinate value in the first coordinate system.
[0115] When grouping lane line coordinate points based on the abscissa value of the lane line coordinate points in the road coordinate system, lane line coordinate points whose abscissa value error is within a set error range can be grouped together. That is, they can be grouped by the distance of the lane line coordinate points from the ordinate axis. Lane line coordinate points with different distances from the ordinate axis can be divided into different groups, and all lane line coordinate points in the same group belong to the same lane line.
[0116] In another embodiment of the method in this application, during the process of sequentially determining multiple marker points in the lane line pixels and the detection direction corresponding to each marker point, after calculating the road direction of the currently determined marker point, the road direction is used as the detection direction of the next marker point, and the marker point detection process is executed cyclically until the number of empty marker points reaches a specified number.
[0117] The marker detection process includes: determining whether a lane line pixel is detected at a position that is a specified length longer along the detection direction based on the currently determined marker point; if so, determining the detected lane line pixel as the next marker point; if not, marking an empty marker point at the position, using the empty marker point as the next marker point, and accumulating the number of empty marker points.
[0118] Understandably, this application determines multiple marker points among the lane line pixels sequentially. For each marker point determined, the road direction of the current marker point is determined according to the method described above, and the lane line coordinates are recorded in the corresponding first coordinate system. After determining the road direction of the current marker point, this road direction is used as the detection direction for the next marker point. The next marker point is determined by executing the marker point detection process, and the determined next marker point becomes the currently determined marker point. The road direction of the current marker point is then determined again according to the method described above, and the lane line coordinates are recorded in the corresponding first coordinate system. This process is repeated cyclically to determine the marker points.
[0119] The specified length and quantity can be set based on actual circumstances, and this application does not impose any restrictions.
[0120] In another embodiment of the method in this application, when the number of empty marker points reaches the specified number, the marker point re-detection process is executed cyclically until the driving trajectory of the target vehicle ends.
[0121] The re-detection process of the marker point includes: interrupting the detection of the marker point at the current detection direction, and re-detecting the undetected lane line pixels among the lane line pixels based on the driving trajectory of the target vehicle, so as to re-determine the next marker point among the lane line pixels and the detection direction corresponding to the marker point; and
[0122] After calculating the road direction of the currently determined marker point, the marker point detection process is repeated until the number of empty marker points reaches a specified number.
[0123] In the above process, the process of re-detecting undetected lane line pixels based on the target vehicle's driving trajectory to determine the marker point and the corresponding detection direction is similar to the previous process of detecting the starting marker point in the lane line pixels. The difference is that the detection position is different, but both are to detect the undetected areas in the lane line pixels according to the order of the driving trajectory.
[0124] Once the next marker point in the lane line pixels and the corresponding detection direction are determined again based on the target vehicle's driving trajectory, the road direction of the current marker point is determined in the manner described above, and the lane line coordinates are recorded in the corresponding first coordinate system. After determining the road direction of the current marker point, this road direction is used as the detection direction of the next marker point, and the next marker point is determined by executing the marker point detection process. The determined next marker point is used as the currently determined marker point. The road direction of the current marker point is then determined again in the manner described above, and the lane line coordinates are recorded in the corresponding first coordinate system. This process is repeated cyclically to determine the marker point until the number of empty marker points reaches a specified number. Then, based on the target vehicle's driving trajectory, the next marker point in the lane line pixels and the corresponding detection direction are determined again, and this process is repeated cyclically to determine the marker point.
[0125] Optionally, to improve the accuracy of lane line data grouping, after the detection process is completed, all lane line coordinate points recorded in the first coordinate system can be smoothed to eliminate abnormal lane line coordinate points. Figure 4 A schematic diagram of multiple first coordinate systems established after the target image detection process is completed is shown.
[0126] In relation to the above embodiments, another method embodiment of this application provides a method for grouping lane line data, the specific process of which is as follows:
[0127] (2.1) Solve the GPS coordinates of the lane line pixels in at least one lane line image.
[0128] (2.2) Map the GPS coordinates of the at least one lane line image onto the target image according to a preset ratio to form lane line pixels.
[0129] (2.3) Determine the starting marker point in the lane line pixels and the detection direction corresponding to the starting marker point based at least on the driving trajectory of the target vehicle, and use the starting marker point as the currently determined marker point.
[0130] (2.4) Based on the currently determined marker point and the detection direction corresponding to the currently determined marker point, determine a detection area of a specified shape and size.
[0131] (2.5) Determine the road direction of the currently determined marker within the detection area.
[0132] (2.6) Record the lane line pixel points in the detection area in the first coordinate system formed based on the currently determined marker point and the road direction.
[0133] (2.7) Using the road direction of the currently determined marker point as the detection direction of the next marker point, determine whether a lane line pixel point is detected at a position where a specified length is added along the detection direction based on the currently determined marker point. If so, determine the detected lane line pixel point as the next marker point and use the next marker point as the currently determined marker point, and return to step (2.4).
[0134] If not, mark an empty marker at the location, determine the empty marker as the next marker, and use the next marker as the currently determined marker. Return to step (2.4) and accumulate the number of empty markers. When the number of empty markers reaches a specified number, interrupt the detection of the marker at the current detection direction and continue to step (2.9).
[0135] (2.9) Re-detect the undetected lane line pixels in the lane line pixels based on the driving trajectory of the target vehicle, so as to determine the next marker point in the lane line pixels and the detection direction corresponding to the marker point again. Take the re-determined next marker point as the currently determined marker point and return to step (2.4).
[0136] Re-detect the undetected lane line pixels based on the target vehicle's driving trajectory until the target vehicle's driving trajectory ends, then complete this detection and proceed to step (3.0).
[0137] (3.0) Smooth all lane line coordinate points in the first coordinate system;
[0138] (3.1) Convert all lane line coordinate points in the first coordinate system after smoothing to lane line coordinate points in the road coordinate system;
[0139] (3.2) Group the lane line coordinate points based on the horizontal coordinate values of the lane line coordinate points in the road coordinate system.
[0140] In this embodiment, GPS coordinates calculated from lane line pixels in at least one lane line image are mapped to the target image according to a preset ratio to form lane line pixels. This transforms the calculation of a large number of GPS coordinates into the calculation of pixels in the target image, reducing the computational load to a certain extent. Furthermore, the preset ratio mapping allows multiple GPS coordinates to be mapped to the same pixel, reducing the overall data volume. In addition, the lane line coordinates of the lane line pixels are determined at least based on the driving trajectory of the target vehicle, and the lane line coordinates are grouped, achieving the grouping of lane line data while reducing the computational load.
[0141] Furthermore, this application can reduce the reliance on the target vehicle's driving trajectory and can group lane line data based on road direction, thereby further improving the accuracy of lane line data grouping.
[0142] Corresponding to the aforementioned application function implementation method embodiments, this application also provides a lane line data grouping device, electronic device, and corresponding embodiments.
[0143] Figure 5 This is a schematic diagram of the structure of a device for grouping lane line data, as shown in one embodiment of this application.
[0144] See Figure 5 The device for grouping lane line data includes: a first calculation unit 110, a first mapping unit 120, a first determination unit 130, and a first grouping unit 140; wherein:
[0145] The first calculation unit 110 is used to calculate the GPS coordinates of the lane line pixels in at least one lane line image.
[0146] The first mapping unit 120 is used to map the GPS coordinate points of the at least one lane line image onto the target image according to a preset ratio to form lane line pixels.
[0147] Optionally, the lane line images include at least two images; wherein the preset ratio is a preset precision ratio, used to map at least two GPS coordinate points to the same lane line pixel.
[0148] The first determining unit 130 is used to determine the lane line coordinates of the lane line pixels based at least on the driving trajectory of the target vehicle.
[0149] The first grouping unit 140 is used to group the lane line coordinate points.
[0150] In this embodiment, GPS coordinates calculated from lane line pixels in at least one lane line image are mapped to the target image according to a preset ratio to form lane line pixels. This transforms the calculation of a large number of GPS coordinates into the calculation of pixels in the target image, reducing the computational load to a certain extent. Furthermore, the preset ratio mapping allows multiple GPS coordinates to be mapped to the same pixel, reducing the overall data volume. The lane line coordinates of the lane line pixels are determined at least based on the target vehicle's driving trajectory, and these coordinates are grouped. This grouping of lane line data reduces the computational load. Moreover, by merging the calculation results of multiple lane line images, the impact of noise and occlusion from a single image on the calculation results is minimized, further improving computational efficiency by reducing redundant data.
[0151] In another device embodiment of this application, such as Figure 6 As shown, the first determining unit 130 includes: a first determining module 1301, a second determining module 1302, a region determining module 1303, a direction determining module 1304, and a coordinate recording module 1305; wherein:
[0152] The first determining module 1301 is used to determine, at least based on the driving trajectory of the target vehicle, the starting marker point in the lane line pixels and the detection direction corresponding to the starting marker point;
[0153] The second determining module 1302 is used to determine multiple marker points in the lane line pixels and the detection direction corresponding to each marker point in sequence, taking the starting marker point as the first currently determined marker point.
[0154] The region determination module 1303 is used to determine a detection region of a specified shape and size based on the currently determined marker point and the detection direction corresponding to the currently determined marker point, during the process of the second determination module sequentially determining multiple marker points in the lane line pixels and the detection direction corresponding to each marker point.
[0155] The direction determination module 1304 is used to determine the road direction of the currently determined marker point within the detection area;
[0156] In this embodiment, the direction determination module 1304 is specifically used to establish a first coordinate system with the currently determined marker point as the origin, different specified angle directions as the vertical coordinate direction in the detection area, and a direction perpendicular to the vertical coordinate direction as the horizontal coordinate direction; projecting the lane line pixels in the detection area onto the horizontal coordinate direction and calculating the projection width; and
[0157] The angular direction in the first coordinate system with the smallest projection width is determined as the road direction of the currently determined marker point.
[0158] Optionally, the direction determination module 1304 calculates the projection width by: calculating the projection width based on the weights of at least two lane lines formed by the lane line pixels within the detection area;
[0159] The weight of the lane line is proportional to the distance between the lane line and the currently determined marker point.
[0160] The coordinate recording module 1305 is used to record the lane line pixel points in the detection area in a first coordinate system based on the currently determined marker point and the road direction.
[0161] In another embodiment of the apparatus in this application, the first grouping unit includes:
[0162] The first conversion module is used to convert lane line coordinate points in the first coordinate system into lane line coordinate points in the road coordinate system.
[0163] The first grouping module is used to group the lane line coordinate points based on the horizontal coordinates of the lane line coordinate points in the road coordinate system.
[0164] In another embodiment of the apparatus in this application, the second determining module is specifically used to determine, in the process of sequentially determining multiple marker points in the lane line pixels and the detection direction corresponding to each marker point, after the direction determining module determines the road direction of the currently determined marker point, use the road direction as the detection direction of the next marker point, and cyclically execute the marker point detection process until the number of empty marker points reaches a specified number.
[0165] The marker detection process includes:
[0166] Based on the currently determined marker point, determine whether a lane line pixel is detected at a position that increases by a specified length along the detection direction. If yes, the detected lane line pixel is determined as the next marker point. If no, an empty marker point is marked at the position, the empty marker point is determined as the next marker point, and the number of empty marker points is accumulated.
[0167] In another embodiment of the apparatus in this application, the second determining module is further configured to cyclically execute the marker re-detection process until the driving trajectory of the target vehicle ends when the number of empty marker points reaches the specified number.
[0168] The re-probe process for the marker points includes:
[0169] The detection of the marker point is interrupted at the current detection direction, and the undetected lane line pixels in the lane line pixels are re-detected based on the driving trajectory of the target vehicle, so as to re-determine the next marker point in the lane line pixels and the detection direction corresponding to the marker point; and
[0170] After the direction determination module calculates the road direction of the currently determined marker point, the marker point detection process is executed cyclically until the number of empty marker points reaches the specified number.
[0171] Optionally, to improve the accuracy of lane line data grouping, the device may further include a smoothing unit for smoothing all recorded lane line coordinate points in the first coordinate system after the detection process is completed, thereby eliminating abnormal lane line coordinate points.
[0172] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated further here.
[0173] Figure 7 This is a schematic diagram of the structure of an electronic device shown in one embodiment of this application.
[0174] See Figure 7 The electronic device 1000 includes a memory 1010 and a processor 1020.
[0175] The processor 1020 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0176] Memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. ROM may store static data or instructions required by the processor 1020 or other modules of the computer. Permanent storage devices may be read-write storage devices. Permanent storage devices may be non-volatile storage devices that retain stored instructions and data even when the computer is powered off. In some embodiments, permanent storage devices use mass storage devices (e.g., magnetic or optical disks, flash memory) as permanent storage devices. In other embodiments, permanent storage devices may be removable storage devices (e.g., floppy disks, optical drives). System memory may be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. System memory may store some or all of the instructions and data required by the processor during operation. Furthermore, memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, memory 1010 may include a removable storage device that is readable and / or writable, such as a laser disc (CD), a read-only digital multifunction optical disc (e.g., DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, an ultra-high density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not contain carrier waves or transient electronic signals transmitted wirelessly or via wired connections.
[0177] The memory 1010 stores executable code, which, when processed by the processor 1020, can cause the processor 1020 to execute part or all of the methods described above.
[0178] The solution of this application has been described in detail above with reference to the accompanying drawings. In the above embodiments, the descriptions of each embodiment have different emphases; parts not described in detail in a certain embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art should also understand that the actions and modules involved in the specification are not necessarily essential to this application. Furthermore, it is understood that the steps in the method of this application embodiment can be adjusted, combined, and deleted according to actual needs, and the modules in the device of this application embodiment can be combined, divided, and deleted according to actual needs.
[0179] Furthermore, the method according to this application can also be implemented as a computer program or computer program product, which includes computer program code instructions for performing some or all of the steps in the method described above.
[0180] Alternatively, this application may be implemented as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) storing executable code (or computer program, or computer instruction code) that, when executed by a processor of an electronic device (or electronic device, server, etc.), causes the processor to perform some or all of the steps of the methods described above according to this application.
[0181] Those skilled in the art will also understand that the various exemplary logic blocks, modules, circuits, and algorithm steps described in connection with the present application can be implemented as electronic hardware, computer software, or a combination of both.
[0182] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0183] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method of lane line data packeting, characterized in that, The method comprises the following steps: Solving the lane line pixel points in at least one lane line picture into GPS coordinate points; Mapping the GPS coordinate points of the at least one lane line picture into a target picture according to a preset ratio to form lane line pixel points; Determining a starting marker point in the lane line pixel points and a detection direction corresponding to the starting marker point based on at least the driving track of the target vehicle; Determining a plurality of marker points in the lane line pixel points and a detection direction corresponding to each marker point in sequence, taking the starting marker point as a first currently determined marker point; During the process of sequentially determining a plurality of marker points in the lane line pixel points and a detection direction corresponding to each marker point, determining a detection region of a specified shape and size based on the currently determined marker point and the detection direction corresponding to the currently determined marker point; Determining a road direction of the currently determined marker point in the detection region; Recording lane line coordinate points of the lane line pixel points in the detection region in a first coordinate system formed based on the currently determined marker point and the road direction; Grouping the lane line coordinate points.
2. The method of claim 1, wherein, During the process of sequentially determining a plurality of marker points in the lane line pixel points and a detection direction corresponding to each marker point, when the road direction of the currently determined marker point is determined, taking the road direction as the detection direction of the next marker point, and cyclically executing the marker point detection process until the number of empty marker points reaches a specified number; The marker point detection process comprises the following steps: Determining whether a lane line pixel point is detected at a position with a specified length increased along the detection direction based on the currently determined marker point, if yes, determining the detected lane line pixel point as the next marker point, if no, marking an empty marker point at the position, determining the empty marker point as the next marker point, and accumulating the number of empty marker points.
3. The method of claim 2, wherein, When the number of empty marker points reaches the specified number, cyclically executing a marker point re-detection process until the driving track of the target vehicle ends: The marker point re-detection process comprises the following steps: Interrupting the detection of the marker point at the current detection direction, re-detecting the undetected lane line pixel points in the lane line pixel points based on the driving track of the target vehicle to determine the next marker point in the lane line pixel points and the detection direction corresponding to the marker point again; and After calculating the road direction of the currently determined marker point, cyclically executing the marker point detection process until the number of empty marker points reaches the specified number.
4. The method of claim 1, wherein, The step of determining the road direction of the currently determined marker point in the detection region comprises the following steps: Establishing a first coordinate system with the currently determined marker point as the origin, sequentially taking different specified angle directions as the longitudinal coordinate direction in the detection region, taking the direction perpendicular to the longitudinal coordinate direction as the transverse coordinate direction, projecting the lane line pixel points in the detection region to the transverse coordinate direction to calculate the projection width; Determining the angle direction of the first coordinate system with the minimum projection width as the road direction of the currently determined marker point.
5. The method of claim 1, wherein, The grouping of the lane line coordinate points comprises: Converting the lane line coordinate points in the first coordinate system into lane line coordinate points in a road coordinate system; Grouping the lane line coordinate points in the road coordinate system based on the abscissa values of the lane line coordinate points.
6. The method of claim 4, wherein, The calculation of the projection width comprises: Calculating the projection width based on the weights of at least two lane lines formed by the lane line pixel points in the detection area; wherein the weight of the lane line is in a proportional relationship with the distance of the lane line from the currently determined marker point.
7. The method of claim 1, wherein, The lane line pictures comprise at least two pictures; The preset proportion is a preset precision proportion, and is used to map the at least two GPS coordinate points to the same lane line pixel point.
8. Apparatus for lane line data packets, characterized in that Comprise: The first solving unit is configured to solve the lane line pixel points in the at least one lane line picture into GPS coordinate points; The first mapping unit is configured to map the GPS coordinate points of the at least one lane line picture into a target picture according to a preset proportion, to form lane line pixel points; The first determining unit comprises a first determining module, a second determining module, an area determining module, a direction determining module, and a coordinate recording module; The first determining module is configured to determine, based on at least the driving trajectory of the target vehicle, a starting marker point in the lane line pixel points and a detection direction corresponding to the starting marker point; The second determining module is configured to determine, in sequence, a plurality of marker points in the lane line pixel points and a detection direction corresponding to each marker point, with the starting marker point as a first currently determined marker point; The area determining module is configured to determine, in the process in which the second determining module determines, in sequence, the plurality of marker points in the lane line pixel points and the detection direction corresponding to each marker point, a detection area of a specified shape and size, with the currently determined marker point and the detection direction corresponding to the currently determined marker point as a reference; The direction determining module is configured to determine a road direction of the currently determined marker point in the detection area; The coordinate recording module is configured to record lane line coordinate points of the lane line pixel points in the detection area in a first coordinate system formed based on the currently determined marker point and the road direction; The first grouping unit is configured to group the lane line coordinate points.
9. The apparatus of claim 8, wherein, The second determining module is specifically configured to, in the process in which the plurality of marker points in the lane line pixel points and the detection direction corresponding to each marker point are determined in sequence, execute a marker point detection process cyclically until the number of empty marker points reaches a specified number, with the road direction as the detection direction of a next marker point after the direction determining module determines the road direction of the currently determined marker point; The marker point detection process comprises: Determining whether a lane line pixel point is detected at a position that is increased by a specified length along the detection direction with the currently determined marker point as a reference, determining the detected lane line pixel point as a next marker point if yes, and determining an empty marker point at the position and determining the empty marker point as the next marker point if no, and accumulating the number of empty marker points.
10. The apparatus of claim 9, wherein, The second determining module is specifically further configured to perform a marker point re-detection process cyclically until the driving track of the target vehicle ends when the number of the empty marker points reaches the specified number. The marker point re-detection process includes: interrupting the detection of the marker point at the current detection direction, re-detecting the undetected lane line pixel points in the lane line pixel points based on the driving track of the target vehicle, to determine again the next marker point in the lane line pixel points and the detection direction corresponding to the marker point; and After the direction determining module calculates the road direction of the currently determined marker point, the marker point detection process is performed cyclically until the number of the empty marker points reaches the specified number.
11. The apparatus of claim 8, wherein, The direction determining module is specifically configured to establish a first coordinate system with the currently determined marker point as an origin, with different specified angle directions as longitudinal coordinate directions and directions perpendicular to the longitudinal coordinate directions as transverse coordinate directions in the detection region, project the lane line pixel points in the detection region to the transverse coordinate directions, and calculate a projection width. And determine the angle direction under the first coordinate system with the minimum projection width as the road direction of the currently determined marker point.
12. The apparatus of claim 8, wherein, The first grouping unit includes: a first conversion module configured to convert the lane line coordinate points under the first coordinate system into lane line coordinate points in a road coordinate system; a first grouping module configured to group the lane line coordinate points based on the transverse coordinate values of the lane line coordinate points in the road coordinate system.
13. The apparatus of claim 11, wherein, The direction determining module calculates the projection width, specifically: calculates the projection width based on the weights of at least two lane lines formed by the lane line pixel points in the detection region; wherein the weight of the lane line is in a direct proportion relationship with the distance of the lane line from the currently determined marker point.
14. The apparatus of claim 8, wherein, The lane line pictures include at least two pictures; wherein the preset ratio is a preset precision ratio, used to map at least two GPS coordinate points to the same lane line pixel point.
15. An electronic device, comprising: It includes: a processor; and a memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method of any one of claims 1-7.
16. A non-transitory machine-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method of any one of claims 1-7.
Citation Information
Patent Citations
Lane line fitting method and device and computer readable storage medium
CN114882145A
Lane line positioning method and device, electronic equipment and storage medium
CN115507862A