Method and device for generating lane line, electronic equipment and storage medium

By splitting and rectangular fitting of the contour points of the lane line in the high-precision map, combining intra-frame grouping, inter-frame merging and smoothing processing, the lane line accuracy deviation problem after curve fitting is solved, achieving more efficient and accurate lane line generation, and providing more accurate lane line information for autonomous driving.

CN119741321AActive Publication Date: 2025-04-01ZHIDAO NETWORK TECH (BEIJING) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510238074.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-04-01
Estimated Expiration
2045-03-03

AI Technical Summary

Technical Problem

During the high-precision map production process, the lane line after the curve fitting has an accuracy deviation from the actual lane line calculated, and the calculation amount is large, which may lead to the situation where the optimal solution cannot be found in multiple iterations, and it is impossible to provide more accurate lane line information for autonomous driving.

Method used

By splitting the outline points of the lane line in a single frame image into multiple convex polygons and fitting them into rectangles, the long side direction of the rectangle is the same as the driving direction. Then the fitted rectangles are grouped intra-frame and merged inter-frame to obtain the grouped lane line rectangle, sorting and smoothing are performed to generate more accurate lane lines.

Benefits of technology

It improves the processing efficiency of lane lines, reduces grouping errors, and the generated lane lines are more accurate, which can provide lane line information for autonomous driving more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741321A_ABST
    Figure CN119741321A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for generating a lane line, electronic equipment and a storage medium. The method comprises the steps that after lane line contour points of a single frame of image are obtained, the contour of a lane line in the frame of image is split into a plurality of convex polygons, the convex polygons are fitted into rectangles, and the long side direction of the rectangles is the same as the driving direction; performing intra-frame grouping and inter-frame merging on the rectangles obtained by fitting to obtain grouped lane line rectangles; performing sorting verification on the grouped lane line rectangles to obtain center points of multiple groups of lane line rectangles; and smoothing the rectangular center points of each group of lane lines to obtain a group of smooth points corresponding to the corresponding lane lines. According to the scheme provided by the invention, the lane line precision can be quickly processed and improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of high-precision map image processing, and in particular to a method, device, electronic device and storage medium for generating lane lines. Background Art

[0002] In the process of making high-precision maps, after solving the contour points of the lane line, the contour points of the lane line can be curve-fitted to generate smooth lane lines. However, the lane line after curve fitting needs to conform to the curve equation within a certain section, while the actual lane line may not conform to the curve equation. This phenomenon causes the lane line after curve fitting to have an accuracy deviation from the actual calculated lane line. In curve fitting, the positions of the first and last points may also change, and the curve fitting algorithm performs curve fitting on all points. Although the least squares principle can be used to minimize the global error, the amount of calculation is large, and it may be that the optimal solution cannot be found after multiple iterations, and thus it is impossible to provide more accurate lane line information for autonomous driving. Summary of the invention

[0003] In order to solve or partially solve the problems existing in the related art, the present application provides a method, device, electronic device and storage medium for generating lane lines, which can quickly process and improve the accuracy of lane lines.

[0004] The first aspect of the present application provides a method for generating lane lines, comprising: After obtaining the lane line contour points of a single frame image, split the lane line contour in the frame image into multiple convex polygons, and fit the convex polygons into rectangles, wherein the long side direction of the rectangle is the same as the driving direction; Performing intra-frame grouping and inter-frame merging on the fitted rectangles to obtain grouped lane line rectangles; Sorting and checking the grouped lane line rectangles to obtain the center points of multiple groups of lane line rectangles; Each group of lane line rectangular center points is smoothed to obtain a group of smooth points corresponding to the lane line.

[0005] In an optional embodiment, it also includes: After obtaining a group of the smooth points, a thinning process is performed on the group of the smooth points.

[0006] In an optional implementation, the thinning process of the group of smooth points includes: Determining a curvature level of a current segment of the lane line according to an average curvature of a plurality of adjacent smooth points within a preset window; Depending on the level of curvature, a corresponding number of smoothing points are retained.

[0007] In an optional implementation, splitting the outline of the lane line in the frame image into a plurality of convex polygons includes: The concave polygon formed by the outline of the intersecting or curved lane line is split into multiple convex polygons, wherein each of the convex polygons represents a different part of the lane line.

