A lane line detection method based on vanishing point and color filter

By adopting a lane detection method based on vanishing point and color filter, the problem of insufficient lane detection accuracy in complex environments is solved, achieving high accuracy and robustness in lane detection, which is suitable for intelligent driving systems.

CN116935341BActive Publication Date: 2025-11-28ANHUI POLYTECHNIC UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310827930.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-06
Publication Date
2025-11-28
Estimated Expiration
2043-07-06

AI Technical Summary

Technical Problem

Existing lane detection algorithms suffer a significant drop in accuracy in complex environments, impacting the safety and accuracy of autonomous driving.

Method used

A lane detection method based on vanishing point and color filter is adopted. By preprocessing multiple consecutive frames of images, the region of interest is extracted, and the connected regions are filtered using vanishing point features and angle constraints. The lane lines are then fitted using the least squares method to improve detection accuracy.

Benefits of technology

It improves the accuracy and robustness of lane detection in complex environments, ensuring the safety and real-time performance of intelligent driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116935341B_ABST
    Figure CN116935341B_ABST
Patent Text Reader

Abstract

The application discloses a lane line detection method based on vanishing points and color filters, comprising the following steps: S1, acquiring continuous multiple frames of images from a driving video for pretreatment, acquiring the vanishing point position of the lane line under the driving environment, and then adaptively extracting a region of interest (ROI); S2, filtering the ROI according to the color features of the lane line to obtain a binary image, acquiring all the connected regions, their centroids and inclination angles in the binary image, and screening the connected regions meeting the lane line features based on the vanishing point features and angle constraints; S3, further acquiring the centroid points meeting the lane line features from the remaining connected regions, fitting the acquired centroid points using a least square method, and identifying the lane line. The lane line detection can be completed under complex conditions such as lane line damage, lane marking interference and lane line occlusion, has certain robustness, and improves the accuracy and real-time performance of the lane line detection method.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of lane line detection, and more particularly, relates to a lane line detection method based on vanishing points and color filters. BACKGROUND

[0002] Traffic safety has become a worldwide problem, so the safety of the car has a direct impact on human life and property. With the development of highways and the improvement of car performance, the speed of the car has also increased accordingly. Coupled with the increase in the number of cars and the increasing traffic, the number of car accidents has increased, causing personnel casualties and property losses, which has become a social problem that cannot be ignored. Therefore, the safety of the car is very important.

[0003] With the development of intelligent driving technology, lane line detection has become a basic link of car assisted driving and unmanned driving. Accurate detection and identification of lane lines are important prerequisites for lane departure warning, lane keeping, lane changing and other functions. Therefore, the lane line detection technology has a high requirement for accuracy, and the accuracy of lane line detection can directly affect the driving safety of the vehicle.

[0004] Lane line detection technology plays a key role in vehicle auxiliary systems. The existing lane line detection algorithm has a serious decline in detection accuracy under complex conditions such as lane line damage, lane marker interference and lane line occlusion, which limits the development of intelligent driving capability and seriously affects the driving safety of intelligent driving. SUMMARY

[0005] The present application provides a lane line detection method based on vanishing points and color filters, which aims to improve the lane line detection accuracy in complex driving environments.

[0006] The present application is implemented as follows: a lane line detection method based on vanishing points and color filters, the method comprising the following steps:

[0007] S1, obtaining continuous multiple frames of images from driving video for preprocessing, obtaining the vanishing point position of the lane line under the driving environment, and then adaptively extracting the region of interest (ROI);

[0008] S2, filtering the ROI according to the color feature of the lane line to obtain a binary image, obtaining all connected regions and their centroids and inclination angles in the binary image, and screening the connected regions that meet the lane line feature based on the vanishing point feature and angle constraint;

[0009] S3, further obtaining the centroid points that meet the lane line feature from the remaining connected regions, fitting the obtained centroid points using the least square method, and identifying the lane line;

[0010] The remaining connected region in step S3 is the difference between all connected regions in the binary image and the connected regions meeting the vanishing point feature and the angle constraint.

[0011] Further, the preprocessing of the image comprises, in sequence: graying of the image, edge detection based on a Canny operator, and straight line extraction based on a Hough transform, wherein the calculation formula for graying is specifically as follows:

[0012] I(x) = R(x) + G(x) - B(x)

