Search

CN-116152764-B - Lane line fitting method, electronic device and storage medium

CN116152764BCN 116152764 BCN116152764 BCN 116152764BCN-116152764-B

Abstract

The application discloses a lane line fitting method, electronic equipment and a storage medium, wherein the method comprises the steps of extracting a lane line simulation point set in a photographed lane image; the method comprises the steps of mapping lane line simulation points in a lane line simulation point set to a vehicle body coordinate system to obtain a lane line simulation point set in the vehicle body coordinate system, performing primary fitting on lane lines based on the lane line simulation points in the lane line simulation point set in the vehicle body coordinate system to obtain primary fitted lane lines in the vehicle body coordinate system, acquiring segmentation points based on the abnormal fitting points when abnormal fitting is determined to exist based on the primary fitted lane lines, and performing segment fitting on the lane line simulation point set according to the segmentation points to obtain final fitted lane lines. According to the scheme, whether abnormal fitting exists or not is judged through the primary fitting lane lines obtained after primary fitting, and the segmentation points are obtained, so that the fitting accuracy can be improved.

Inventors

  • WANG JINSHUANG
  • XIE QIANKUN
  • GE HENGHE
  • YIN GUAN
  • SHEN ZHUO

Assignees

  • 浙江零跑科技股份有限公司

Dates

Publication Date
20260508
Application Date
20230104

Claims (7)

  1. 1. A lane line fitting method, comprising: extracting a lane line simulation point set in the shot lane image; Mapping the lane line simulation points in the lane line simulation point set to a vehicle body coordinate system to obtain a lane line simulation point set in the vehicle body coordinate system; Performing primary fitting on the lane lines based on lane line simulation points in the lane line simulation point set under the vehicle body coordinate system to obtain primary fitted lane lines under the vehicle body coordinate system; Obtaining a difference value of each lane line simulation point, wherein the difference value is obtained by calculating the position coordinates of each lane line simulation point and the position coordinates of corresponding fitting lane line simulation points, and the fitting lane line simulation points are obtained by calculating the fitting lane line simulation points based on the lane line simulation points and the primary fitting lane line under the vehicle body coordinate system; Taking the lane line simulation points with the difference value larger than a difference threshold value as abnormal fitting points, and calculating the number of the abnormal fitting points; Determining whether an abnormal fit exists on the primarily fit lane line based on the number of abnormal fit points; Under the condition that abnormal fitting exists based on the first fitted lane line, obtaining a segmentation point based on an abnormal fitting point; performing segment fitting on the lane line simulation point set according to the segment points to obtain a final fitted lane line; the "obtaining the segmentation point based on the abnormal fitting point" in the case that it is determined that the abnormal fitting exists based on the first fitted lane line includes: taking at least one of the abnormal fitting points as a segmentation point under the condition that the abnormal fitting exists in the initial fitting; in the case where the number of abnormal fitting points is greater than 1, the "regarding at least one of the abnormal fitting points as a segmentation point" includes: Traversing all the abnormal fitting points, and finding out two abnormal fitting points with the largest difference value and coordinates of the two abnormal fitting points under the vehicle body coordinate system so as to determine the position relation of the two abnormal fitting points with the largest difference value relative to the primary fitting lane line under the vehicle body coordinate system; Traversing all lane line simulation points between two abnormal fitting points with the maximum difference value, calculating angle errors of two adjacent lane line simulation points to obtain the two adjacent lane line simulation points with the maximum angle errors, and calculating the difference value of the two adjacent lane line simulation points; Under the condition that the two abnormal fitting points with the largest difference value are positioned on the same side of the primary fitting lane line under the vehicle body coordinate system, taking the point with the large difference value in the two adjacent lane line simulation points as a segmentation point; and taking the point with small difference value in the two adjacent lane line simulation points as a segmentation point under the condition that the two abnormal fitting points with the largest difference value are positioned on different sides of the primary fitting curve under the vehicle body coordinate system.
  2. 2. The method according to claim 1, wherein the step of performing the primary fitting on the lane lines based on the lane line simulation points in the lane line simulation point set in the vehicle body coordinate system, to obtain the primary fitted lane line in the vehicle body coordinate system, further comprises: and taking the primary fit lane line as a final fit lane line and outputting the final fit lane line when the primary fit does not have abnormal fit.
  3. 3. The method of claim 1, wherein the determining whether the first fit lane line has an abnormal fit based on the number of abnormal fit points comprises: determining that no abnormal fit exists in the primary fit in response to the number of abnormal fitting points being 0; The method comprises the steps of responding to the number of abnormal fitting points to be 1, calculating a difference average value, determining the relation between the difference average value and a difference threshold value, determining that abnormal fitting does not exist in the primarily fitted lane line under the condition that the difference average value is smaller than 1/Q of the difference threshold value, determining that abnormal fitting exists in the primarily fitted lane line under the condition that the difference average value is not smaller than 1/Q of the difference threshold value, wherein Q is a constant larger than 1, and the difference average value is calculated by difference values corresponding to M lane line simulation points before and after the abnormal fitting point, and M is a preset integer; And determining that abnormal fitting exists in the lane line subjected to the primary fitting in response to the number of abnormal fitting points being greater than 1.
  4. 4. The method of claim 1, wherein said step of performing a piecewise fit to said set of lane-line simulation points according to said piecewise points to obtain a final fitted lane line comprises: fitting the segmentation points and lane line simulation points in the vehicle body coordinate system before the segmentation points based on the N-time curve model to obtain a first fitted lane line; establishing constraint conditions, and fitting lane line simulation points in the vehicle body coordinate system after the segmentation points based on the constraint conditions to obtain a second fitted lane line; and outputting the first fitted lane line and the second fitted lane line as the final fitted lane line.
  5. 5. The method of claim 4, wherein the constraint comprises: The coordinates of the segmentation points conform to the functional relation of the first fitting lane line and the functional relation of the second fitting lane line; the function of the second fitted lane line is equal to the first and second derivatives of the function of the first fitted lane line at the segmentation points.
  6. 6. An electronic device comprising a camera, a memory, and a processor, the camera, the memory being coupled to the processor, respectively, the processor being configured to execute program instructions stored in the memory to implement the lane-fitting method of any one of claims 1 to 5.
  7. 7. A computer readable storage medium having stored thereon program instructions, which when executed by a processor, implement the lane line fitting method of any of claims 1 to 5.