[0008] In an optional implementation, the step of performing sorting verification on the grouped lane line rectangles to obtain a plurality of groups of lane line rectangle center points includes: After obtaining the grouped lane line rectangles, for each rectangle center point in a group of lane line rectangles, determine that the direction of a vector formed by any two adjacent rectangle center points is the same as the driving direction; The plurality of rectangular center points are filtered, and each of the filtered rectangular center points is used as a lane line rectangular center point of a corresponding group.

[0009] In an optional implementation, the smoothing process of each group of lane line rectangular center points to obtain a group of smooth points corresponding to the lane line includes: For a set of lane line rectangular center points, a plurality of insertion points are set between two adjacent lane line rectangular center points according to the curvature of two adjacent lane line rectangular center points; The insertion point is dynamically adjusted according to the set multiple curvature thresholds and the corresponding windows, and the adjusted insertion point and the two lane line rectangle center points are used as a group of smooth points.

[0010] In an optional implementation, dynamically adjusting the insertion point according to the set multiple curvature thresholds and corresponding windows includes: Calculating the average curvature of each insertion point according to the curvature range corresponding to the center points of two adjacent lane line rectangles; Determine the required window according to the set multiple curvature thresholds and corresponding windows and the average curvature of the insertion point; According to the coordinates of the insertion point, the average coordinates of all the insertion points in the adjacent windows and the center point of the lane line rectangle are taken as the adjusted coordinates of the insertion point.

[0011] A second aspect of the present application provides a device for generating lane lines, including: A splitting and fitting module is configured to, after acquiring the lane line contour points of a single frame image, split the lane line contour in the frame image into a plurality of convex polygons, and fit the convex polygons into rectangles, wherein the long side direction of the rectangle is the same as the driving direction; A grouping and merging module is configured to perform intra-frame grouping and inter-frame merging on the fitted rectangles to obtain grouped lane line rectangles; A sorting and verification module is configured to perform sorting and verification on the grouped lane line rectangles to obtain a plurality of groups of lane line rectangle center points; The smoothing processing module is configured to smooth each group of lane line rectangular center points to obtain a group of smooth points corresponding to the lane line.

[0012] A third aspect of the present application provides an electronic device, including: Processor; and The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.

[0013] A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.

[0014] The technical solution provided by this application may have the following beneficial effects: The technical solution of the present application is to first group the lane line contour points, and then smooth the grouped lane lines to generate lane lines; wherein, in the process of grouping the lane line contour points, the contour of the lane line obtained in the single frame image is split into multiple convex polygons, and the convex polygons are fitted into rectangles, and each of the fitted rectangles is grouped within a frame and merged between frames to obtain a grouped lane line rectangle. By means of rectangles, the lane lines are grouped and merged, which can improve the processing efficiency of the lane lines, make the grouping efficiency higher, and also reduce the grouping error; in the process of smoothing the grouped lane lines, the grouped lane line rectangles are first sorted and checked to obtain multiple groups of lane line rectangle center points, and then each group of lane line rectangle center points is smoothed to obtain a group of smooth points corresponding to the corresponding lane lines, and a group of lane line rectangle center points is obtained from the grouped lane line rectangle combination, and then the group of lane line rectangle center points is smoothed. The processing method is simple, and the connection line of the smoothed points obtained by the smoothing process (which can be regarded as the lane line) is also smaller than the actual calculated lane line error than the lane line error obtained by directly performing curve fitting on the lane line contour points, that is, the generated lane line has higher accuracy.

[0015] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0017] Figure 1 is a flow chart of a method for generating lane lines shown in an embodiment of the present application; Figure 2 is a schematic diagram of the structure of a device for generating lane lines shown in an embodiment of the present application; Figure 3 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, 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.

[0019] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0020] 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 the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0021] In the related art, after the contour points of the lane line are solved, curve fitting is performed on the contour points of the lane line to generate a smooth lane line. However, the lane line after curve fitting needs to conform to the curve equation within a certain section, while the actual lane line may not conform to the curve equation. This phenomenon causes the lane line after curve fitting to have an accuracy deviation from the actually solved lane line, and the calculation amount is large, and it may also be the case that the optimal solution cannot be found after multiple iterations.

[0022] In response to the above problems, an embodiment of the present application provides a method for generating lane lines, which can quickly process and improve the accuracy of lane lines.

[0023] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0024] Figure 1 It is a flowchart of a method for generating lane lines shown in an embodiment of the present application.