[0013] In the formula, I(x) represents the gray value of the xth pixel point in the grayed image, R(x) represents the red channel brightness value of the xth pixel point in the image before graying, G(x) represents the green channel brightness value of the xth pixel point in the image before graying, and B(x) represents the blue channel brightness value of the xth pixel point in the image before graying.

[0014] Further, the method for obtaining the vanishing point position of the lane line is specifically as follows:

[0015] The parameter space in the Hough transform is selected as a polar coordinate system, and the intersection points (p, q) between the straight lines in the polar coordinate system are calculated; a specified size of a cell set is created according to the size of the image, and each intersection point (p, q) in the image is detected, if the intersection point falls into the cell, the cell is the voting cell of the intersection point, the cell with the maximum number of votes is selected, and the average value of all voting intersection points in the cell is calculated as the vanishing point.

[0016] Further, the connected region meeting the following conditions is the connected region meeting the angle constraint, and the conditions are specifically as follows:

[0017] The angle between the diagonal of the right connected region and the x-axis is within the angle range [20°, 80°], and the angle between the diagonal of the left connected region and the x-axis is within the angle range [100°, 160°].

[0018] Further, the connected region meeting the following formula is the connected region meeting the vanishing point feature, and the formula is specifically as follows:

[0019]

[0020] In the formula, dis is a set distance threshold, (x0, y0) is the coordinate of the vanishing point, and (x1, y1) is the intersection coordinate of the straight line where the diagonal of the minimum matrix of the corresponding connected region is located and the vanishing point at the same horizontal position, wherein y1 = y0.

[0021] Further, after step S2 and before step S3, the following steps are further included:

[0022] (1) detecting the width of the connected region;

[0023] (2) for the connected region with width greater than the set width threshold split_dis, the connected region is equally divided along the width direction to form two connected regions, and step (1) is performed until the width of all connected regions is less than the width threshold split_dis;

[0024] (3) the centroid of each connected region is extracted and mapped to the corresponding connected region.

[0025] Further, the centroid point meeting the lane line feature in the remaining connected region is obtained as follows:

[0026] The centroid points in the storage space left_lines, right_lines are fitted once to obtain the slope left_k, right_k and intercept left_b, right_b of the two straight line equations;

[0027] The x i coordinate value of the centroid C i (x i ,y i ) of each remaining connected region is substituted into the left and right straight line equations respectively, and the y new coordinate value is solved respectively.

[0028] If the y new coordinate value is less than the coordinate threshold T add , the centroid data of the connected region is added to the data point storage space left_lines and right_lines of the left and right lane lines.

[0029] Further, after step S3, it further includes:

[0030] The deviation between the lane line fitting parameters of the current frame and the lane line fitting parameters of the previous frame is judged, and if the deviation is within the allowed deviation range, it is considered that the current frame lane line detection is accurate, otherwise the lane line detected in the previous frame is used as the lane line of the current frame.

[0031] Further, the acquisition process of the binary image is as follows:

[0032] The yellow lane line and the white lane line in the image are respectively set with different threshold values for binaryzation, and the binary images of the two color lane lines are merged;

[0033] The merged binary image is subjected to erosion and swelling treatment.

[0034] The lane line detection method proposed in the present application has the following beneficial technical effects:

[0035] (1) The five consecutive images of the driving video are preprocessed to obtain the lane line vanishing point position in the driving environment, and the line not meeting the lane feature is detected, thereby improving the problem of the overall lane line detection rate.

[0036] (2) The ROI is filtered according to the color feature of the lane line to obtain a binary image, the centroid and inclination angle of all connected regions in the binary image are obtained, the connected region meeting the lane line feature is screened through the combination of the vanishing point feature and the angle threshold, and the detection accuracy of the lane line is improved.

[0037] (3) More centroid points are obtained by segmenting a larger region, the centroid points meeting the lane line feature in the missed detection region are obtained, the least square method is used for fitting the obtained centroid points, and the lane line is identified, thereby improving the detection accuracy of the lane line of the algorithm. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 The ROI extraction flowchart provided for the embodiment of the application;

[0039] Figure 2 The lane line detection method flowchart based on the vanishing point and the color filter provided for the embodiment of the application;

[0040] Figure 3 The gray scale contrast chart provided for the embodiment of the application, wherein (a) is the original chart, (b) is the weighted average method, and (c) is the method of the application;

[0041] Figure 4 The effect chart of the Canny edge detection provided for the embodiment of the application;

