Curved lane line fitting method, system, device and computer readable storage medium

Through the semantic segmentation model and polynomial fitting technology, curved lane lines are extracted and fitted, which solves the problems of inaccurate curve detection and poor environmental adaptability in the existing technology, and achieves high-accuracy and real-time lane line detection.

CN113449647BInactive Publication Date: 2024-09-10ZONGMU TECH SHANGHAI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110731414.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2024-09-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing lane line detection algorithms cannot accurately detect lane line information when encountering curves, and have poor environmental adaptability. They rely on manual adjustment of parameters, require a large workload, and have poor robustness.

Method used

The semantic segmentation model is used to segment the road image, convert it into a bird's-eye view, extract the effective lane line pixels, perform polynomial fitting through the least squares method, and output the curved lane line.

Benefits of technology

It achieves high accuracy and real-time performance when the road environment changes, reduces the need for manual parameter adjustment, and improves the accuracy and efficiency of curve lane line detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113449647B
    Figure CN113449647B
Patent Text Reader

Abstract

The present invention provides a method, system, device and computer-readable storage medium for fitting curved lane lines, wherein the method comprises: acquiring a road image; the road image contains curved lane lines; segmenting the road image to obtain a segmented road image; converting the segmented road image into a bird's-eye view to extract valid lane line pixels from the bird's-eye view; using the extracted valid lane line pixels to fit the curved lane lines; and outputting the fitted curved lane lines. The method, system, device and computer-readable storage medium for fitting curved lane lines of the present invention can adapt to changes in the road environment during lane line extraction through the powerful feature extraction capability of the semantic segmentation network, and can accurately fit the curved lane lines by effectively obtaining the curve fitting parameters of the curved lane lines, with low time consumption and high accuracy, and with certain real-time performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and relates to a fitting method and system, and in particular to a fitting method, system, device and computer-readable storage medium for curved lane lines. Background Art

[0002] Each manned car is a separate individual. The driving of the vehicle is completely controlled by the driver. The driver responds accordingly according to the road driving environment, and there is almost no communication between vehicles. As people are independent individuals, their cognitive abilities vary. It is impossible to deal with problems without mixing personal factors. In emergencies, drivers may give wrong control instructions due to nervousness, carelessness or other factors. Minimizing human participation in vehicle driving can reduce traffic accidents caused by subjective factors of the driver from the root. At present, more high-end cars are equipped with various auxiliary driving systems. These auxiliary driving systems can reduce the labor intensity of the driver to a certain extent, and more importantly, they can assist the driver to drive safely in emergencies. For example, anti-lock braking system (ABS), automatic braking system (AEB), lane departure warning system (LDWS), adaptive cruise control system (ACC), etc., we collectively refer to these as advanced driver assistance systems (ADAS). Their essence is to play an auxiliary role in vehicle driving, and people play a major role, so it is impossible to fundamentally eliminate traffic accidents caused by human operation errors.

[0003] In recent years, the continuous advancement of automobile intelligence has brought hope for solving a large number of traffic accidents and traffic congestion problems caused by human factors. Environmental perception is one of the three core technologies in the intelligent driving system, providing intelligent driving cars with important information about the driving environment, including traffic lights, signs and markings, road areas, road boundaries, the location, speed, movement direction of obstacles around the vehicle, and even the prediction of its future state.

[0004] Most existing lane line detection algorithms use threshold segmentation based on color space, and then perform edge detection, filtering and other methods to segment the lane line area, and then combine Hough transform, RANSAC and other algorithms to perform lane line detection fitting. Although Hough transform can effectively detect the straight line part in the image and has a good effect on the detection of straight lane lines, it is impossible to accurately obtain lane line information when encountering curves. In addition, Hough transform is extremely dependent on the results of the previous lane line image segmentation. The threshold segmentation method based on color space requires manual adjustment of the threshold parameters, and the subsequent filtering operator also needs to manually adjust the parameters according to the characteristics of the road scene targeted by the algorithm. The workload is large and the robustness is poor. When the driving environment changes significantly, the lane line detection effect is poor, which has certain limitations.