[0025] like Figure 1 As shown, an embodiment of the present application provides a method for generating lane lines, which mainly includes steps S101 to S104.

[0026] Step S101: after obtaining the lane line contour points of a single frame image, split the lane line contour in the frame image into multiple convex polygons, and fit the convex polygons into rectangles, wherein the long side direction of the rectangle is the same as the driving direction.

[0027] For crossed or curved lane lines, the contours are irregular. Splitting crossed or curved lane lines into multiple lane lines can make each part of the lane line clearer and more specific, thereby avoiding confusion and uncertainty caused by crossed or curved parts. Therefore, the splitting of the contour of the lane line in the frame image into multiple convex polygons in step S101 can further be splitting the concave polygon formed by the contour of the crossed or curved lane line into multiple convex polygons, wherein each convex polygon represents a different part of the lane line. For the actual lane line, there will be a concave part in the lane line contour, that is, the contour of the lane line can be known from the lane line contour points obtained in the same frame image, and then the concave polygon formed by the contour of the lane line is split into multiple convex polygons, and each convex polygon can represent a different part of the lane line.

[0028] In this embodiment, each convex polygon in step S101 can represent different parts of the lane line, and each convex polygon is fitted to obtain a rectangle corresponding to each convex polygon, wherein the rectangle has length and width, four vertices and one center point, and a direction, which is roughly consistent with the driving direction, and the direction is used as the long side direction of the rectangle. When each rectangle has a direction, the direction of the rectangle can be used to provide intuitive direction guidance for vehicle driving. Then, in autonomous driving, the vehicle can more easily adjust the driving direction according to the direction of the rectangle.

[0029] Step S102: performing intra-frame grouping and inter-frame merging on the fitted rectangles to obtain grouped lane line rectangles.

[0030] In step S102, grouping the fitted rectangles within the frame may further include determining whether the horizontal distance between the two rectangles is below a set first distance threshold, if so, the two rectangles are in the same group, otherwise the two rectangles are in separate groups. Considering that there is also inter-frame merging, in order to quickly identify the same group in different frames, in step S102, after the intra-frame grouping is completed, the grouped rectangles may be further sorted.

[0031] In this embodiment, in step S102, it is determined whether the lateral distance between the two rectangles is below the set first distance threshold, wherein the lateral distance can be calculated by the projection distance of the two rectangle center points on the short side direction of the rectangle, and the first distance threshold L1 is taken according to the lateral distance of the two-line lane line and the lateral distance between two adjacent lane lines in the multi-line lane line. When the lane line is a two-line lane line, when it is determined that the lateral distance between the two rectangles is below the first distance threshold L1, it can be determined that the lane line corresponding to the two rectangles is a two-line lane line; when it is determined that the lateral distance between the two rectangles exceeds the first distance threshold L1, it means that the lateral distance is far, and they belong to different lane lines and cannot be processed in one group. For lane lines with more than three lines, the lateral distance between any two adjacent lane lines will also satisfy that the lateral distance between the two rectangles is below the set first distance threshold, and then all the related multiple rectangles can be divided into one group.

[0032] Taking into account that the present application ultimately groups the entire lane lines rather than the lane line data in a single frame image, in this embodiment, the sorting principle can be to assume that several groups of lane lines in the same frame image are in front of the vehicle and are sorted from left to right. Among them, for more than two rectangles in the same group, they can also be further sorted from left to right on the basis of the current group.

[0033] In step S102, merging the fitted rectangles between frames may further include comparing and merging the same groups of two consecutive frames using two layers of loops according to the acquisition time of different frames.

[0034] In this embodiment, the continuous first frame and the second frame each include several groups. A group of data is taken out from all lane line contour point data corresponding to the second frame, and all groups in the second frame are traversed through an outer loop. For each group in the second frame, a comparison operation is performed with each group in the first frame through an inner loop. After the comparison, the first frame and the second frame are merged, that is, the data of the two groups to be merged are integrated.

[0035] For ease of understanding, for example, if the first frame and the second frame are both two-dimensional arrays, each element can be regarded as a group, then through two layers of loops, each element in the second frame can be taken out in turn and compared with each element in the first frame. If certain conditions are met, they are merged into a new element.