[0042] Figure 5 The Hough transform process provided for the embodiment of the application, wherein (a) is the peak value in the polar coordinate space domain, and (b) is the line segment detected by the Hough transform;

[0043] Figure 6 The ROI extraction process provided for the embodiment of the application, wherein (a) is the extension detection straight line, (b) is the maximum voting region and the vanishing point, (c) is the original chart, and (d) is the ROI;

[0044] Figure 7 The binary image of the R, G and B three channels provided for the embodiment of the application, wherein (a) is the R channel, (b) is the G channel, (c) is the B channel, (d) is the three-dimensional image of the R channel, (e) is the three-dimensional image of the G channel, and (f) is the three-dimensional image of the B channel;

[0045] Figure 8The binary image acquisition process provided by the embodiment of the present application, wherein (a) is an original image, (b) is a binary image based on a yellow lane line, and (c) is a binary image based on a white lane line;

[0046] Figure 9 The processing of the binary image provided by the embodiment of the present application, wherein (a) is merging, (b) is an erosion operation, and (c) is a dilation operation;

[0047] Figure 10 The expansion of the centroid point provided by the embodiment of the present application, wherein (a) is a connected region to be segmented, and (b) is a connected region after adding a centroid;

[0048] Figure 11 The segmentation process of the connected region provided by the embodiment of the present application, wherein (a) is a cropped lane line, and (b) is a centroid of a segmented connected region;

[0049] Figure 12 The missed connected region detection provided by the embodiment of the present application, wherein (a) is a connected region after a preliminary screening, and (b) is a connected region after adding a missed region;

[0050] Figure 13 The lane line contrast image provided by the embodiment of the present application, wherein (a) is a lane line drawn in a binary image, (b) is a lane line drawn in a cropped image, and (c) is a lane line in an original image;

[0051] Figure 14 The lane line detection effect in different complex environments provided by the embodiment of the present application, wherein (a) is normal light, (b) is low light, (c) is that a lane line is partially blocked, (d) is that there is a sign interference in the middle, (e) is a night environment, and (f) is that there is a yellow wide lane line. DETAILED DESCRIPTION

[0052] The specific embodiments of the present application will be further described in detail below with reference to the accompanying drawings, and the description of the embodiments will help those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solutions of the present application.

[0053] In order to realize the improvement of lane line detection accuracy in complex driving environment, the application provides a lane line detection method based on vanishing point and color filter, first, the continuous five frames of driving video images are pretreated, generally the first five frames of driving video images are selected, the lane line vanishing point position in the driving environment is obtained, the region of interest (ROI) is adaptively selected, then the ROI is filtered according to the lane line color feature to obtain a binary image, all connected region centroids and inclination angle data in the binary image are obtained, the connected regions meeting the lane line feature are screened through the combination of vanishing point feature and angle constraint, more centroid points are obtained by segmenting larger regions, and the centroid points meeting the lane line feature in the missed detection region are also obtained. Finally, the least square method is used for fitting the obtained centroid points and identifying the lane line. The lane line detection can be completed in the complex situations such as lane line damage, lane marking interference and lane line occlusion, has certain robustness, and improves the accuracy and real-time performance of the lane line detection method.

[0054] The lane line detection method provided by the application mainly consists of three parts, including the region of interest extraction stage based on the vanishing point, the left and right lane line division and parameter acquisition stage and the lane line fitting stage. First, the continuous five frames of images of the vehicle-mounted video are pretreated to obtain an edge image; then the straight lines in the image are detected by using Hough change, and the straight lines are intersected, the mean value of all coordinate points in the region with the maximum voting number is calculated, and the region of interest ROI is obtained by dividing the image through the mean value coordinates, so as to reduce the complexity of the image lane line detection stage. The extraction process of the region of interest ROI is as shown in the figure. Figure 1 Then, according to the color feature of the lane line in each frame of road image, the filter is used to filter the white lane line and the yellow lane line, and the binary image is obtained. Then, the connected regions in the binary image are screened according to the lane line feature, and the centroids of the regions meeting the left and right lane line features are obtained. Finally, the lane line is fitted by using the straight line model, and the lane line is marked. The specific process of the method is shown in the figure. Figure 2

