Lane line detection method based on dynamic grouping fitting and multi-condition screening
The lane line detection method based on dynamic group fitting and multi-condition screening solves the problems of high computational complexity and poor detection accuracy in the existing technology, and realizes efficient, real-time and robust lane line detection, which is suitable for complex traffic scenarios.
Patent Information
- Application Number
- CN202510815983.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-10-17
AI Technical Summary
Existing lane line detection methods have high computational complexity, large amount of calculations, insufficient real-time and robustness, and cannot effectively detect intersection lines, especially in complex traffic scenarios where detection accuracy is poor.
A lane line detection method based on dynamic grouping fitting and multi-condition screening is adopted, including image preprocessing, multimodal detection, slope grouping, least squares fitting, angle screening, distance deduplication and intersection line elimination. Combined with a stable line tracking mechanism, Hough transform and multi-stage screening are used to improve detection accuracy and robustness.
It effectively reduces computational complexity, improves the real-time and accuracy of detection, reduces repeated calculations, enhances robustness, and adapts to complex traffic scenarios.
Smart Images

Figure CN120808292A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of lane line detection, in particular to a lane line detection method based on dynamic grouping fitting and multi-condition screening. BACKGROUND
[0002] In the current field of unmanned aerial vehicle lane line detection, LaneNet and its derivative algorithms are the most representative technical framework. The core idea is to transform lane line detection into an instance segmentation problem, and adapt to complex road scenes through dynamic perspective transformation.
[0003] However, the existing lane line detection method has the following technical defects: 1. Only traditional Hough transform, RANSAC and other iterative algorithms are used to screen independent line segments for each frame, which has high computational complexity and large amount of calculation, thereby reducing the calculation efficiency, real-time performance and robustness; 2. The existing method cannot realize the detection and screening of intersecting lines, especially in complex traffic scenes, which greatly affects the accuracy of lane line detection. SUMMARY
[0004] To solve the above technical problems, one technical solution adopted by the present application is: Provided is a lane line detection method based on dynamic grouping fitting and multi-condition screening, comprising the following steps: (1) performing image preprocessing on the obtained detection video; (2) performing multi-modal lane line detection screening to detect lane lines in each video and output a video with lane line identification; (2.1) performing Hough transform on the preprocessed video frame by frame to obtain lane line coordinate lists corresponding to each frame of image, each lane line coordinate list recording the endpoint coordinates of all line segments in the frame image; (2.2) performing multi-stage screening on the video to obtain accurate lane line information; (2.2.1) slope grouping: obtaining the Hough-transformed video and performing dynamic screening based on the slope of the line segments in each frame of the video according to a preset slope tolerance threshold; (2.2.1.1) obtaining the slope of the line segments in the current frame image and the slope of the line segments at the corresponding position in the previous frame image, and calculating the slope difference between the two slopes; (2.2.1.2) comparing the slope difference with the slope tolerance threshold: if the slope difference is less than or equal to the slope tolerance threshold, replacing the coordinate information of the line segment in the current lane line coordinate list with the coordinate information of the corresponding line segment in the previous frame image; if the slope difference is greater than the slope tolerance threshold, recording the coordinate information of the line segment in the current lane line coordinate list; (2.2.2) Least square fitting: fitting the line segments in each frame of image into a global straight line by least square method, extending to the image boundary to obtain a video with global straight line; (2.2.3) Angle screening: screening the global straight line in each frame of image of the video according to the preset angle tolerance threshold between the global straight line and the horizontal line; (2.2.3.1) obtaining the angle between the global straight line in the current frame of image and the horizontal line and the angle between the global straight line in the corresponding position of the last frame of image and the horizontal line, and calculating the angle difference between the two; (2.2.3.2) comparing the angle difference with the angle tolerance threshold: if the angle difference is less than or equal to the angle tolerance threshold, replacing the coordinate information of the global straight line in the current lane line coordinate list with the coordinate information of the corresponding global straight line in the last frame of image; if the angle difference is greater than the angle tolerance threshold, recording the coordinate information of the global straight line or the corresponding line segment in the current lane line coordinate list; (2.2.4) Distance de-duplication: calculating the minimum distance between each global straight line on each frame of image and other global straight lines, and screening the video frame by frame according to the preset distance threshold: if the minimum distance between the global straight line and other global straight lines is less than the distance threshold, the coordinates of the global straight line are not saved in the current lane line coordinate list, and the other global straight lines in the frame of image are continued to be detected; if the minimum distance between the global straight line and other global straight lines is greater than or equal to the distance threshold, the coordinate information of the global straight line or the corresponding line segment is recorded in the current lane line coordinate list; (2.2.5) Intersecting line elimination: detecting whether the global straight line in the current frame of image intersects with the global straight line corresponding to the position in the last frame to ensure that the final lane line is parallel and does not interfere with each other: if intersecting, replacing the coordinate information of the global straight line or the corresponding line segment in the current lane line coordinate list with the coordinate information of the corresponding global straight line or line segment in the last frame; if not intersecting, recording the coordinate information of the global straight line or the corresponding line segment in the current lane line coordinate list; (3) Stable line tracking: using time sequence information fusion method to judge and switch the detection mode; (3.1) when step (1) obtains the detection video, and the first frame of image in the detection video is preprocessed, the counter starts to accumulate the number of processed image frames, and the value of the counter increases by 1 for each processed image frame; (3.2) comparing the current counter value with the preset first mode switching threshold; (3.2.1) if the current counter value is less than or equal to the first mode switching threshold, the dynamic detection mode is continued, and steps (1)-(2) are continued to be executed, and the counter continues to accumulate the number of processed image frames; (3.2.2) If the current counter value is greater than the first mode switching threshold, switch to the stable line mode, and do not perform lane detection, so as to reduce the amount of calculation; (3.3) Compare the current counter value with a preset second mode switching threshold: if the current counter value is greater than or equal to the second mode switching threshold, switch to the dynamic detection mode, re-perform steps (1)-(3), and clear and restart the counter value; (4) Visual output: mark and output lane lines on each frame of the video in real time; (4.1) Draw lane lines frame by frame according to the lane line coordinate list corresponding to each frame of image, and output frame by frame; (4.2) Generate a total lane line list according to all lane line coordinate lists, so as to store the optimal lane line information obtained through screening, and continuously draw and output lane lines in the video according to the total lane line list.
[0005] In a preferred embodiment of the present application, in step (1), the image preprocessing step comprises: (1.1) Perform noise reduction processing on the obtained video by using a bilateral filtering method; (1.2) Grayscale: compress the three-dimensional color space of the video after noise reduction processing into one-dimensional grayscale, so as to reduce the calculation dimension; (1.3) Perform edge detection on each frame of image in the grayscale video, so as to determine the edges of each frame of image in the video.
[0006] In a preferred embodiment of the present application, in step (1.3), the edge detection method comprises a Canny edge detection method.
[0007] In a preferred embodiment of the present application, in step (2.2.1), the value of the slope tolerance threshold is 0.1.
[0008] In a preferred embodiment of the present application, in step (2.2.3), the range of the included angle threshold is 80°±10°.
[0009] In a preferred embodiment of the present application, in step (2.2.4), the distance threshold is 35 pixels.
[0010] In a preferred embodiment of the present application, for vertical lines, horizontal lines and inclined lines, a piecewise function is used to calculate the shortest distance of the global straight line.
[0011] In a preferred embodiment of the present application, in step (2.2.5), the vector cross product method, Kalman filtering fusion multi-frame information method, parallelism constraint optimization method, parameter equation method or geometric transformation method is used to detect whether the global straight lines intersect.
[0012] In a preferred embodiment of the present application, in step (3.3), the first mode switching threshold is 10.
[0013] In a preferred embodiment of the present application, in step (3.3), the first mode switching threshold is 120.
[0014] The beneficial effects of the present application are: through multiple filtering mechanisms such as slope grouping, angle screening, distance tolerance, etc., the accuracy and robustness of detection are effectively improved, frequent and repeated calculations are avoided, and real-time performance and processing efficiency are improved. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor. Figure 1 is a dynamic detection mode flow structure schematic diagram of a preferred embodiment of a lane line detection method based on dynamic grouping fitting and multi-condition screening of the present application; Figure 2 is a stable line tracking flow schematic diagram of a preferred embodiment of a lane line detection method based on dynamic grouping fitting and multi-condition screening of the present application; Figure 3 is a lane detection diagram of a preferred embodiment of a lane line detection method based on dynamic grouping fitting and multi-condition screening of the present application; Figure 4 is a lane detection diagram of another preferred embodiment of a lane line detection method based on dynamic grouping fitting and multi-condition screening of the present application. DETAILED DESCRIPTION
[0016] The technical solutions in the embodiments of the present application will be described clearly and completely below. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0017] Please refer to Figures 1-4 , the embodiments of the present application include: A lane line detection method based on dynamic grouping fitting and multi-condition screening, mainly based on detection equipment such as overhead cameras and unmanned aerial vehicles, realizes real-time lane line detection and tracking through computer vision technology, and the steps include: (1) Image preprocessing: mainly used for noise reduction and edge extraction processing of the obtained detection video.
[0018] (1.1) The obtained video is processed by bilateral filtering method to reduce noise while preserving edge information, which is suitable for processing complex light scene and medium resolution video.
[0019] Among them, the parameter combination in bilateral filtering includes: neighborhood diameter d=9, which refers to the pixel neighborhood range size for reference in filtering calculation. The larger the value, the wider the range of pixels involved in the calculation (suitable for medium resolution video); color standard deviation sigmaColor=100, which refers to the weight attenuation threshold of pixel gray value / color difference; spatial standard deviation sigmaSpace=100, which refers to the weight attenuation threshold of pixel spatial distance.
[0020] (1.2) Grayscale: compress the three-dimensional color space of the noise-reduced video into one-dimensional grayscale to reduce the calculation dimension.
[0021] (1.3) Edge detection is performed on each frame of the grayscale video to determine the edges of each frame of the video.
[0022] Further preferably, the edge detection method includes Canny edge detection, Sobel operator, Prewitt operator, Laplace operator, LOG operator, etc.
[0023] The principle of Sobel operator: first-order differential operator, using convolution kernel to calculate horizontal and vertical gradient, and then combining amplitude to detect edges.
[0024] The principle of Prewitt operator: similar to Sobel, also based on first-order gradient, using different convolution kernels (usually 3x3 kernel) to calculate pixel changes.
[0025] The principle of Laplace operator: second-order differential operator, directly calculating the second-order derivative of pixel brightness change to enhance zero-crossing points as edges The principle of LOG (Laplacian of Gaussian) operator: first apply Gaussian filter to smooth noise, then use Laplace operator to detect second-order derivative change, reducing noise effect.
[0026] Canny algorithm adopts a double-threshold mechanism, which is superior in extracting significant edges, which can effectively detect lane line edges. Among them, the threshold includes: Lower threshold: detect weak edges (such as edge points disturbed by noise), pixel gradient below this value is discarded, its value is 50.
[0027] Upper threshold: detect strong edges (e.g. clear object boundaries), pixels with gradient higher than this value are directly reserved as edges, the value is 150.
[0028] Lagging connection: pixels between 50-150, only when connected to a strong edge, it is considered as an edge, to avoid noise-induced false edges.
[0029] (2) Multi-modal lane line detection screening is performed, lane lines in each video are detected, and a video with lane line identification is output. Through the cooperative strategy of Hough transform + dynamic grouping fitting + multi-condition screening, the robustness of lane line detection can be significantly improved, and the false detection probability can be significantly reduced.
[0030] (2.1) Hough transform optimization: Hough transform is performed on the preprocessed video frame by frame to obtain a lane line coordinate list corresponding to the frame image (i.e. each frame has a lane line coordinate list), and each lane line coordinate list records the endpoint coordinates of all line segments in the frame image.
[0031] Among them, the parameters in the Hough transform include: the voting threshold threshold=120, to set the minimum number of votes required for detecting a straight line (i.e. the minimum cumulative number of intersection points in the Hough space, suitable for detecting obvious lane lines; the minimum line length minLineLength=50 pixels, to filter line segments with a length less than the set value; the maximum line gap maxLineGap=50 pixels to set the maximum interval allowed for connecting broken line segments.
[0032] (2.2) Multi-stage screening (2.2.1) Slope grouping: obtain the video after Hough transform, and perform dynamic screening based on slope on the line segments in each frame image of the video according to the preset slope tolerance threshold.
[0033] Obtain the slope of the line segment in the current frame image and the slope of the line segment at the corresponding position in the previous frame image, and calculate the slope difference between the two.
[0034] If the slope difference is less than or equal to the slope tolerance threshold, replace the coordinate information of the line segment in the current lane line coordinate list with the coordinate information of the corresponding line segment in the previous frame image.
[0035] If the slope difference is greater than the slope tolerance threshold, record the coordinate information of the line segment in the current lane line coordinate list.
[0036] Among them, the value of the slope tolerance threshold can be 0.1.
[0037] (2.2.2) Least squares fitting: fit the line segments in the group into a global straight line (or called a single straight line) through the least squares method, and extend to the image boundary to obtain a video with a global straight line.
[0038] The problem of traditional Hough transform line fragmentation is solved by dynamically grouping and fitting the line segments detected by Hough transform according to the slope.
[0039] (2.2.3) Angle screening: according to the preset angle tolerance threshold between the global straight line and the horizontal line, the global straight line in each frame of image of the video is screened.
[0040] The angle between the global straight line and the horizontal line in the current frame image and the angle between the global straight line at the corresponding position in the last frame image are obtained, and the angle difference between the two is calculated.
[0041] If the angle difference is less than or equal to the angle tolerance threshold, the coordinate information of the global straight line in the current lane line coordinate list is replaced by the coordinate information of the corresponding global straight line in the last frame image.
[0042] If the angle difference is greater than the angle tolerance threshold, the coordinate information of the global straight line or the corresponding line segment is recorded in the current lane line coordinate list.
[0043] The angle threshold range is 80°±10° to adapt to different lane line angles.
[0044] (2.2.4) Distance deduplication: calculate the minimum distance between each global straight line and other global straight lines on each frame of image, and according to the preset distance threshold, screen the video frame by frame to avoid repeated detection of similar lane lines.
[0045] If the minimum distance between the global straight line and other global straight lines is less than the distance threshold, the coordinates of the global straight line are not saved in the current lane line coordinate list, and other global straight lines in the frame image are continuously detected; if the minimum distance between the global straight line and other global straight lines is greater than or equal to the distance threshold, the coordinate information of the global straight line or the corresponding line segment is recorded in the current lane line coordinate list The distance threshold is 35 pixels. The line segment distance threshold distance_tolerance=35 Further preferably, for different situations such as vertical lines, horizontal lines and inclined lines, a piecewise function is used to accurately calculate the shortest distance to avoid misjudgment of parallel lines.
[0046] Let the coordinates of the point be (x0, y0), and the straight line equation be ax + by + c = 0. a and b are the normal vectors of the straight line, the slope of the straight line is m =−b / a, and c is the constant coefficient, which determines the distance between the straight line and the origin.
[0047] The piecewise function is divided into three categories according to the slope (or equation parameters) of the straight line: (a) Vertical line case (b = 0, a ≠ 0): dist = |x0 - (-c / a)|.
[0048] (b) Horizontal line case (a = 0, b ≠ 0): dist = |y0 - (-c / b)|.
[0049] (c) Oblique line case (a ≠ 0, b ≠ 0): .
[0050] (2.2.5) Intersecting line rejection (filtering): Detect whether the global straight line in the current frame image intersects with the global straight line corresponding to the position in the last frame to ensure that the final lane lines are parallel and do not interfere with each other. Compared with brute force search of all line segment combinations, by dynamically maintaining a list of non-intersecting line segments, the time complexity is optimized from O(n 2 ) to O(n).
[0051] If the global straight lines intersect, replace the coordinate information of the global straight line in the current lane line coordinate list with the coordinate information of the corresponding line segment in the last frame.
[0052] If they do not intersect, record the coordinate information of the global straight line or the corresponding line segment in the current lane line coordinate list.
[0053] Wherein, the vector cross product method, Kalman filter fusion multi-frame information method, parallelism constraint optimization method, parameter equation method or geometric transformation method are used to detect whether the global straight lines intersect.
[0054] (3) Stable line tracking: A time sequence information fusion method is used to judge and switch detection modes, which can avoid jitter caused by frequent detection and reduce about 90% of detection calculation, thereby improving processing efficiency.
[0055] (3.1) When step (1) obtains the detection video and pre-processes the first frame image in the detection video, a counter starts to accumulate the number of processed frames, and the value of the counter increases by 1 for each processed image.
[0056] For example, the original value of the counter is 0, when the first frame image in the detection video is pre-processed and multi-stage screened, the value of the counter becomes 1; when the second frame image in the detection video is pre-processed and multi-stage screened, the value of the counter becomes 2; and so on. When the nth frame image in the detection video is pre-processed and multi-stage screened, the value of the counter becomes n.
[0057] (3.2) Compare the current counter value with the preset first mode switching threshold.
[0058] (3.2.1) If the current counter value is less than or equal to the first mode switching threshold, the dynamic detection mode is maintained, steps (1)-(2) are continuously executed, and the counter continues to accumulate the number of processed image frames.
[0059] (3.2.2) If the current counter value is greater than the first mode switching threshold, the stable line mode is switched to, and lane detection is not performed to reduce the amount of calculation.
[0060] The first mode switching threshold is 10.
[0061] (3.3) The current counter value is compared with a preset second mode switching threshold: when the current counter value is greater than or equal to the second mode switching threshold, the dynamic detection mode is switched to, steps (1)-(3) are re-executed, and the counter value is cleared and re-counted.
[0062] The first mode switching threshold is 120 to adapt to different scene changes.
[0063] In the stable line tracking process, the strategy of initial frame detection + subsequent frame multiplexing + periodic reset is adopted, the first 10 frames are dynamically detected lane lines, the subsequent frames directly use the stable results, and the detection is reset after 120 frames to adapt to light changes or scene switching, solve the contradiction between noise interference and calculation efficiency in real-time detection, better balance the real-time and stability of detection, and adapt to the dynamic changes of complex traffic scenes.
[0064] (4) Visual output: lane lines are labeled and output in real time on each frame of the video.
[0065] (4.1) According to the lane line coordinate list corresponding to each frame of image, lane lines (marks) are drawn frame by frame, and the historical optimal lane line in the video is output frame by frame.
[0066] (4.2) A lane line total list is generated according to all lane line coordinate lists to store the optimal lane line information screened, and lane lines (marks) are continuously drawn and output in the video according to the lane line total list to improve the smoothness of the output.
[0067] Compared with the prior art, the beneficial effects of the present application include: 1) Multi-level robustness optimization Preprocessing stage: bilateral filtering is used instead of traditional Gaussian filtering to smooth noise while preserving edge details, improving the quality of subsequent Canny edge detection.
[0068] Post-processing stage: through the triple filtering mechanism of slope grouping, angle screening and distance tolerance, non-lane line interference (such as vehicle edges, guardrails, etc.) is effectively excluded.
[0069] 2) Dynamic stability detection mechanism Stable frame strategy: the first 10 frames dynamically detect lane lines, and the subsequent frames reuse the stable results (reset after 120 frames). This method avoids frequent calculations while maintaining real-time performance, making it suitable for video stream processing.
[0070] Intersection line removal: By geometric operations, remove intersecting line segments to solve the problem of repeated detection in traditional Hough transform, making the lane lines more concise.
[0071] 3) Adaptive fitting and extension Least squares fitting: Perform linear fitting on grouped line segments to generate lane lines that pass through the entire image, addressing the limitation of Hough transform that can only detect local line segments.
[0072] Boundary extension: Extend the fitted straight line from the top to the bottom of the image to adapt to different angle cameras and improve long-distance lane line detection capability.
[0073] 4) Parameter configurability Modular design: Parameters of each processing stage (preprocessing, Hough transform, screening, fitting) are independently adjustable. Compared with deep learning models, this method can adapt to new scenarios without retraining.
[0074] 5) Balanced computational efficiency Complexity control: The stability frame mechanism reduces more than 90% of repeated calculations (only the first 10 frames out of 120 perform complete detection).
[0075] Algorithm optimization: Intersection line judgment uses vectorized calculation to avoid nested loops, improving real-time performance.
[0076] 6) Improved scene adaptability Multi-direction support: Configure the detection direction through angle screening (example retains nearly vertical lines, annotation code can be switched to horizontal direction detection) Light robustness: Canny edge detection with dual thresholds (50-150) adapts to different lighting conditions, and bilateral filtering further smooths lighting abrupt changes.
[0077] The above description is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A lane line detection method based on dynamic group fitting and multi-condition screening, characterized in that the steps include: (1) Perform image preprocessing on the acquired detection video; (2) Perform multimodal lane line detection and screening to detect the lane lines in each video and output a video with lane line markings; (2.1) Perform a Hough transform on each frame of the preprocessed video to obtain a lane line coordinate list corresponding to each frame. Each lane line coordinate list records the endpoint coordinates of all line segments in that frame. (2.2) Perform multi-stage screening on the video to obtain accurate lane line information; (2.2.1) Slope grouping: Obtain the video after Hough transform and dynamically filter the line segments in each frame of the video based on the slope according to the preset slope tolerance threshold; (2.2.1.1) Obtain the slope of the line segment in the current frame image and the slope of the line segment at the corresponding position in the previous frame image, and calculate the difference between the two slopes; (2.2.1.2) Compare the slope difference to the slope tolerance threshold. If the slope difference is less than or equal to the slope tolerance threshold, replace the coordinates of the line segment in the current lane coordinate list with the coordinates of the corresponding line segment in the previous image frame. If the slope difference is greater than the slope tolerance threshold, record the coordinates of the line segment in the current lane coordinate list. (2.2.2) Least Squares Fitting: Fit the line segments in each frame of the image to a global straight line using the least squares method, extending them to the image boundary to obtain a video with a global straight line. (2.2.3) Angle screening: Screen the global straight lines in each frame of the video based on the preset angle tolerance threshold between the global straight line and the horizontal line; (2.2.3.1) Obtain the angle between the global straight line and the horizontal line in the current frame image and the angle between the global straight line and the horizontal line at the corresponding position in the previous frame image, and calculate the angle difference between the two; (2.2.3.2) Compare the angle difference to the angle tolerance threshold: If the angle difference is less than or equal to the angle tolerance threshold, replace the coordinates of the global line in the current lane coordinate list with the coordinates of the corresponding global line in the previous image frame. If the angle difference is greater than the angle tolerance threshold, record the coordinates of the global line or corresponding line segment in the current lane coordinate list. (2.2.4) Distance Deduplication: Calculate the minimum distance between each global line and other global lines in each frame, and filter the video frame by frame based on a preset distance threshold. If the minimum distance between a global line and other global lines is less than the distance threshold, the coordinates of the global line are not saved in the current lane coordinate list, and detection of other global lines in the frame continues. If the minimum distance between a global line and other global lines is greater than or equal to the distance threshold, the coordinates of the global line or the corresponding line segment are recorded in the current lane coordinate list. (2.2.5) Intersection Line Removal: Check whether the global straight line in the current frame image intersects with the global straight line corresponding to the same position in the previous frame to ensure that the final lane lines are parallel and do not interfere with each other: If they intersect, the coordinate information of the global line or the corresponding line segment in the current lane line coordinate list is replaced with the coordinate information of the corresponding global line or line segment in the previous frame; If they do not intersect, the coordinate information of the global line or the corresponding line segment is recorded in the current lane line coordinate list; (3) Stable line tracking: using time series information fusion method to judge and switch detection mode; (3.1) When the detection video is obtained in step (1) and the first frame image in the detection video is preprocessed, the counter starts to accumulate the number of image frames processed, and the value of the counter increases by 1 each time a frame image is processed; (3.2) comparing the current counter value with a preset first mode switching threshold; (3.2.1) If the current counter value is less than or equal to the first mode switching threshold, the dynamic detection mode is continued, and steps (1)-(2) are continued, and the counter continues to accumulate the number of image frames processed; (3.2.2) If the current counter value is greater than the first mode switching threshold, switch to the stable line mode and do not perform lane detection to reduce the amount of calculation; (3.3) Compare the current counter value with the preset second mode switching threshold: if the current counter value is greater than or equal to the second mode switching threshold, switch to the dynamic detection mode, re-execute steps (1)-(3), and reset the counter value to zero and restart counting; (4) Visual output: Mark the lane lines on each frame of the video in real time and output them; (4.1) Draw lane lines frame by frame based on the lane line coordinate list corresponding to each frame image, and output them frame by frame; (4.2) Generate a lane line master list based on all lane line coordinate lists to store the optimal lane line information obtained by screening, and continuously draw lane lines in the video based on the lane line master list and output it.
2. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1, characterized in that: In step (1), the image preprocessing steps include: (1.1) Use bilateral filtering to reduce noise on the acquired video; (1.2) Grayscale conversion: compressing the three-dimensional color space of the denoised video into a one-dimensional grayscale to reduce the computational dimension; (1.3) Perform edge detection on each frame image in the grayscale video to determine the edge of each frame image in the video.
3. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1, characterized in that: In step (1.3), the edge detection method includes the Canny edge detection method.
4. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1, characterized in that: In step (2.2.1), the slope tolerance threshold value is 0.
1.
5. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1 is characterized in that: In step (2.2.3), the angle threshold range is 80°±10°.
6. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1, characterized in that: In step (2.2.4), the distance threshold is 35 pixels.
7. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1 is characterized in that: For vertical lines, horizontal lines, and oblique lines, a piecewise function is used to calculate the shortest distance of the global straight line.
8. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1 is characterized in that: In step (2.2.5), the vector cross product method, the Kalman filter fusion multi-frame information method, the parallelism constraint optimization method, the parametric equation method or the geometric transformation method is used to detect whether the global straight lines intersect.
9. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1, characterized in that: In step (3.3), the first mode switching threshold is 10.
10. The lane line detection method based on dynamic group fitting and multi-condition screening according to claim 1, characterized in that: In step (3.3), the first mode switching threshold is 120.