[0036] In at least one embodiment, inter-frame merging of the fitted rectangles may include, after determining that there is an overlapping area between the rectangles of the jth group in the i+1th frame and the rectangles of the jth group in the i-th frame, determining that the horizontal and vertical distances between the rectangles of the jth group in the i+1th frame and the rectangles of the jth group in the i-th frame meet set conditions; wherein i and j are both positive integers, the horizontal distance between the rectangles of the jth group in the i+1th frame and the rectangles of the jth group in the i-th frame is below a set second distance threshold, the angle in the long side direction is below a set angle threshold, and the vertical distance is below a set third distance threshold.

[0037] In this embodiment, the merging principle can be that two rectangles can be merged into one group if they have an overlapping area, and further require that the two rectangles can be merged into one group if the horizontal distance is close and the direction angle is small and close to parallel, and the two rectangles cannot be merged into one group if the vertical distance is far and exceeds the third distance threshold. The merging can be performed only after all the above requirements are met, otherwise it cannot be merged. Assuming that rectangle A of the first group in the second frame is compared and merged with rectangle B of the first group in the first frame, and rectangle A and rectangle B have an overlapping area, it is further judged whether the horizontal distance between rectangle A and rectangle B is close and whether the direction angle is small and close to parallel. Under the premise of both, it is considered whether rectangle A and rectangle B are far apart in the vertical direction. Specifically, it can be quantified by the second distance threshold, the angle threshold and the third distance threshold, wherein the horizontal distance can be calculated by the projection distance of the two rectangle center points of the rectangle in the short side direction of the rectangle, which can also be understood as calculated by the distance of the straight line where the two rectangles are located, and the vertical distance can be calculated by the projection distance of the two rectangle center points of the two rectangles in the long side direction.

[0038] On the basis of at least one of the above-mentioned embodiments, inter-frame merging of the fitted rectangles may also include: after obtaining the jth merging group according to the matrix of the i-th frame, estimating the rectangle of the jth group of the i+1-th frame according to the curvature of the end of the jth merging group, wherein i and j are both positive integers and i≥2; and judging whether to merge the rectangle of the jth group of the i+1-th frame according to the estimated rectangle.

[0039] In this embodiment, it is assumed that after the 1st to 4th frames are merged, 3 merged groups are obtained. Taking the first group of the three merged groups as an example, the curvature of the terminal curve of the merged group is within a certain range. It can be determined whether the new frame rectangle to be added to the merged group can be merged into the group. Specifically, the curvature of the terminal curve of the merged group is used to estimate the estimated rectangle of the merged group at the distance where the new frame rectangle is located, and then it can be determined whether the estimated rectangle and the new frame rectangle can be merged. This embodiment can be used as a restriction condition to further determine whether the new frame rectangle can be merged into the merged group, which can improve the quality of the merge after grouping, and thus can make the final grouping effect of the lane line better.

[0040] It should be noted that step S101 and step S102 mainly involve grouping of lane line contour points, wherein the contour of the lane line corresponding to the lane line contour points in the same frame image is split to obtain multiple convex polygons, and then the convex polygons are fitted into rectangles. In this embodiment, the lane line is split to clearly identify the lane lines of each part, especially for crossed or curved lane lines, which can improve the recognition and positioning accuracy of the lane lines. The splitting and fitting are rectangles, and the long side direction of the rectangle is the same as the driving direction, which can also accurately determine the direction and boundary of the lane line. At the same time, using rectangles to fit the lane line contour can simplify the complex lane line shape into a rectangle with clear set characteristics, which is also more convenient for storage and processing; all the fitted rectangles are grouped within the frame, and the rectangles in the same frame are grouped first, so that the amount of data to be grouped is small and grouping errors are less likely to occur; then the same group is merged between frames according to the time sequence of different frames to obtain the grouped lane line rectangles. The lane line is grouped and merged with the help of rectangles, which can improve the processing efficiency of the lane line, make the grouping efficiency higher, and also reduce the grouping error. Therefore, the embodiments of the present application can quickly and efficiently group lane lines, especially crossed and curved lane lines.

[0041] Step S103: Sorting and verifying the grouped lane line rectangles to obtain multiple groups of lane line rectangle center points.

[0042] In some embodiments, step S103 may include: After obtaining the grouped lane line rectangles, for each rectangle center point in a group of lane line rectangles, determine that the direction of the vector formed by any two adjacent rectangle center points is the same as the driving direction; Multiple rectangular center points are filtered, and each filtered rectangular center point is used as the lane line rectangular center point of the corresponding group.