[0055] Because some impurities such as sky and buildings appear in the image, which will affect the detection of the lane line in the image. In order to detect the lane line, highlight the lane line feature and ensure the accuracy of the lane line detection, the region of interest ROI adaptively sized to the current image is obtained through the pretreatment operation. The region of the lane line in the image is almost in the lower half of the image, and the adaptive region of interest ROI obtained by pretreatment almost contains all the lane line information.

[0056] ​Before the image is preprocessed, the acquired five frames of images need to be grayed, and the image is grayed to reduce the calculation amount of the subsequent algorithm. The commonly used traditional graying method is the weighted average method, and the method of the weighted average method is as shown in formula (1):

[0057] I(x) = 0.299R(x) + 0.587G(x) + 0.114B(x) (1)

[0058] Through observation of the road lane line, the lane line is mainly composed of white lane lines and yellow lane lines, and therefore, in order to increase the contrast between the road background and the road lane line, the application selects the method of reserving the red and green channels in the RGB channel to gray the image, and the graying method used in the application is as shown in formula (2):

[0059] I(x) = R(x) + G(x) - B(x) (2)

[0060] In the above formula (1) and formula (2), I(x) represents the gray value of any position in the image after graying, R(x) represents the brightness value of the red channel of the image before graying, G(x) represents the brightness value of the green channel of the image before graying, and B(x) represents the brightness value of the blue channel of the image before graying. The contrast effect of the grayed image is as shown in Figure 3 .

[0061] After the image is grayed, the gradient amplitude and direction of each pixel point in the gray image are still needed to extract the lane line information. The application utilizes the Canny operator to perform edge detection. The detection steps of the Canny operator mainly consist of four parts, first, a Gaussian filter is used to perform smoothing operation on the image; then the gradient amplitude and direction of each pixel point are calculated by using the first-order partial derivative finite difference method; then the non-maximum value of the amplitude image is suppressed; finally, a double threshold is used to detect and connect the edge. The effect diagram of the Canny edge detection is as shown in Figure 4 .

[0062] Hough transform is mainly a feature detection, often used to detect the line feature in the image. Hough transform is to transform two coordinate spaces, the line equation in the rectangular coordinate system is mapped to a point in the polar coordinate space, so as to form the peak, and the detection of straight line problem is converted into the problem of statistical peak. In the rectangular coordinate system, the equation of a straight line is defined as y=kx+b, where k represents the slope of the straight line, and b represents the intercept of the straight line. For the straight line equation y0=kx0+b passing through the point k(x0, y0), the straight line equation is changed to b=-kx0+y0, so that a straight line in the rectangular coordinate system corresponds to a point in the parameter space. When the rectangular coordinate system is selected as the parameter space, the special straight line equation x=c (c is a constant) will appear, at this time the slope of the straight line is infinite, which cannot be represented in the parameter space. Therefore, the polar coordinate system is selected as the parameter space, and the perpendicular line of the straight line is represented by the polar coordinate as ρ=xcosθ+ysinθ, where ρ represents the polar radius of the perpendicular line, and θ represents the polar angle of the perpendicular line.

[0063] After completing the conversion of the equation from the rectangular coordinate system to the polar coordinate system, an array with a 2-dimensional size accumulator is designed to record the intersection points in the polar coordinate system. The cells that satisfy the intersection point parameters ρ and θ are voted until the voting ends. Finally, the extreme value point in the accumulator is searched, and the ρ and θ values of the extreme value point are taken to solve the straight line equation. As shown in Figure 5

[0064] Through Hough transform, the line segment set divided into left and right sides can be detected. The vanishing point is defined as the intersection of the lane line or road boundary in the distance, so the detected line segment is extended to intersect at a distance, as shown in Figure 6 (a), and the detection method of the vanishing point is as follows:

[0065] A 20x20 pixel cell set is created according to the size of the image, which forms a grid that meets the allowed vanishing point position error range. Each intersection point is judged, and if the intersection point falls within a certain cell, the corresponding cell is operated by +1 until all intersection points are judged. Finally, the cell with the maximum number of votes is selected, and the average value of the voting intersection points in the cell is taken as the vanishing point. The image is cropped based on the position of the vanishing point to obtain the ROI containing the lane line information; or the vanishing points of five consecutive frames of images are calculated based on the same method, as shown in Figure 6 (b). Based on the average of the positions of the five vanishing points, the image is cropped to obtain the ROI containing the lane line information, as shown in Figure 6 (c) and Figure 6 (d).