[0005] Therefore, how to provide a curved lane line fitting method, system, device and computer-readable storage medium to solve the defects of the prior art such as poor environmental adaptability, especially the inability to accurately obtain lane line information when encountering curves, has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0006] In view of the shortcomings of the prior art described above, an object of the present invention is to provide a curved lane line fitting method, system, device and computer-readable storage medium to solve the problem that the prior art has poor environmental adaptability, especially when encountering curves, and cannot accurately obtain lane line information.

[0007] To achieve the above objectives and other related objectives, the present invention provides a method for fitting a curved lane line, comprising:

[0008] Acquire a road image; the road image contains curved lane lines; segment the road image to obtain a segmented road image; convert the segmented road image into a bird's-eye view to extract valid lane line pixel points from the bird's-eye view;

[0009] The extracted valid lane line pixel points are used to fit the curved lane line; and the fitted curved lane line is output.

[0010] In one embodiment of the present invention, the acquired road image is a road image that has been subjected to distortion correction.

[0011] In one embodiment of the present invention, the step of segmenting the road image to obtain a segmented road image includes: inputting the distortion-corrected road image into a pre-stored semantic segmentation model for segmentation, and outputting a segmented road image; the segmented road image includes a road grayscale image or a binary image of curved lane lines, and the foreground and background in the image are distinguished according to the size of the pixel value.

[0012] In one embodiment of the present invention, the step of extracting valid lane line pixel points from the bird's-eye view includes: adding the pixel value of each pixel point in the bird's-eye view by column to obtain the column pixel sum of each column, finding the two peak points of the column pixel sum, and determining the horizontal coordinate position of the peak point as the starting point of the left and right lane lines; counting the non-zero pixel points of the bird's-eye view, returning a pixel point tuple composed of all non-zero pixel points, and extracting valid lane line pixel points from the pixel point tuple; the non-zero pixel points in the tuple are the lane line pixel points obtained after segmentation.

[0013] In one embodiment of the present invention, the step of extracting valid lane line pixel points from the tuple includes: dividing the bird's-eye view into n image areas from bottom to top; wherein n is greater than 1; starting from the bottom of the bird's-eye view, counting the non-zero pixel points within the first detection frame with the lane line starting point determined as the bottom center of the first detection frame with a preset width threshold as the detection frame width, and marking the detected non-zero pixel points as valid lane line pixel points.

[0014] In one embodiment of the present invention, the step of extracting valid lane line pixel points from the tuple also includes: determining whether the number of non-zero pixel points in the i-th detection frame is greater than a preset minimum number of pixels, and if so, updating the lane line starting point and continuing to traverse the next image detection area; if not, directly counting the non-zero pixel points in the i+1-th detection frame with the lane line starting point determined as the bottom center of the second detection frame and a preset width threshold as the detection frame width; wherein i is greater than or equal to 1 and less than n; until all image areas of equal height are traversed.

[0015] In one embodiment of the present invention, the step of updating the starting point of the lane line includes averaging the horizontal coordinates of the valid lane line pixel points in the image detection area, and using the pixel points after the horizontal coordinate average as the updated lane line starting point; the updated lane line starting point is the bottom center of the i+1th detection frame.

[0016] On the other hand, the present invention provides a curved lane line fitting system, comprising: an acquisition module, used to acquire a road image; the road image contains curved lane lines; a segmentation module, used to segment the road image to obtain a segmented road image; an extraction module, used to convert the segmented road image into a bird's-eye view to extract valid lane line pixel points from the bird's-eye view; a fitting module, used to use the extracted valid lane line pixel points to fit the curved lane; and a processing module, used to output the fitted curved lane line.

[0017] Yet another aspect of the present invention is a computer-readable storage medium having a computer program stored thereon, which implements the curved lane line fitting method when executed by a processor.

[0018] The last aspect of the present invention provides a curved lane line fitting device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the fitting device performs the curved lane line fitting method.

[0019] As described above, the curved lane fitting method, system, device and computer-readable storage medium of the present invention have the following beneficial effects:

[0020] The curved lane line fitting method, system, device and computer-readable storage medium of the present invention can adapt to changes in the road environment during lane line extraction through the powerful feature extraction capability of the semantic segmentation network, and can accurately fit the curved lane line by effectively obtaining the curve fitting parameters of the curved lane line, which is time-saving, highly accurate and has a certain degree of real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1A FIG. 1 is a flow chart of a curved lane line fitting method according to an embodiment of the present invention.

[0022] Figure 1B It is a schematic diagram of the process of S14 of the present invention.

[0023] Figure 2 Shown is an example diagram of acquiring a road image according to the present invention.

[0024] Figure 3 Shown is an example diagram of a segmented road image according to the present invention.

[0025] Figure 4 Shown is an example diagram of a bird's eye view of the present invention.

[0026] Figure 5 Displayed is a histogram of the sum of pixels in each column of the bird's eye view of the present invention.

[0027] Figure 6 The bird's-eye view of the present invention is shown as a schematic diagram of an image region divided into 9 equal heights from bottom to top.

[0028] Figure 7 The display is an effect diagram of the weighted superposition of the effective lane line pixels and the binary image after the perspective inverse transformation of the present invention.

[0029] Figure 8 The display is an effect diagram of the weighted superposition of the effective lane line pixels of the present invention, the lane line curve drawn after the perspective inverse transformation, and the original image.

[0030] Fig. 9 Shown is a schematic diagram of the principle structure of a curved lane line fitting system of the present invention in one embodiment.

[0031] Component number description

[0032] 9 Curved lane line fitting system 91 Get Module 92 Segmentation Module 93 Extraction module 94 Fitting module 95 Processing Module S11~S16 step S141~S142 step DETAILED DESCRIPTION

[0033] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0034] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0035] Embodiment 1

[0036] This embodiment provides a curved lane line fitting method, including:

[0037] Acquire a road image; the road image includes curved lane lines;

[0038] Segmenting the road image to obtain a segmented road image;

[0039] Converting the segmented road image into a bird's-eye view to extract valid lane line pixel points from the bird's-eye view;

[0040] The extracted valid lane line pixel points are used to fit the curved lane line;

[0041] Output the fitted curved lane lines.

[0042] The following will describe in detail the curved lane line fitting method provided by this embodiment in conjunction with the diagram. Figure 1A , which is a flow chart of a curved lane line fitting method in one embodiment. Figure 1A As shown, the curved lane line fitting method specifically includes the following steps:

[0043] S11, acquiring a road image; the road image includes curved lane lines.

[0044] In this embodiment, the road image is a road image captured by an image acquisition device installed at the front end of the vehicle, for example, a monocular camera (the direction of the monocular camera is consistent with the heading angle of the vehicle body, and the lateral position is the horizontal axis center of the vehicle body coordinate system) during the vehicle driving process. Figure 2 , shown is an example of acquiring a road image.

[0045] In this embodiment, the acquired road image is a road image that has been subjected to distortion correction, that is, the acquired image is subjected to distortion correction according to the internal distortion parameters of the image acquisition device. The image may be encoded in the H.264 format, but is not limited to it. The resolution of the acquired image is W*H. In the acquired image, the proportion of the road portion should not be less than a certain value.

[0046] S12, segmenting the road image to obtain a segmented road image.

[0047] In this embodiment, the distortion-corrected road image is input into a pre-stored semantic segmentation model for segmentation, and a segmented road image is output; the segmented road image includes a road grayscale image or a binary image of curved lane lines, and the foreground and background in the image are distinguished according to the size of the pixel value, for example: the pixel value of the image background area is 0, the white solid lane line is 1, the white virtual lane line is 2, the yellow solid lane line is 3, the yellow virtual lane line is 4, the road surface arrow sign is 5, and so on. The semantic segmentation model can be a computer-readable storage medium, which stores the weight file of the trained semantic segmentation network, the structure file of the network model, and the relevant program code for reading and using the weight file. An example of a segmented road image is shown in FIG. Figure 3 shown.

[0048] In this embodiment, the semantic segmentation model based on deep learning can predict the image at the pixel level, and can obtain image segmentation results of any size, and does not need to classify each image block, which is fast. After the network is trained with the corresponding lane line data, the road image collected by driving is input into the semantic segmentation model, which can more accurately output a binary image containing only the lane line part.