[0043] In this embodiment, a group of lane line rectangles are sorted and checked. The sorting principle is that the direction of the vector formed by the center points of two adjacent rectangles must be consistent with the direction of vehicle movement, and the longitudinal distance between the center points of two adjacent rectangles can be limited to about 1 meter. If the longitudinal distance is within 0.5 meters, it may be too curved and can be removed.

[0044] Step S104: Smoothing the rectangular center points of each group of lane lines to obtain a group of smooth points corresponding to the lane lines.

[0045] Furthermore, step S104 may include: for a group of lane line rectangular center points, according to the curvature of two adjacent lane line rectangular center points, setting multiple insertion points between two adjacent lane line rectangular center points; according to the set multiple curvature thresholds and corresponding windows, dynamically adjusting the insertion points, and using the adjusted insertion points and the two lane line rectangular center points as a group of smooth points.

[0046] Furthermore, according to the set multiple curvature thresholds and corresponding windows, dynamically adjusting the insertion point may include: calculating the average curvature of each insertion point according to the curvature range corresponding to the center points of two adjacent lane line rectangles; determining the required window according to the set multiple curvature thresholds and corresponding windows, combined with the average curvature of the insertion point; and according to the coordinates of the insertion point, taking the average coordinates of all insertion points and the center points of the lane line rectangles in its adjacent windows as the adjusted coordinates of the insertion point.

[0047] In this embodiment, a smoothing process is performed on a group of lane line rectangle center points. First, insert equidistant insertion points at a small fixed interval (e.g., 25 cm) between two adjacent lane line rectangle center points. These insertion points are not linearly inserted straight line points. These insertion points need to meet the curvature requirements in the window where the two adjacent lane line rectangle center points are located (several lane line rectangle center points are taken before and after). Then, the average curvature in a certain window where each insertion point is located is calculated. Several curvature thresholds are set (each curvature threshold size corresponds to a window size, and the larger the curvature threshold, the greater the degree of curvature and the smaller the corresponding window size, and vice versa. The specific value of the curvature threshold can be determined according to actual conditions), and the new position of each insertion point is adjusted according to these curvature thresholds. The specific adjustment method can be to take the average point of all insertion points and lane line rectangle center points within a certain window range adjacent to the insertion point, so that a group of dense smoothing points can be obtained. Then, a group of smoothing points are connected to obtain a lane line center line, and then the lane line can be determined by combining the width of the rectangle. The determination of the lane line by the lane line center line is well known to those skilled in the art, and will not be repeated in detail here.

[0048] To explain, regarding several curvature thresholds, such as small curvature threshold C1, medium curvature threshold C2 (C2<C1), and large curvature threshold C3 (C2<C3), the corresponding window sizes are larger window W1, medium window W2, and smaller window W3. If the average curvature of the insertion point is less than C1, the window size is the larger window W1; if the average curvature is between C1 and C2, the window size is W2; if the average curvature is greater than C2, the window size is W3.

[0049] In the smoothing process, the purpose of inserting equidistant points is to increase the density of data, making the subsequent processing more refined. By inserting points between the center points of two adjacent lane line rectangles, the shape of the lane line can be better simulated and the effect of smoothing can be improved. For example, the original two lane line rectangle center points that are far apart may not accurately reflect the curvature of the lane line. After inserting equidistant points in combination with the curvature range, the changes of the lane line between the two lane line rectangle center points can be described more carefully. Among them, these inserted points need to meet the curvature requirements within the window where the two adjacent lane line rectangle center points are located, in order to ensure that the inserted points match the shape of the surrounding lane lines. The concept of the window is to consider the lane line characteristics within the local range, so that the inserted points can be better integrated into the overall lane line shape. For example, if the lane line in the window is curved, then the inserted points should also have a corresponding degree of curvature to meet the curvature requirements of the area.

[0050] The embodiment of the present application takes into account the curvature change of the lane line to dynamically adjust the window size of the insertion point to complete the smoothing of the rectangular center point of the lane line, so that the processed lane line is more consistent with the actual shape and smooth and natural.

[0051] Furthermore, the set of smooth points obtained in step S104 is relatively dense, and dense points will result in a huge amount of data, which will consume a lot of computing resources and time when performing various calculations and processing. Therefore, the method for generating lane lines may also include: Step S105: After obtaining a group of smooth points, thinning the group of smooth points is performed.