[0066] ​According to the color characteristics of the road lane line, the lane line on the road is mainly composed of yellow lane and white lane line. Considering that the image is composed of R, G and B channels, the three channels of the image are separated, and a threshold is set for each channel for filtering. Different thresholds are set for the yellow lane line and the white lane line in the image for filtering, and finally the binary images of the two color lane lines are combined. After separating the R, G and B channels, a three-dimensional graph is used for display to find different filtering thresholds for the yellow lane line and the white lane line, as shown in Figure 7 By observing the three-dimensional image of each channel, the corresponding filtering threshold is selected, and different thresholds are used for R, G and B for filtering the yellow lane line and the white lane line, to obtain the corresponding binary image, as shown in Figure 8 .

[0067] Firstly, since there are some pixel-rich connected regions in the binary image, such as interference, the combined binary image is subjected to erosion and swelling operation. Linear erosion processing is performed on the connected region with very few pixels, which can achieve the purpose of filtering noise; then, as the dual operation of erosion, linear dilation operation is used to process the eroded image, which supplements the continuous missing lane line, so as to facilitate the acquisition of the centroid of the lane line region in the later stage. The image processing effect is shown in Figure 9 .

[0068] For all connected regions in the binary image, the minimum matrix of each connected region, the centroid of the region and the angle information between the region and the x-axis are calculated. The lane line is a line segment in the image within a certain angle range, and the angle threshold is set to screen the connected regions that meet the angle of the lane line. The angle range of the right lane line is usually [20°, 80°], and the angle range of the left lane line is [100°, 160°].

[0069] According to the characteristic that the lane line in the image has a intersection P(x0, y0) (i.e. vanishing point) in the distance, the diagonal line equation of the minimum matrix of the connected region is calculated. For the connected region on the left side of the vanishing point, the diagonal line equation of the minimum matrix is calculated according to the coordinates of the lower left and upper right points of the connected region. For the connected region on the right side of the vanishing point, the diagonal line equation of the minimum matrix is calculated according to the coordinates of the lower right and upper left points. In the image coordinate system, the upper edge of the image is the x-axis to the right, and the left edge is the y-axis downward, and the top left vertex of the image is the coordinate origin. The coordinate point B(x1, y0) of the same horizontal position as the vanishing point is solved. A distance dis threshold is set to limit the distance between the two points, and the connected region within the dis threshold range is regarded as the lane line region, as shown in equation (3).

[0070]

[0071] The left and right lane lines are filtered from the connected regions in the binary image by the double threshold of lane line angle and vanishing point position, and the left and right lane line connected regions are stored in left_lines and right_lines respectively.

[0072] Since there is only one centroid in each connected region, in order to solve the problem of too few fitting points, the connected region is divided by row. The large-area connected region is divided into small-area connected regions, and the centroid of each small connected region is solved to increase the number of fitting points and facilitate accurate lane line fitting. The minimum width threshold split_dis is set to divide the connected region, and the centroid of the small-area connected region after division is determined, as shown in Figure 11 . Finally, the centroid of the divided connected region is remapped to the original connected region, and the number of fitting points of the original connected region is expanded to facilitate correct lane line fitting. As shown in Figure 10 .

[0073] Under the constraints of lane line angle and vanishing point, the connected regions screened out may still be missed, so the missed connected regions are detected, the centroid data is calculated, and the data points for fitting are further increased to improve the accuracy of lane line fitting.

[0074] In the case of dashed lane lines, the far lane line region in the image is blurred, and the object obstruction causes the lane line to be incomplete, which will affect the correct detection of the lane line. In the binary image of the lane line, the far lane line blur and lane line incompleteness appear as messy small-area regions, causing region missing. In order to solve this problem, the detected correct lane line region is used to scan all connected regions.

[0075] First, the data points stored in left_lines and right_lines are fitted to obtain the slope (left_k, right_k) and intercept (left_b, right_b) of the two straight line equations.

[0076] Next, the x i coordinate value of the centroid C i (x i ,y i ) of each connected region is substituted into the left and right straight line equations respectively, and the y new coordinate value is solved respectively. Finally, the y new coordinate values solved by the left and right straight line equations are compared with the threshold T addThe centroid data of the region is added to the data point storage space of the left and right lane lines within the range of formula (4) and (5). The lane line connected region screened out initially is as shown in Figure 12 (a), and the missed region result is as shown in Figure 12 (b).