[0049] S13, converting the segmented road image into a bird's-eye view.

[0050] Specifically, the perspective transformation matrix is ​​used to transform the segmented road image into Figure 4 The bird's-eye view shown. The perspective transformation matrix used is determined according to the specific camera installation parameters and specific imaging data in step S1.

[0051] S14, extracting valid lane line pixels from the bird's-eye view. Figure 1B , which is a schematic diagram of the process of S14. Figure 1B As shown, the S14 includes:

[0052] S141, adding the pixel values ​​of each pixel point in the bird's-eye view image by column to obtain the column pixel sum of each column, for example Figure 5A histogram of the total pixel sum in each column of the bird's-eye view is shown, and two peak points of the column pixel sum are found, and the horizontal coordinate positions of the peak points are determined as the starting points of the left and right lane lines.

[0053] S142, counting the non-zero pixel points in the bird's-eye view, returning a pixel point tuple consisting of all non-zero pixel points, and extracting valid lane line pixel points from the pixel point tuple; the non-zero pixel points in the tuple are lane line pixel points obtained after segmentation. In this embodiment, in order to improve the effect of lane line fitting, not all non-zero pixel points in the pixel point tuple can be taken, and valid lane line pixel points need to be further screened out from the pixel point tuple.

[0054] The screening steps are as follows:

[0055] First, the bird's-eye view image is divided into n image regions from bottom to top; where n is greater than 1, for example, Figure 6 The bird's-eye view image is divided into 9 image regions of equal height from bottom to top.

[0056] Next, starting from the bottom of the bird's-eye view, the non-zero pixels in the first detection frame with the lane line starting point determined as the bottom center of the first detection frame and the preset width threshold w as the detection frame width are counted, and the detected non-zero pixels are marked as valid lane line pixels. The size of the detection frame width w depends on the specific width of the lane line in the bird's-eye view, which is approximately the sum of the maximum and minimum lane line widths in the bird's-eye view.

[0057] Next, determine whether the number of non-zero pixels in the i-th detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the i+1-th detection frame with the lane line starting point as the bottom center of the second detection frame and the preset width threshold as the detection frame width; where i is greater than or equal to 1 and less than n; until all image areas of equal height are traversed.

[0058] Among them, the step of updating the starting point of the lane line includes averaging the horizontal coordinates of the valid lane line pixel points in the image detection area, and taking the pixel points after the horizontal coordinate average as the updated lane line starting point; the updated lane line starting point is the bottom center of the i+1th detection frame.

[0059] Specifically, determine whether the number of non-zero pixels in the first detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the second detection frame with the lane line starting point determined as the bottom center of the second detection frame and the preset width threshold as the detection frame width.

[0060] Continue to determine whether the number of non-zero pixels in the second detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the third detection frame with the lane line starting point determined as the bottom center of the third detection frame and the preset width threshold as the detection frame width.

[0061] …

[0062] Finally, determine whether the number of non-zero pixels in the eighth detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the ninth detection frame with the lane line starting point determined as the bottom center of the ninth detection frame and the preset width threshold as the detection frame width.

[0063] S15, using the extracted valid lane line pixel points to fit the curved lane line.

[0064] In this embodiment, the least square method is used to perform polynomial fitting.

[0065] For example, the upper left corner is generally taken as the origin, the horizontal is the X axis, rightward is positive, and the vertical is the Y axis, downward is positive. Therefore, the lane line equation should take Y as the independent variable and X as the dependent variable. Taking the quadratic polynomial as an example, the equation is x=c0+c1y+c2y 2 , the parameter can be expressed as: C * =inv(A T A) T X, where the matrix A is m is the number of valid lane line pixel fitting points.

[0066] S16, outputting the fitted lane curve.

[0067] Specifically, step S16 includes drawing the fitted lane line curve in the bird's-eye view of the road image according to the polynomial coefficients of the output left and right lane lines, and performing an inverse perspective transformation on the points on the curve to superimpose the lane line on the original image, and performing an inverse perspective transformation to superimpose the curved lane line on the original road image. Figure 7 and 8 , which respectively show the effect of weighted superposition of effective lane line pixels and binary image after inverse perspective transformation, and the effect of weighted superposition of effective lane line pixels, lane line curve drawn after inverse perspective transformation and original image.