[0052] Among them, through thinning processing, the number of data points involved in the calculation can be reduced, thereby improving the calculation efficiency.

[0053] In some embodiments, in step S105, the group of smooth points is thinned out, including: Determining a curvature level of a current segment of the lane line according to an average curvature of a plurality of adjacent smooth points within a preset window; Depending on the level of curvature, a corresponding number of smoothing points are retained.

[0054] In the embodiment of the present application, the dense smooth points obtained in step S104 are thinned out, wherein the thinning principle is to judge the curvature according to the curvature of three adjacent points (or more precisely, the average curvature in a preset window), and to grade the curvature according to the curvature. Under a certain curvature, a smooth point is reserved at a certain interval. For example, in the case of a nearly straight line, a point is reserved for 40 meters, in the case of a slight curve, a point is reserved for 20 meters, and in the case of a particularly curved line, a point is reserved for 1 meter or half a meter. In this way, the center point of the lane line rectangle that has been smoothed and thinned out is obtained.

[0055] The method for generating lane lines provided in the embodiments of the present application, in particular, relates to complex lane lines that intersect or curve. The smoothing method thereof is simple, direct, fast and efficient. Moreover, the center line of the lane line formed by the thinned smooth points is combined with a method of splitting a concave polygon into multiple convex polygons and fitting the convex polygons into rectangles. The processing method is relatively simple, with low computational complexity, and can also reduce the error with the center line of the lane line actually solved.

[0056] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a device for generating lane lines, an electronic device and corresponding embodiments.

[0057] Figure 2 It is a schematic diagram of the structure of the device for generating lane lines shown in an embodiment of the present application.

[0058] See also Figure 2 , an embodiment of the present application provides a device for generating lane lines, including: A splitting and fitting module 201 is configured to, after acquiring the lane line contour points of a single frame image, split the lane line contour in the frame image into a plurality of convex polygons, and fit the convex polygons into rectangles, wherein the long side direction of the rectangle is the same as the driving direction; A grouping and merging module 202 is configured to perform intra-frame grouping and inter-frame merging on the fitted rectangles to obtain grouped lane line rectangles; A sorting and verification module 203 is configured to perform sorting and verification on the grouped lane line rectangles to obtain a plurality of groups of lane line rectangle center points; The smoothing processing module 204 is configured to smooth each group of lane line rectangular center points to obtain a group of smooth points corresponding to the lane line.

[0059] Preferably, it further comprises a thinning module 205, which is configured to perform thinning processing on a group of smooth points after obtaining the group of smooth points.

[0060] Furthermore, the thinning module 205 may be configured to determine the curvature level of the current segment of the lane line according to the average curvature of a plurality of adjacent smooth points within a preset window; and retain a corresponding number of smooth points according to different curvature levels.

[0061] In the splitting and fitting module 201, splitting the outline of the lane line in the frame image into multiple convex polygons may include: splitting the concave polygon formed by the outline of the crossed or curved lane line into multiple convex polygons, wherein each of the convex polygons represents a different part of the lane line.

[0062] Furthermore, the sorting verification module 203 can be configured to, after obtaining the grouped lane line rectangles, determine, for each rectangle center point in a group of lane line rectangles, that the direction of the vector formed by any two adjacent rectangle center points is the same as the driving direction; filter the multiple rectangle center points, and use the filtered rectangle center points as the lane line rectangle center points of the corresponding group.

[0063] Furthermore, the smoothing processing module 204 can be configured to set a plurality of insertion points between two adjacent lane line rectangular center points according to the curvature of two adjacent lane line rectangular center points for a group of lane line rectangular center points; dynamically adjust the insertion points according to the set multiple curvature thresholds and corresponding windows, and use the adjusted insertion points and the two lane line rectangular center points as a group of smoothing points.

[0064] In the smoothing processing module 204, the insertion point is dynamically adjusted according to the set multiple curvature thresholds and corresponding windows, including: calculating the average curvature of each insertion point according to the curvature range corresponding to two adjacent lane line rectangle center points; determining the required window according to the set multiple curvature thresholds and corresponding windows, combined with the average curvature of the insertion point; according to the coordinates of the insertion point, taking the average coordinates of all insertion points and the lane line rectangle center point in its adjacent windows as the adjusted coordinates of the insertion point.