Description

Lane line fitting method, electronic device and storage medium Technical Field The present application relates to the field of automatic driving technologies, and in particular, to a lane line fitting method, an electronic device, and a storage medium. Background In the automatic driving technology, lane line recognition needs to be performed through visual perception, and the accuracy of lane line recognition determines the driving safety to a great extent. Generally, in the existing lane line recognition technology, lane lines are fitted into a cubic polynomial curve, and although some simple lane lines can be fitted more accurately, the fitting accuracy of some complex lane lines is often lower. Therefore, how to improve the fitting accuracy of the lane lines becomes a problem to be solved. Disclosure of Invention The application provides at least one lane line fitting method, electronic equipment and a storage medium, so as to improve the accuracy of lane line fitting. The first aspect of the application provides a lane line fitting method, which comprises the steps of extracting a lane line simulation point set in a captured lane image, mapping lane line simulation points in the lane line simulation point set to a vehicle body coordinate system to obtain a lane line simulation point set in the vehicle body coordinate system, performing primary fitting on the lane line based on the lane line simulation points in the lane line simulation point set in the vehicle body coordinate system to obtain a primary fitted lane line in the vehicle body coordinate system, acquiring segmentation points based on the abnormality fitting points under the condition that the abnormality fitting exists based on the primary fitted lane line, and performing segment fitting on the lane line simulation point set according to the segmentation points to obtain a final fitted lane line. According to the scheme, after the lane line simulation point set is subjected to primary fitting to obtain the primary fitted lane line, when abnormal fitting is determined to exist based on the primary fitted lane line, the segmentation points are obtained from the abnormal fitting points, and the lane line simulation point set is subjected to segmentation fitting according to the segmentation points to obtain the final fitted lane line, so that more accurate segmentation points can be obtained, and the accuracy of lane line fitting is improved. The method comprises the steps of carrying out primary fitting on the lane lines based on lane line simulation points in a lane line simulation point set under the vehicle body coordinate system, obtaining primary fitted lane lines under the vehicle body coordinate system, and taking the primary fitted lane lines as final fitted lane lines and outputting the final fitted lane lines under the condition that no abnormal fitting exists in the primary fitting. The method comprises the steps of carrying out primary fitting on the lane lines based on lane line simulation points in a lane line simulation point set under a vehicle body coordinate system, obtaining a primary fitted lane line under the vehicle body coordinate system, and then obtaining a difference value of each lane line simulation point, wherein the difference value is obtained by calculating position coordinates of each lane line simulation point and position coordinates of corresponding fitted lane line simulation points, the fitted lane line simulation points are obtained by calculating the primary fitted lane line based on the lane line simulation points and the vehicle body coordinate system, the lane line simulation points with the difference value larger than a difference threshold value are used as abnormal fitting points, the number of the abnormal fitting points is calculated, and whether the primary fitted lane line has abnormal fitting is determined based on the number of the abnormal fitting points. The method comprises the steps of determining whether the first fit lane line is abnormal based on the number of abnormal fit points, determining whether the first fit lane line is abnormal or not according to the fact that the number of fit abnormal points is 0, calculating a difference average value according to the fact that the number of abnormal fit points is 1, determining the relation between the difference average value and the difference threshold value, determining whether the first fit lane line is abnormal according to the fact that the difference average value is smaller than 1/Q of the difference threshold value, determining whether the first fit lane line is abnormal according to the fact that the difference average value is not smaller than 1/Q of the difference threshold value, determining that the first fit lane line is abnormal according to the fact that Q is a constant which is larger than 1, wherein the difference average value is calculated by difference values corresponding to M lane line simulation points before an