[0068] The curved lane line fitting method described in this embodiment can adapt to changes in the road environment during lane line extraction through the powerful feature extraction capability of the semantic segmentation network, and can accurately fit the curved lane line by effectively obtaining the curve fitting parameters of the curved lane line. It is time-saving, highly accurate, and has a certain degree of real-time performance.

[0069] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned curved lane line fitting method is implemented.

[0070] At any possible level of technical detail combination, the present application may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present application.

[0071] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0072] The computer-readable program described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives a computer-readable program instruction from the network, and forwards the computer-readable program instruction for storage in the computer-readable storage medium in each computing / processing device. The computer program instruction for performing the operation of the present application can be an assembly instruction, an instruction set architecture (ISA) instruction, a machine instruction, a machine-related instruction, a microcode, a firmware instruction, a state setting data, an integrated circuit configuration data, or a source code or object code written in any combination of one or more programming languages, wherein the programming language includes an object-oriented programming language, such as Smalltalk, C++, etc., and a procedural programming language, such as "C" language or similar programming language. Computer readable program instructions can be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In certain embodiments, by using the state information of computer readable program instructions to personalize electronic circuits, such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs), the electronic circuits can execute computer readable program instructions, thereby realizing various aspects of the present application.

[0073] Embodiment 2

[0074] This embodiment provides a curved lane fitting system, including:

[0075] An acquisition module, used to acquire a road image; the road image includes curved lane lines;

[0076] A segmentation module, used for segmenting the road image to obtain a segmented road image;

[0077] An extraction module, used to convert the segmented road image into a bird's-eye view to extract valid lane line pixel points from the bird's-eye view;

[0078] The fitting module is used to use the extracted valid lane line pixel points to fit the curved lane line.

[0079] The following will describe in detail the curved lane line fitting system provided by this embodiment in conjunction with the diagram. Please refer to FIG10 , which is a flow chart of the curved lane line fitting system in one embodiment. Fig. 9 As shown, the curved lane fitting system 9 includes an acquisition module 91 , a segmentation module 92 , an extraction module 93 , a fitting module 94 and a processing module 95 .

[0080] The acquisition module 91 is used to acquire a road image; the road image includes curved lane lines.

[0081] The segmentation module 92 is used to segment the road image to obtain a segmented road image.

[0082] In this embodiment, the distortion-corrected road image is input into a pre-stored semantic segmentation model for segmentation, and a segmented road image is output; the segmented road image includes a road grayscale image or a binary image of the curved lane lines, and the foreground and background in the image are distinguished according to the size of the pixel value.

[0083] The extraction module 93 is used to convert the segmented road image into a bird's-eye view.

[0084] Specifically, the extraction module 93 converts the segmented road image into a bird's-eye view using a perspective transformation matrix.

[0085] The extraction module 93 is also used to extract valid lane line pixels from the bird's-eye view.

[0086] Specifically, the extraction module 93 adds the pixel values ​​of each pixel point in the bird's-eye view by column, obtains the column pixel sum of each column, searches for two peak points of the column pixel sum, and determines the horizontal coordinate position of the peak point as the starting point of the left and right lane lines. The non-zero pixel points of the bird's-eye view are counted, a pixel point tuple composed of all non-zero pixel points is returned, and valid lane line pixel points are extracted from the pixel point tuple; the non-zero pixel points in the tuple are the lane line pixel points obtained after segmentation. In this embodiment, in order to improve the effect of lane line fitting, not all non-zero pixel points in the pixel point tuple can be taken, and valid lane line pixel points need to be further screened out from the pixel point tuple.

[0087] The extraction module 93 screening steps are specifically as follows:

[0088] First, the bird's-eye view image is divided into n image regions of equal height from bottom to top; wherein n is greater than 1, for example, Figure 7 The bird's-eye view image is divided into 9 image regions of equal height from bottom to top.