[0065] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated again here.

[0066] Figure 3 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.

[0067] See also Figure 3 , the electronic device 300 includes a memory 301 and a processor 302.

[0068] The processor 302 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0069] The memory 301 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 302 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 301 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 301 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0070] The memory 301 stores executable codes, and when the executable codes are processed by the processor 302 , the processor 302 can execute part or all of the methods described above.

[0071] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0072] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0073] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for generating lane lines, characterized in that: include: After obtaining the lane line contour points of a single frame image, split the lane line contour in the frame image into multiple convex polygons, and fit the convex polygons into rectangles, wherein the long side direction of the rectangle is the same as the driving direction; Performing intra-frame grouping and inter-frame merging on the fitted rectangles to obtain grouped lane line rectangles; Sorting and checking the grouped lane line rectangles to obtain the center points of multiple groups of lane line rectangles; Each group of lane line rectangular center points is smoothed to obtain a group of smooth points corresponding to the corresponding lane line.

2. The method for generating lane lines according to claim 1, characterized in that: Also includes: After obtaining a group of the smooth points, a thinning process is performed on the group of the smooth points.

3. The method for generating lane lines according to claim 2, characterized in that: The thinning process of the group of smooth points includes: Determining a curvature level of a current segment of the lane line according to an average curvature of a plurality of adjacent smooth points within a preset window; Depending on the level of curvature, a corresponding number of smoothing points are retained.

4. The method for generating lane lines according to claim 1, characterized in that: The step of splitting the outline of the lane line in the frame image into a plurality of convex polygons comprises: The concave polygon formed by the outline of the intersecting or curved lane line is split into multiple convex polygons, wherein each of the convex polygons represents a different part of the lane line.

5. The method for generating lane lines according to claim 1, characterized in that: The step of sorting and checking the grouped lane line rectangles to obtain a plurality of groups of lane line rectangle center points includes: After obtaining the grouped lane line rectangles, for each rectangle center point in a group of lane line rectangles, determine that the direction of a vector formed by any two adjacent rectangle center points is the same as the driving direction; The plurality of rectangular center points are filtered, and each of the filtered rectangular center points is used as a lane line rectangular center point of a corresponding group.

6. The method for generating lane lines according to claim 1, characterized in that: The smoothing process of each group of lane line rectangular center points to obtain a group of smooth points corresponding to the lane line includes: For a set of lane line rectangular center points, a plurality of insertion points are set between two adjacent lane line rectangular center points according to the curvature of two adjacent lane line rectangular center points; The insertion point is dynamically adjusted according to the set multiple curvature thresholds and the corresponding windows, and the adjusted insertion point and the two lane line rectangle center points are used as a group of smooth points.

7. The method for generating lane lines according to claim 6, characterized in that: The dynamically adjusting the insertion point according to the set multiple curvature thresholds and the corresponding windows includes: Calculating the average curvature of each insertion point according to the curvature range corresponding to the center points of two adjacent lane line rectangles; Determine the required window according to the set multiple curvature thresholds and corresponding windows and the average curvature of the insertion point; According to the coordinates of the insertion point, the average coordinates of all the insertion points in the adjacent windows and the center point of the lane line rectangle are taken as the adjusted coordinates of the insertion point.

8. A device for generating lane lines, characterized in that: include: A splitting and fitting module is configured to, after acquiring the lane line contour points of a single frame image, split the lane line contour in the frame image into a plurality of convex polygons, and fit the convex polygons into rectangles, wherein the long side direction of the rectangle is the same as the driving direction; A grouping and merging module is configured to perform intra-frame grouping and inter-frame merging on the fitted rectangles to obtain grouped lane line rectangles; A sorting and verification module is configured to perform sorting and verification on the grouped lane line rectangles to obtain a plurality of groups of lane line rectangle center points; The smoothing processing module is configured to smooth each group of lane line rectangular center points to obtain a group of smooth points corresponding to the lane line.

9. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: An executable code is stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • A lane line detecting and tracking and detecting method

    CN104408460A

  • Target boundary fitting method and device based on convex hull detection

    CN116740114A

  • Lane line fitting method and device and computer readable storage medium

    CN118644576A

  • Lane detection method and device, vehicle, storage medium and electronic equipment

    CN119206650A

  • Method, apparatus and device for detecting lane lines

    US20180060677A1