[0077]

[0078]

[0079] The least square method is a commonly used method for fitting a straight line, which mainly calculates the square sum of minimum error to find the best function to match the data points. The least square method can quickly and simply obtain unknown data and make the square sum of error between the real data and the obtained data minimum, so the least square method is selected to fit the obtained lane line data into a straight line.

[0080] For the detected left and right lane line data points (x1, y1), (x2, y2)…(x n ,y n ), when n data points are fitted into a straight line, the form of the straight line equation is y=a1x+a0, wherein a1 and a0 are unknown variables. If the points (x i ,y i ), i=1, 2…n, are respectively substituted into the straight line equation, y i =a1x i +a0 is obtained, and the form is transformed as shown in formula (6).

[0081]

[0082] The left and right lane line data points (x1, y1), (x2, y2)…(x n ,y n ) are substituted into the formula after formula (6) to be combined into the form of a matrix as shown in formula (7).

[0083]

[0084] The matrix (y1y2…y n ) T is set as Y, is set as X, and (a1a0) T is set as A. Then the formula is transformed to solve the fitting equation parameter process as shown in formula (8).

[0085]

[0086] Lane lines may be blocked by interference, damaged and not obvious during detection, which will affect the detection of lane lines and cause the lane lines to be undetectable. In order to solve such problems, the similarity of adjacent two frames of images and the small deviation of lane lines are used, the detected lane line data points are stored each time, and the gap between the last frame lane line fitting data and the current frame lane line fitting data is judged before the lane line is drawn. If the gap is within the acceptable range, it is considered that the current frame lane line detection is accurate, otherwise it is considered that the current frame lane line detection is incorrect, and the last frame lane line detection data is used to ensure the accuracy of lane line fitting. Finally, the fitted lane line data is used to draw lane lines in the image to assist the intelligent driving and risk avoidance of the vehicle. The lane line drawing result is shown in 13.

[0087] The system used for lane line detection in the application is configured as Intel(R) Core(TM) i5-10505 CPU @ 3.20GHz 3.20GHz. In order to test the effectiveness of the lane line detection algorithm of the application, the data set of Xi'an Jiaotong University and the highway vehicle recording video are selected for simulation test. Some common driving environments such as low light intensity, lane line being partially blocked and road sign interference exist in the selected data set. The simulation effect is shown in Figure 14 From the figure, it can be seen that the lane line detection by the algorithm of the application can accurately fit the lane line in the relatively complex driving environment, and has good robustness.

[0088] From the ROI ratio in table 1, it can be seen that the ROI adaptive selection method used in the application can more accurately select the part of the image containing lane line information. The method of selecting ROI by predicting the position of the vanishing point can filter out more irrelevant information above the lane line than using a fixed ROI selection ratio, so as to improve the accuracy of lane line detection.

[0089] Table 1: ROI percentage of highway image in original image

[0090]

[0091] Table 2: simulation data of the algorithm of the application

[0092]

[0093] Table 3: simulation data of classic Hough algorithm

[0094]

[0095] Table 4: average running time of each step of the algorithm of the application

[0096]

[0097]

[0098] In addition, for the selected lane line test image, the application uses the classic Hough lane line detection as a comparative experiment for data analysis, and Tables 2 and 3 are simulation data results of different algorithms under the same experimental platform. According to the data results of Tables 2 and 3, compared with the classic Hough algorithm, the detection method of the application has a significant improvement in the average accuracy. Compared with the average detection accuracy of 86.91% of the classic Hough algorithm, the average lane line detection accuracy of the algorithm of the application reaches 94.14%, and the average accuracy is improved by 7.23%, which has a good detection effect. The average running time of each step of the algorithm of the application is shown in Table 4. The time consumed in the ROI range extraction stage is only at the beginning of the overall algorithm, and after the ROI is determined, each frame of image processing does not need to enter the ROI extraction stage again, and the total time length of the lane line detection of the image is mainly the sum of the lane line data point detection time length and the lane line fitting time length, so the running efficiency of the algorithm of the application for lane line detection can meet the real-time requirement.

[0099] The application is described exemplarily, and it is obvious that the specific implementation of the application is not limited by the above-mentioned manner, as long as various non-essential improvements are made by using the method concept and technical scheme of the application, or the concept and technical scheme of the application are directly applied to other occasions without improvement, all of which are within the protection scope of the application.

