Unstructured lane detection method based on Bezier curve and local regression algorithm
Through the unstructured lane detection method of Bezier curve and local regression algorithm, the problems of path discontinuity and maximum curvature constraints in unstructured road detection are solved, and higher detection accuracy and real-time performance are achieved.
Patent Information
- Application Number
- CN202510735646.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-04
AI Technical Summary
The existing unstructured road lane line detection technology is difficult to establish an effective model in complex scenarios, and path discontinuity and maximum curvature constraints are difficult to meet, resulting in insufficient detection accuracy and robustness.
Unstructured lane detection method based on Bezier curve and local regression algorithm is adopted, and through image preprocessing, B-spline curve model, local weighted regression algorithm and curve smoothing processing, path continuity and maximum curvature constraints are ensured, and detection accuracy and real-time performance are improved.
It improves the accuracy and robustness of unstructured road detection, can effectively identify complex roads, and has better real-time performance.
Smart Images

Figure CN120260003A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of autonomous driving, and particularly relates to an unstructured lane detection method based on Bezier curves and local regression algorithms. Background Art
[0002] Lane lines are key infrastructures to ensure traffic safety and smoothness, and are usually marked on the road surface in the form of solid lines or dotted lines in structured roads. In autonomous driving technology, lane line detection is one of the key technologies, which realizes the safe and automatic driving of vehicles by identifying road boundaries and predicting vehicle driving trajectories. However, in actual driving scenarios, factors such as shadow occlusion, traffic marking wear, and obstacle occlusion may all interfere with the accurate identification of lane lines. Especially in unstructured roads, such as forest roads, rural roads, muddy or sandy roads, etc., such roads often do not have lane lines and clear road boundaries, or are covered by dense plants to produce shadows, or are affected by road surface water accumulation in special weather, making it difficult to distinguish between road areas and non-road areas. Therefore, traditional lane line detection technologies have certain limitations.
[0003] Currently, the detection algorithms for unstructured roads can be divided into four categories: road feature-based methods, road model-based methods, neural network-based methods, and support vector machine-based methods. Among them, road model-based methods need to construct a highly adaptable road model, but it is difficult to establish an effective model in complex scenarios; road feature-based methods distinguish roads from non-roads according to the color and texture features of the road, and this method is more sensitive to situations such as shadows, illumination changes, and water accumulation; both neural network-based methods and support vector machine-based methods require a large number of samples to be collected and multiple trainings to be carried out. In road model-based methods, ensuring the continuity of the model path and considering the maximum curvature constraint of the vehicle are two key points. In current related research, although some parameter spline algorithms related to road models consider the maximum curvature, there are problems with discontinuous paths. At the same time, the connection between different road sections will also cause discontinuity, which will have a greater impact on the accuracy of the road model. To address the above problems, the present invention proposes an unstructured lane detection method based on Bezier curves and local regression algorithms. Summary of the Invention
[0004] The purpose of the present invention is to provide an unstructured lane detection method based on Bezier curves and local regression algorithms, aiming to solve the problems proposed in the above background art.
[0005] The purpose of the present invention is achieved through the following technical solutions: An unstructured lane detection method based on Bezier curves and local regression algorithms, comprising the following steps: Step 1: Obtain a road section image; Use an in-vehicle camera to capture an unstructured road, obtain a section video, and then extract section images from the video; Step 2: Image preprocessing; Perform image preprocessing on the obtained section images, including calibrating the in-vehicle camera, correcting image distortion, converting the color space, defining the ROI region, and converting the view to a bird's-eye view; Step 3: Select a road model; Use B-spline basis functions to replace Bernstein basis functions and adopt a cubic B-spline curve as the road model; Step 4: Define the path continuity problem of the road model; Step 5: Constrain the maximum curvature of the road model; Step 6: Midpoint insertion operation; Step 7: Curve smoothing processing; Meet the maximum curvature constraint through curve smoothing and derive the path curvature as a function of segment parameters; Step 8: Smooth the cubic B-spline curve road model; Smooth the cubic B-spline curve road model with the parameters obtained from Step 4 to Step 7; Step 9: Implement the locally weighted regression algorithm; Step 10: Fit and identify the road.
[0006] Furthermore, the specific steps of Step 2 are as follows: Step 2.1: Calibrate the camera using Zhang Zhengyou's calibration method to achieve the mapping between image pixel coordinates and the world coordinates of corresponding points in space. The formula is as follows: ; Among them, is the Z coordinate of the point in the camera coordinate system, indicating the distance from the in-vehicle camera to the object being photographed in the optical axis direction; are the horizontal and vertical coordinates of the selected point in the pixel coordinate system respectively; is the pixel size; are the horizontal and vertical coordinates of the image center point in the pixel coordinate system respectively; f is the focal length of the in-vehicle camera; = f / , = f / , are the normalized focal lengths on the x-axis and y-axis respectively; R is the rotation matrix, T is the translation matrix, both of which are the external parameters of the in-vehicle camera; The position components of the spatial point in the horizontal, vertical, and depth directions in the world coordinate system respectively; Step 2.2: Perform distortion correction on the image, and the formula is as follows: ; where, is the radial distortion coefficient; is the coordinate in the normalized image coordinate system; are the horizontal and vertical coordinates in the corrected image coordinate system; Step 2.3: Transform the obtained image from the RGB color space to the HSV color space, where H is hue, S is saturation, and V is value; use the HSV color space to segment the image and obtain its gradient threshold in the S channel ( ); Step 2.4: Apply the Sobel operator to perform edge detection on the image, and obtain the threshold in the x direction of the image ( ) and the threshold in the y direction ( ), and superimpose the gradient thresholds of the Sobel operator in the x and y directions with the color threshold in the S channel of the HSV color space; Step 2.5: The ROI region is delimited by prior knowledge, and the ROI region range is ROI = [0, H / 2 x [0, W , where W is the image width and H is the image height; Step 2.6: Transform the processed view into a bird's-eye view through inverse perspective transformation, and the inverse perspective matrix is expressed as P = [Mt], where M is the camera intrinsic matrix and t is the camera extrinsic matrix.
[0007] Furthermore, in the said Step 3, the mathematical expression of the curve function corresponding to the road model is: = + + ; where, P0, P1, P2, and P3 are the control points on the road; are the basis functions corresponding to the control points P0, P1, P2, and P3 respectively.
[0008] Furthermore, in the said Step 4, the path continuity problem of the road model is defined as: ; where it is assumed that the curve is composed of segment and segment linked together, and the start end of segment is linked to the end of segment ; is segment S (u ) At the starting point u = 0, the -th order derivative reflects the k -th order rate of change of the curve at this point; is the segment R ( u ) At the end point u = 1, the -th order derivative reflects the k -th order rate of change of the curve at this point; is the order of the derivative, and its value range is 1, 2,..., i −1, that is, from the first-order derivative to the i −1-th order derivative; is a positive integer that defines the highest-order derivative continuity to be satisfied.
[0009] Further, in step 5, the formula for constraining the maximum curvature of the road model is as follows: ; where is the steering angle limit; is the minimum turning radius; is the maximum curvature.
[0010] Further, in step 7, the path curvature is: ; where is the path curvature; L is the vehicle wheelbase; is the curve parameter; For a given minimum segment angle , the corresponding minimum segment length is: .
[0011] Further, the specific process of step 8 is as follows: Input the maximum curvature , the path point coordinates , the minimum segment angle ; Perform midpoint insertion processing on every two consecutive path points, and insert the midpoint and between the points, and then update the path point ; Calculate the segment parameter minimum segment length ; For each segment, perform the following operations: If > > , then use and to construct a segment and insert the midpoint into the new segment , update the path points ; If < , then proceed to the next step; calculate 、 and return to obtain the smoothed cubic B-spline curve road model; The expression of is as follows: ; Among them, L is the vehicle wheelbase; is the curve parameter.
[0012] Furthermore, the specific steps of step 9 are as follows: Step 9.1: For each data point X i in the dataset, calculate the weight according to its distance from the target point X0, where the calculation formula of the weight is as follows: = exp(- ); For the area where the data fluctuation amplitude exceeds the threshold, replace the kernel function with: = exp(- ); Among them, is a smoothing parameter; Step 9.2: Adopt the Huber Loss function, and its formula is as follows: ; Among them, is the value of the Huber Loss function, which is used to measure the error between the predicted value and the true value y ; represents the true value, that is, the true label or target value of the sample data; is the predicted value; ϵ is a threshold used to distinguish the size of the error.
[0013] Furthermore, the specific steps of step 10 are as follows: Step 10.1: Search for pixel points with non-zero gray values in the detected image to obtain the data point set A; Step 10.2: According to the smoothed cubic B-spline curve road model, randomly select control points in the data point set A to obtain the initial cubic B-spline curve; Step 10.3: Screen the valid points by comparing the relative distances from the remaining data points in the data point set A to the initial cubic B-spline curve, and obtain the valid point set F; Step 10.4: When the number of data points in the valid point set F reaches the preset effective number threshold n of the road model, proceed to the next step; otherwise, return to Step 10.2 and Step 10.3 for repeated calculations until the number of valid points meets the requirements or there are no searchable qualified data points; Step 10.5: Re-fit the cubic B-spline curve with the data points in the current valid point set A, and update the positions of the control points; Step 10.6: When the number of iterations reaches the upper limit k, obtain the optimal road model.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: Based on the traditional road recognition algorithm, the present invention applies the HSV color space and the Sobel operator edge detection threshold superposition technology, improving the accuracy of the unstructured road threshold detection. At the same time, the existing cubic B-spline curve Bezier model is smoothed and optimized to simultaneously meet the path continuity and the vehicle maximum curvature constraint. In addition, the improved locally weighted regression algorithm is used to enable the road model to reach the optimum through iteration. This series of operations improves the accuracy and robustness of the detection, and compared with the traditional machine learning method, it has better real-time performance and can effectively identify unstructured roads. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a flowchart of the method of the present invention.
[0016] Figure 2 It is a schematic diagram of the middle section parameters of the present invention.
[0017] Figure 3 It is a flowchart of Step 8 of the present invention.
[0018] Figure 4 It is a flowchart of Step 10 of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0019] In order to have a clearer understanding of the technical features, objectives, and beneficial effects of the present invention, the technical solution of the present invention will be described in detail below, but it should not be construed as a limitation on the implementable scope of the present invention.
[0020] The present invention provides an unstructured lane detection method based on the Bezier curve and the local regression algorithm. The flowchart of the method is as Figure 1 shown, including the following steps: Step 1: Obtain the road section image; Use an in-vehicle camera to capture unstructured roads, obtain a section of video, and then extract section images from the video.
[0021] Step 2: Image preprocessing; Perform image preprocessing on the obtained section images, including calibrating the in-vehicle camera, correcting image distortion, converting the color space, defining the ROI area, and converting the view to a bird's-eye view; the specific steps are as follows: Step 2.1: Calibrate the in-vehicle camera using the Zhang Zhengyou calibration method to obtain the internal and external parameters of the in-vehicle camera and establish the mapping relationship between the image pixel coordinates and the world coordinates of the corresponding points in space.
[0022] Taking a point on the image as an example, its pixel coordinate system coordinates are ( u , v ). According to the mapping relationship between the pixel coordinate system and the world coordinate system, solve its corresponding world coordinate system coordinates ( , , ), denoted as: Equation 1: ; Where, is the Z coordinate of the point in the camera coordinate system, representing the distance from the in-vehicle camera to the object being photographed in the optical axis direction; are the horizontal and vertical coordinates of the selected point in the pixel coordinate system respectively; is the pixel size; are the horizontal and vertical coordinates of the image center point in the pixel coordinate system respectively; f is the focal length of the in-vehicle camera; = f / , = f / , are the normalized focal lengths on the x-axis and y-axis respectively; R is the rotation matrix, T is the translation matrix, both of which are the external parameters of the in-vehicle camera; are the position components of the spatial point in the world coordinate system in the horizontal, vertical, and depth directions respectively.
[0023] Step 2.2: Correct the image distortion, and the formula is as follows: Equation 2: ; Where, is the radial distortion coefficient; is the coordinate in the normalized image coordinate system; are the horizontal and vertical coordinates in the corrected image coordinate system.
[0024] Step 2.3: Transform the obtained image from the RGB color space to the HSV color space, where H is hue, S is saturation, and V is value. Segment the image using the HSV color space to obtain the gradient threshold of its S channel ( ).
[0025] Step 2.4: Apply the Sobel operator to perform edge detection on the image to obtain the threshold in the x direction ( ) and the threshold in the y direction ( ) of the image, and superimpose the gradient thresholds of the Sobel operator in the x and y directions with the color threshold of the S channel in the HSV color space.
[0026] Step 2.5: Considering that lane lines usually appear at the lower part of the image, select the lower part of the image as the region of interest (ROI). From prior knowledge, for an input image with width W and height H, the selected ROI region is: Equation 3: ROI = [0, H / 2 x [0, W ; Step 2.6: Transform the processed view into a bird's-eye view through inverse perspective transformation. The inverse perspective matrix is represented as P = [M t], where M is the camera internal parameter matrix and t is the camera external parameter matrix.
[0027] Step 3: Select a road model; Use B-spline basis functions to replace Bernstein basis functions and adopt a cubic B-spline curve as the road model.
[0028] A (Bézier) Bézier curve is a parametric curve defined by a set of control points. For an nth-degree Bézier curve, it has n + 1 control points P0, P1,..., P n . Its mathematical expression is: . The Bézier curve can represent free curves, but when the curve shape is too complex, modifying the position of one control point will affect the shape of the entire curve, making it difficult to meet the design requirements in the actual application process. Based on the above problems, considering that the B-spline curve has local control characteristics, use B-spline basis functions to replace Bernstein basis functions: Equation 4: ; In B-spline parametric curves, the cubic B-spline is superior to other parametric curves and smoothing methods in path tracking and replanning. Therefore, the present invention adopts a cubic B-spline curve as the road model, and its mathematical expression is: = + + ; Among them, P0, P1, P2, and P3 are control points on the road and can be adjusted according to road conditions; are the basis functions corresponding to the control points P0, P1, P2, and P3 respectively.
[0029] Step 4: Define the path continuity problem of the road model; In a Bézier curve, path discontinuity often occurs at the connection points between curves. C 1 and C 2 Continuity is an important concept describing the smoothness of a curve. C 1 Continuity means that the first derivative of the curve at this point is continuous. And C 2 continuity requires that the second derivative of the curve at this point is also continuous. In the present invention, the continuity of the path mainly considers the constraints at C 2 Assume that the curve is composed of segment and segment linked together, and the start end of segment is linked to the end of segment In the B-spline curve function, for adjacent curve segments th of degree i and , C i-1 The path continuity is defined by the following formula: Equation 6: ; where, is the S ( u )-th derivative of segment u at the starting point = 0, reflecting the k -th order change rate of the curve at this point; is the R ( u )-th derivative of segment u at the end point = 1, reflecting the k -th order change rate of the curve at this point; is the order of the derivative, and the value range is 1, 2,..., i −1, that is, from the first derivative to the i −1-th derivative; is a positive integer, defining the highest order derivative continuity that needs to be satisfied.
[0030] Step 5: Constrain the maximum curvature of the road model; The maximum curvature constraint of the curve is obtained from the bicycle model. The bicycle model is a simplified mathematical model describing the dynamic behavior of a vehicle, where the speed components are constrained as shown in formula where x and y are the axes in the Cartesian coordinate system, and and is the speed of the vehicle relative to the axes of its local coordinate system, and the angle θ is the change in direction relative to the x-axis.
[0031] Define the path curvature as , the turning radius as ρ , the steering angle as δ , and the wheelbase of the vehicle as L ; in the actual operating conditions of the vehicle, its steering angle is limited to , which in turn limits the turning radius and path curvature of the road model to a minimum turning radius and a maximum curvature ; the path of the vehicle is constrained by the limited steering angle, but the path constraint is usually described by curvature, as shown in the following equation: Equation 7: .
[0032] Step 6: Midpoint insertion operation; Path discontinuities occur between two arbitrarily connected segments. To ensure that a single B-spline curve can accurately represent the path and maintain continuity. Insert a point between every two consecutive control points, i.e., midpoint insertion. This can effectively force the B-spline curve to follow the path more accurately using the tangent property. Based on the application of cubic B-spline curves, two midpoints are inserted between the original three control points. Inserting midpoints increases the path curvature, i.e., any path can be divided into segments consisting of five consecutive points (three control points and two midpoints). Using the local control characteristics of B-splines, the maximum curvature constraint of each segment can be satisfied. The curvature of the segment is defined and calculated according to its mathematical formula, and the segment parameters are set by the maximum curvature of the vehicle. The segment consists of five points, three of which are control points, and these points form two intersecting lines. The two parameters of the segment are the segment length and the segment angle , is the length of the shorter segment edge (see Figure 2 ). The five control points , the expression is as follows: Equation 8: ; Equation 9: ; where is the set of several points ; is the set of several points .
[0033] Step 7: Curve smoothing; To fully satisfy the maximum curvature constraint, the path curvature is derived as a function of the segment parameters, and the formula is as follows: Equation 10: ; wherein, is x the first derivative of the parameter u and represents the rate of change of the path in the x direction; is y the second derivative of the parameter u and represents the change in the rate of change of the path in the y direction; is y the first derivative of the parameter u and represents the rate of change of the path in the y direction; is x the second derivative of the parameter u and represents the change in the rate of change of the path in the x direction; is the path curvature.
[0034] The curve equation corresponding to the original segment is the path obtained by substituting the control points into the B-spline curve and the basis function , wherein are the positions of the path in the horizontal and vertical directions respectively, and the expressions are as follows: Equation 11: ; Equation 12: ; Substituting into Equation 10, the path curvature is obtained as ; wherein, L is the vehicle wheelbase; is the curve parameter.
[0035] The purpose of curve smoothing is to ensure that the segment curvature is less than the maximum vehicle curvature. Define the minimum segment angle and calculate the corresponding minimum segment length . If the angle of a segment exceeds the threshold, it is modified. For a given minimum segment angle , the corresponding is . This operation relies on the local control characteristics of the B-spline, enabling the segment to be modified with minimal impact on other segments and maintaining path continuity using a single curve.
[0036] Step 8: Smoothing of the cubic B-spline curve road model; Smooth the cubic B-spline curve road model with the parameters obtained in Steps 4 to 7. The specific steps are as follows (see Figure 3 ): Step 8.1: Input the maximum curvature , the path point coordinates , Minimum segment angle ; Step 8.2: Output the B-spline path coordinates ; Step 8.3: Perform midpoint insertion processing on every two consecutive path points, insert the midpoint and between, and then update the path point ; ; Step 8.4: Calculate the minimum segment length of the segment parameters ; Step 8.5: For each segment, perform the following operations: If > , then use and to construct the segment, insert the midpoint in the new segment, and update the path point ; If < , then proceed to the next step; Step 8.6: Calculate , and return to obtain the smoothed cubic B-spline curve road model.
[0037] This algorithm smooths the path by inserting midpoints between path points and adjusting the path points, while ensuring that the path curvature does not exceed the given maximum curvature.
[0038] Step 9: Implementation of the locally weighted regression algorithm; In a set of data point sets, for the selected target point X0, the points closer to the target point X0 will be assigned higher weights, and conversely, the farther data points will be assigned lower weights.
[0039] The specific steps are as follows: Step 9.1: For each data point X i in the data set, calculate the weight according to its distance from the target point X0, where the calculation formula for the weight is as follows: Equation 13: = exp(- ) For a region where some data fluctuates greatly, replace the kernel function with: Equation 14: = exp(- ) where is a smoothing parameter that determines the weighted range.
[0040] Step 9.2: Use the Huber Loss function to replace the loss function of the ordinary regression algorithm. The formula is as follows: Equation 15: ; where, is the value of the Huber Loss function, which is used to measure the error between the predicted value and the true value y ; represents the true value, that is, the true label or target value of the sample data; is the predicted value; ϵ is a threshold used to distinguish the magnitude of the error, ϵ and the optimal value can be obtained through cross-validation.
[0041] When , the gradient gradually decreases, ensuring that the model can more accurately obtain the global optimal value; when , the gradient is approximately ϵ , ensuring that the model can update the parameters at a faster speed.
[0042] Step 10: Fit and identify the road; the specific steps are as follows (see Figure 4 ): Step 10.1: Search for pixel points with non-zero gray values in the detected image to obtain the data point set A; Step 10.2: According to the smoothed cubic B-spline curve road model, randomly select 4 points from the data point set A as the initial control points P0, P1, P2, P3 of the curve fitting to obtain an initial cubic B-spline curve; Step 10.3: Calculate the relative distances from the remaining data points in the data point set A to the initial cubic B-spline curve, and take the data points with distances not exceeding the threshold d (indicating that the data point is very close to the fitted curve) as valid points and add them to the valid point set F; Step 10.4: When the number of data points in the valid point set F reaches the preset threshold n for the effective number of the road model, proceed to the next step; otherwise, return to Step 10.2 and Step 10.3 to repeat the calculation until the number of valid points meets the requirements or there are no searchable data points that meet the conditions; Step 10.5: Refit the cubic B-spline curve with the data points in the current valid point set A and update the positions of the control points P0, P1, P2, P3; Step 10.6: When the number of iterations reaches the upper limit k, obtain the optimal road model.
[0043] The following describes the specific implementation of the present invention in detail with specific embodiments.
[0044] Embodiment 1: Verification of the effect of the method of the present invention; Experimental environment: Hardware: CPU: 12 cores; Memory: 90GB; GPU: NVIDIA vGPU - 32GB, 1 piece; Software: python == 3.8, cuda == 11.8.
[0045] Use public datasets such as TuSimple, CULane, and Curve Lane. Set the video frame rate in the dataset to 30fps, and select some segments from the three datasets respectively for algorithm performance testing. Verify the algorithm performance through frame-by-frame statistical analysis. Among them, the TuSimple dataset mainly contains road data on highways and sections under good lighting conditions, with relatively low recognition difficulty. The CULane dataset mainly contains urban road data, with high authenticity and diversity. The Curve Lane dataset contains a variety of complex curve lane images and focuses on curve lane line detection. To demonstrate the advantages of the method of the present invention compared with traditional machine learning methods, 800 frames, 1200 frames, and 1600 frames of images are selected for testing under the three datasets respectively. The experimental results are shown in Tables 1 - 3 (in the table, A is the method of the present invention, and B is the traditional machine learning method): Table 1 TuSimple Method Number of frames Accuracy rate / % Calculation speed / fps AB 800800 98.398.2 6665 Table 2 CULane Method Number of frames Accuracy rate / % Calculation speed / fps AB 12001200 97.997.6 5955 Table 3 Curve Lane Method Number of frames Accuracy rate / % Calculation speed / fps AB 16001600 96.994.2 4939 Note: The higher the unit of calculation speed (fps) in the table, the better the real-time performance of the algorithm.
[0046] Experimental conclusion: It can be seen from the data in the table that when dealing with the relatively simple TuSimple and CULane datasets, the performance of the method of the present invention is close to that of traditional machine learning methods; while when dealing with the relatively complex curve road Curve Lane dataset, the method of the present invention has better accuracy and real-time performance compared with traditional machine learning methods.
[0047] The above is only the preferred implementation mode of the present invention. It should be noted that for those skilled in the art, without departing from the concept of the present invention, several deformations and improvements can still be made, which should also be regarded as the protection scope of the present invention, and these will not affect the implementation effect of the present invention and the practicality of the patent.
Claims
1. An unstructured lane detection method based on Bessel curves and local regression algorithms, characterized in that It includes the following steps: Step 1: Obtain road segment images; Use an in-vehicle camera to capture unstructured roads to obtain a road segment video, and then extract road segment images from the video; Step 2: Image preprocessing; Perform image preprocessing on the obtained road segment images, including calibrating the in-vehicle camera, correcting image distortion, converting the color space, defining the ROI region, and converting the view to a bird's-eye view; Step 3: Select a road model; Use B-spline basis functions to replace Bernstein basis functions, and adopt a cubic B-spline curve as the road model; Step 4: Define the path continuity problem of the road model; Step 5: Constrain the maximum curvature of the road model; Step 6: Midpoint insertion operation; Step 7: Curve smoothing processing; Meet the maximum curvature constraint through curve smoothing, and derive the path curvature as a function of the segment parameter; Step 8: Smooth the cubic B-spline curve road model; Smooth the cubic B-spline curve road model with the parameters obtained from Step 4 to Step 7; Step 9: Implement the locally weighted regression algorithm; Step 10: Fit and identify the road.
2. The unstructured lane detection method based on Bessel curves and local regression algorithms according to claim 1, characterized in that The specific steps of Step 2 are as follows: Step 2.1: Calibrate the camera using Zhang Zhengyou's calibration method to achieve the mapping between image pixel coordinates and the world coordinates of corresponding points in space. The formula is as follows: ; Wherein, is the Z coordinate of a point in the camera coordinate system; are respectively the horizontal and vertical coordinates of the selected point in the pixel coordinate system; is the pixel size; are respectively the horizontal and vertical coordinates of the image center point in the pixel coordinate system; f is the focal length of the vehicle-mounted camera; = f / , = f / , are respectively the normalized focal lengths on the x-axis and y-axis; R is the rotation matrix, T is the translation matrix, both of which are the external parameters of the vehicle-mounted camera; are respectively the position components of the spatial point in the world coordinate system in the horizontal, vertical, and depth directions; Step 2.2: Correct the image distortion. The formula is as follows: ; Among them, is the radial distortion coefficient; is the coordinate in the normalized image coordinate system; are the horizontal and vertical coordinates in the corrected image coordinate system; Step 2.3: Transform the obtained image from the RGB color space to the HSV color space, where H is hue, S is saturation, and V is value; segment the image using the HSV color space to obtain the gradient threshold of the image in the S channel ( ); Step 2.4: Use the Sobel operator to perform edge detection on the image to obtain the threshold value of the image in the x direction ( ) and the threshold value in the y direction ( ), and superimpose the gradient threshold values of the Sobel operator in the x and y directions with the color threshold value of the S channel in the HSV color space; Step 2.5: The ROI region is delimited by prior knowledge, and the range of the ROI region is ROI = [0, H / 2 x [0, W , where W is the image width and H is the image height; Step 2.6: Convert the processed view to a bird's-eye view through inverse perspective transformation. The inverse perspective matrix is expressed as P = [M t], where M is the camera internal parameter matrix and t is the camera external parameter matrix.
3. The unstructured lane detection method based on Bessel curves and local regression algorithms according to claim 1, characterized in that In Step 3, the mathematical expression of the curve function corresponding to the road model is: = + + ; Among them, P0, P1, P2, and P3 are control points on the road; They are basis functions corresponding to the control points P0, P1, P2, and P3 respectively.
4. The unstructured lane detection method based on the Bessel curve and the local regression algorithm according to claim 1, characterized in that In Step 4, define the path continuity problem of the road model as: ; where it is assumed that the curve is composed of segments and segment linked together, and the start end of segment is linked to the end of segment ; is the S ( u )-th order derivative of u at the starting point = 0; is the R ( u )-th order derivative of u at the end point = 1; is the order of the derivative, and the value range is 1, 2,..., i − 1, that is, from the first-order derivative to the i − 1-th order derivative; is a positive integer.
5. The unstructured lane detection method based on Bessel curves and local regression algorithms according to claim 1, characterized in that In Step 5, the formula for constraining the maximum curvature of the road model is as follows: ; Among them, is the steering angle limit; is the minimum turning radius; is the maximum curvature.
6. The unstructured lane detection method based on Bessel curves and local regression algorithms according to claim 1, characterized in that In Step 7, the path curvature is: ; Among them, is the path curvature; L is the vehicle wheelbase; is the curve parameter; For a given minimum segment angle , the corresponding minimum segment length is as follows: 。 7. The unstructured lane detection method based on Bessel curve and local regression algorithm according to claim 1, characterized in that, The specific process of Step 8 is as follows: Input maximum curvature , waypoint coordinates , minimum segment angle ; perform midpoint insertion processing on every two consecutive waypoints, and insert a midpoint and between points , and then update the waypoints ; Calculation section parameter minimum section length ; For each section, perform the following operations: If > , then use and to construct the section, insert the midpoint into the new section, update the path point ; If < , then proceed to the next step; Calculate , and return to obtain the smoothed cubic B-spline curve road model; The expression is as follows: ; ; Among them, L is the wheelbase of the vehicle; is the curve parameter.
8. The unstructured lane detection method based on Bessel curve and local regression algorithm according to claim 1, characterized in that The specific steps of Step 9 are as follows: Step 9.1: For each data point X in the dataset i , calculate the weight according to its distance from the target point X0 , where the calculation formula for the weight is as follows: = exp(- ); For regions where the data fluctuation amplitude exceeds the threshold, replace the kernel function with: = exp(- ); Among them, is a smoothing parameter; Step 9.2: Adopt the Huber Loss function. The formula is as follows: ; Among them, is the value of the Huber Loss function, which is used to measure the predicted value and the true value y the error between them; represents the true value, that is, the true label or target value of the sample data; is the predicted value; ϵ is a threshold used to distinguish the magnitude of the error.
9. The unstructured lane detection method based on Bessel curve and local regression algorithm according to claim 1, characterized in that, The specific steps of Step 10 are as follows: Step 10.1: Search for pixel points with non-zero gray values in the detected image to obtain a data point set A; Step 10.2: According to the smoothed cubic B-spline curve road model, randomly select control points in the data point set A to obtain an initial cubic B-spline curve; Step 10.3: Screen valid points by comparing the relative distances from the remaining data points in the data point set A to the initial cubic B-spline curve to obtain a valid point set F; Step 10.4: When the number of data points in the valid point set F reaches the preset effective number threshold n of the road model, proceed to the next step; otherwise, return to Step 10.2 and Step 10.3 to repeat the calculation until the number of valid points meets the requirements or there are no searchable qualified data points; Step 10.5: Refit the cubic B-spline curve with the data points in the current valid point set A and update the positions of the control points; Step 10.6: When the number of iterations reaches the upper limit k, obtain the optimal road model.
Citation Information
Patent Citations
A lane line self-adaptive detection method
CN109785291A
Real-time vehicle line pressing early warning method
CN112989886A
Intelligent vehicle obstacle avoidance path planning method and system
CN117128995A
Mechanical arm obstacle avoidance path planning based on improved bidirectional RRT algorithm
CN119188771A
Crack detection method and system based on digital twinning and multiple intelligent perception
CN119379696A