[0089] Next, starting from the bottom of the bird's-eye view, the non-zero pixels in the first detection frame with the lane line starting point determined as the bottom center of the first detection frame and the preset width threshold w as the detection frame width are counted, and the detected non-zero pixels are marked as valid lane line pixels. The size of the detection frame width w depends on the specific width of the lane line in the bird's-eye view, which is approximately the sum of the maximum and minimum lane line widths in the bird's-eye view.

[0090] Next, determine whether the number of non-zero pixels in the i-th detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the i+1-th detection frame with the lane line starting point as the bottom center of the second detection frame and the preset width threshold as the detection frame width; where i is greater than or equal to 1 and less than n; until all image areas of equal height are traversed.

[0091] Among them, the step of updating the starting point of the lane line includes averaging the horizontal coordinates of the valid lane line pixel points in the image detection area, and taking the pixel points after the horizontal coordinate average as the updated lane line starting point; the updated lane line starting point is the bottom center of the i+1th detection frame.

[0092] Specifically, determine whether the number of non-zero pixels in the first detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the second detection frame with the lane line starting point determined as the bottom center of the second detection frame and the preset width threshold as the detection frame width.

[0093] Continue to determine whether the number of non-zero pixels in the second detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the third detection frame with the lane line starting point determined as the bottom center of the third detection frame and the preset width threshold as the detection frame width.

[0094] …

[0095] Finally, determine whether the number of non-zero pixels in the eighth detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the ninth detection frame with the lane line starting point determined as the bottom center of the ninth detection frame and the preset width threshold as the detection frame width.

[0096] The fitting module 94 is used to use the extracted valid lane line pixel points to fit the curved lane line.

[0097] In this embodiment, the fitting module 94 performs polynomial fitting using the least square method.

[0098] The processing module 95 is used to output the fitted lane line curve.

[0099] Specifically, the processing module 95 draws the fitted lane line curve in the bird's-eye view of the road image according to the polynomial coefficients of the output left and right lane lines, and can also perform perspective inverse transformation on the points on the curve to superimpose the lane line on the original image. It should be noted that it should be understood that the division of the various modules of the above system is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or physically separated. And these modules can all be implemented in the form of software calling through processing elements, or all in the form of hardware, or some modules can be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example: the x module can be a separately established processing element, or it can be integrated in a chip of the above system. In addition, the x module can also be stored in the memory of the above system in the form of program code, and called and executed by a processing element of the above system. The implementation of other modules is similar. All or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software. The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), one or more digital singnal processors (DSP), one or more field programmable gate arrays (FPGA), etc. When a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. These modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0100] Embodiment 3

[0101] This embodiment provides a curved lane line fitting device, including: a processor, a memory, a transceiver, a communication interface and / or a system bus; the memory and the communication interface are connected to the processor and the transceiver through the system bus and complete mutual communication, the memory is used to store computer programs, the communication interface is used to communicate with other devices, and the processor and the transceiver are used to run the computer program, so that the fitting device executes each step of the curved lane line fitting method described in the first embodiment above.

[0102] The system bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize the communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage.

[0103] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0104] The protection scope of the curved lane line fitting method described in the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0105] The present invention also provides a curved lane line fitting system, which can implement the curved lane line fitting method described in the present invention. However, the implementation device of the curved lane line fitting method described in the present invention includes but is not limited to the structure of the curved lane line fitting system listed in this embodiment. All structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.

[0106] In summary, the curved lane line fitting method, system, device and computer-readable storage medium of the present invention can adapt to changes in the road environment during lane line extraction through the powerful feature extraction capability of the semantic segmentation network, and accurately fit the curved lane line by effectively obtaining the curve fitting parameters of the curved lane line, which is time-saving, highly accurate and has certain real-time performance. The present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.