Claims

1. A vanishing point and color filter based lane line detection method, characterized by, The method comprises the following steps: S1, obtaining continuous multiple frames of images from a driving video for preprocessing, obtaining a vanishing point position of a lane line under a driving environment, and then adaptively extracting a region of interest (ROI); S2, filtering the ROI according to a lane line color feature to obtain a binary image, obtaining all connected regions and their centroids and inclination angles in the binary image, and screening connected regions meeting the lane line feature based on a vanishing point feature and an angle constraint; S3, further obtaining a centroid point meeting the lane line feature from the remaining connected regions, fitting the obtained centroid point using a least square method, and identifying the lane line; A connected region meeting the angle constraint is a connected region meeting the following conditions: The angle between the diagonal of the right connected region and the x-axis is located in the angle range [20°, 80°], and the angle between the diagonal of the left connected region and the x-axis is located in the angle range [100°, 160°]; A connected region meeting the vanishing point feature is a connected region meeting the following formula: In the formula, dis is a set distance threshold, (x0, y0) is the coordinate of the vanishing point, and (x1, y1) is the intersection coordinate of the diagonal line of the minimum matrix of the corresponding connected region and the same horizontal position of the vanishing point, wherein y1=y0.

2. The lane line detection method based on vanishing point and color filter according to claim 1, wherein, The preprocessing of the image comprises, in sequence, graying of the image, edge detection based on a Canny operator, and straight line extraction based on a Hough transform, wherein the calculation formula of the graying is as follows: I(x)=R(x)+G(x)-B(x) In the formula, I(x) represents the gray value of the xth pixel point in the image after graying, R(x) represents the red channel brightness value of the xth pixel point in the image before graying, G(x) represents the green channel brightness value of the xth pixel point in the image before graying, and B(x) represents the blue channel brightness value of the xth pixel point in the image before graying.

3. The lane line detection method based on vanishing point and color filter according to claim 1, wherein, The method for obtaining the vanishing point position of the lane line is as follows: The parameter space in the Hough transform is selected as a polar coordinate system, the intersection (ρ, θ) between each straight line in the polar coordinate system is calculated, a specified size of a cell set is created according to the size of the image, each intersection (ρ, θ) in the image is detected, if the intersection falls into a cell, the cell is a voting cell of the intersection, the cell with the maximum number of votes is selected, and the average value of all voting intersections in the cell is calculated as the vanishing point.

4. The lane line detection method based on vanishing point and color filter according to claim 1, wherein, After step S2 and before step S3, the following steps are further included: (1) detecting the width of the connected region; (2) for a connected region with a width greater than a set width threshold split_dis, the connected region is equally divided into two connected regions along the width direction, step (1) is executed, and the width of all connected regions is less than the width threshold split_dis; (3) extracting the centroid of each connected region and mapping it to the corresponding connected region.

5. The lane line detection method based on vanishing point and color filter of claim 1, wherein, The process for obtaining the centroid point meeting the lane line feature in the remaining connected regions is as follows: The slope left_k and the intercept left_b of the straight line equation of the two straight lines are obtained by fitting the center points in the storage space left_lines and right_lines once; The centroid C of each remaining connected region is... i (x i ,y i ) of x i Substitute the coordinate values ​​into the equations of the left and right lines respectively, and solve for y. new Coordinate values; if y new the coordinate value is less than the coordinate threshold T add add the centroid data of the connected region to the data point storage spaces left_lines and right_lines of the left and right lane lines.

6. The lane line detection method based on vanishing point and color filter of claim 1, wherein, After step S3, it further includes: The deviation between the current frame lane line fitting parameters and the last frame lane line fitting parameters is judged, if the deviation is within the allowed deviation range, it is considered that the current frame lane line detection is accurate, otherwise the lane line detected in the last frame is taken as the current frame lane line.

7. The lane line detection method based on vanishing point and color filter of claim 1, wherein, The acquisition process of the binary image is specifically as follows: Different threshold values are set for the yellow lane line and the white lane line in the image respectively for binaryzation, and the binary images of the two color lane lines are merged; The merged binary image is subjected to corrosion and swelling treatment.

Citation Information

Patent Citations

  • Lane line detection method under complex road condition scene

    CN105893949A

  • Lane line recognition method and device and electronic equipment

    CN111291601A