[0107] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for fitting a curved lane line, characterized in that: include: Acquire a road image; the road image includes curved lane lines; Segmenting the road image to obtain a segmented road image; Converting the segmented road image into a bird's-eye view to extract valid lane line pixel points from the bird's-eye view; The extracted valid lane line pixel points are used to fit the curved lane line; Output the fitted curved lane line; The acquired road image is a road image that has been distorted and corrected, and the step of segmenting the road image to obtain a segmented road image includes: inputting the distorted and corrected road image into a pre-stored semantic segmentation model for segmentation, and outputting a segmented road image; the segmented road image includes a road grayscale image or a binary image of a curved lane line, and the foreground and the background in the image are distinguished according to the size of the pixel value; The step of extracting effective lane line pixel points from the bird's-eye view includes: The pixel values ​​of each pixel point in the bird's-eye view are added by column to obtain the column pixel sum of each column, and two peak points of the column pixel sum are found, and the horizontal coordinate positions of the peak points are determined as the starting points of the left and right lane lines; Counting the non-zero pixel points of the bird's-eye view image, and returning a pixel point tuple consisting of all non-zero pixel points, wherein the non-zero pixel points in the tuple are lane line pixel points obtained after segmentation; Divide the bird's-eye view image into n image regions from bottom to top; wherein n is greater than 1; Starting from the bottom of the bird's-eye view, counting the non-zero pixels in the first detection frame with the starting point of the lane line determined as the bottom center of the first detection frame and a preset width threshold as the width of the detection frame, and marking the detected non-zero pixels as valid lane line pixels; Determine whether the number of non-zero pixels in the i-th detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the i+1-th detection frame with the lane line starting point as the bottom center of the second detection frame and the preset width threshold as the detection frame width; where i is greater than or equal to 1 and less than n, repeat this step until all image areas of equal height are traversed.

2. The method for fitting a curved lane line according to claim 1, characterized in that: The step of updating the lane line starting point includes averaging the horizontal coordinates of the valid lane line pixel points in the image detection area, and using the pixel points after the horizontal coordinate average as the updated lane line starting point; the updated lane line starting point is the bottom center of the i+1th detection frame.

3. A curved lane fitting system, characterized in that: include: An acquisition module, used to acquire a road image; the road image includes curved lane lines; A segmentation module, used for segmenting the road image to obtain a segmented road image; An extraction module, used to convert the segmented road image into a bird's-eye view to extract valid lane line pixel points from the bird's-eye view; A fitting module, used for fitting the curved lane line using the extracted valid lane line pixel points; A processing module, used for outputting a fitted curved lane line; Wherein, the road image acquired by the acquisition module is a road image that has been subjected to distortion correction; The step of segmenting the road image by the segmentation module to obtain a segmented road image includes: inputting the distortion-corrected road image into a pre-stored semantic segmentation model for segmentation, and outputting a segmented road image; the segmented road image includes a road grayscale image or a binary image of a curved lane line, and the foreground and the background in the image are distinguished according to the size of the pixel value; The step of extracting effective lane line pixels from the bird's-eye view by the extraction module comprises: The pixel values ​​of each pixel point in the bird's-eye view are added by column to obtain the column pixel sum of each column, and two peak points of the column pixel sum are found, and the horizontal coordinate positions of the peak points are determined as the starting points of the left and right lane lines; Counting the non-zero pixel points of the bird's-eye view image, and returning a pixel point tuple consisting of all non-zero pixel points, wherein the non-zero pixel points in the tuple are lane line pixel points obtained after segmentation; Divide the bird's-eye view image into n image regions from bottom to top; wherein n is greater than 1; Starting from the bottom of the bird's-eye view, counting the non-zero pixels in the first detection frame with the starting point of the lane line determined as the bottom center of the first detection frame and a preset width threshold as the width of the detection frame, and marking the detected non-zero pixels as valid lane line pixels; Determine whether the number of non-zero pixels in the i-th detection frame is greater than the preset minimum number of pixels. If so, update the starting point of the lane line and continue to traverse the next image detection area; if not, directly count the non-zero pixels in the i+1-th detection frame with the lane line starting point as the bottom center of the second detection frame and the preset width threshold as the detection frame width; where i is greater than or equal to 1 and less than n, repeat this step until all image areas of equal height are traversed.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the curved lane line fitting method described in any one of claims 1 to 2 is implemented.

5. A curved lane line fitting device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the fitting device performs the curved lane line fitting method as claimed in any one of claims 1 to 2.