Lane recognition method, device and storage medium
By combining the lane semantic segmentation model and the lane line fitting model, the problem of inaccurate lane recognition in complex environments is solved, and higher recognition accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202210743328.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2042-06-27
AI Technical Summary
The prior art is difficult to accurately identify lane lines in complex environments, and there is a risk that information identification is inaccurate or even unrecognizable.
The lane images are characterized by the lane semantic segmentation model, and the lane line fitting model is used to fit the curve, combined with the screening strategy of the default lane line and the candidate lane line, determine the confidence of the target lane line, and return through the optimal change right to return Update the target lane line.
It improves the accuracy and reliability of lane recognition in complex environments and ensures the stability and real-time performance of lane recognition.
Smart Images

Figure CN115116017B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of assisted driving technology, and in particular to a lane recognition method, device, and storage medium. Background Art
[0002] As the underlying technology of autonomous driving, lane segmentation and fitting technology based on visual images has received much attention for its accuracy, stability, and real-time performance. The complexity of the vehicle driving environment and the difference in lighting conditions pose challenges to lane recognition, and there is a risk of inaccurate or even unrecognizable information. Summary of the invention
[0003] The present application provides a lane recognition method, including:
[0004] The lane semantic segmentation model is used to extract features of the current frame of the lane image to obtain a lane semantic map;
[0005] Using a lane line fitting model to perform curve fitting on the data of the lane semantic map to obtain candidate lane lines, and selecting left and right lane lines that meet the screening strategy from the candidate lane lines and the default lane lines as target left and right lane lines of the current frame; wherein the default lane lines are left and right lane lines with default curve fitting coefficients;
[0006] Determine the confidence of the target left and right lane lines in the current frame;
[0007] Perform optimal variable weight regression of lane line historical data based on curve fitting coefficients and confidences of target left and right lane lines in the current frame and multiple frames before the current frame to obtain variable weight fitting lane line fitting coefficients of the current frame;
[0008] The target left lane line and the target right lane line of the current frame are updated according to the variable weighted fitting lane line fitting coefficient of the current frame, and the lane between the updated target left lane line and the target right lane line is used as the target lane of the current frame.
[0009] An embodiment of the present application provides a lane recognition device, including: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above-mentioned lane recognition method are implemented.
[0010] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which implements the steps of the above lane recognition method when executed by a processor.
[0011] The lane recognition method provided by the embodiment of the present application extracts features from the current frame of the lane image through a lane semantic segmentation model to obtain a lane semantic map; uses a lane line fitting model to perform curve fitting on the data of the lane semantic map to obtain candidate lane lines, and selects left and right lane lines that meet the screening strategy from the candidate lane lines and the default lane lines as the target left and right lane lines of the current frame; wherein the default lane lines are left and right lane lines with curve fitting coefficients of default values; determines the confidence of the target left and right lane lines of the current frame; performs optimal variable weight regression of lane line history data based on the curve fitting coefficients and confidence of the target left and right lane lines of the current frame and multiple frames before the current frame, and obtains the variable weight fitting lane line fitting coefficient of the current frame; updates the target left lane line and the target right lane line of the current frame based on the variable weight fitting lane line fitting coefficient of the current frame, and uses the lane between the updated target left lane line and the target right lane line as the target lane of the current frame. The above lane recognition method improves the accuracy and reliability of lane recognition in complex environments.
[0012] Other aspects will be apparent upon reading and understanding the drawings and detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0014] Figure 1 A schematic flow chart of a lane recognition method according to an embodiment of the present application;
[0015] Figure 2 A schematic diagram of the structure of a lane recognition device according to an embodiment of the present application. DETAILED DESCRIPTION
[0016] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the specific embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.
[0017] The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in the present application may also be combined with any conventional features or elements to form a unique invention scheme defined by the appended claims. Any features or elements of any embodiment may also be combined with features or elements from other invention schemes to form another unique invention scheme defined by the appended claims. Therefore, it should be understood that any feature shown and / or discussed in the present application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the appended claims and their equivalents, the embodiments are not subject to other restrictions. In addition, various modifications and changes may be made within the scope of protection of the appended claims.
[0018] The present application embodiment provides a lane recognition method. Figure 1 As shown, a lane recognition method includes:
[0019] Step S10, extracting features of the current frame of the lane image using a lane semantic segmentation model to obtain a lane semantic map;
[0020] Step S20, using a lane line fitting model to perform curve fitting on the data of the lane semantic map to obtain candidate lane lines, and selecting left and right lane lines that meet the screening strategy from the candidate lane lines and the default lane lines as target left and right lane lines of the current frame; wherein the default lane lines are left and right lane lines with default curve fitting coefficients;
[0021] Step S30, determining the confidence of the target left and right lane lines of the current frame;
[0022] Step S40, performing optimal variable weight regression of lane line historical data according to the curve fitting coefficients and confidences of the target left and right lane lines of the current frame and multiple frames before the current frame, and obtaining the variable weight fitting lane line fitting coefficients of the current frame;
[0023] Step S50, updating the target left lane line and the target right lane line of the current frame according to the variable weighted fitting lane line fitting coefficient of the current frame, and taking the lane between the updated target left lane line and the target right lane line as the target lane of the current frame.
[0024] The lane recognition method provided by the embodiment of the present application extracts features from the current frame of the lane image through a lane semantic segmentation model to obtain a lane semantic map; uses a lane line fitting model to perform curve fitting on the data of the lane semantic map to obtain candidate lane lines, and selects left and right lane lines that meet the screening strategy from the candidate lane lines and the default lane lines as the target left and right lane lines of the current frame; wherein the default lane lines are left and right lane lines with curve fitting coefficients of default values; determines the confidence of the target left and right lane lines of the current frame; performs optimal variable weight regression of lane line history data based on the curve fitting coefficients and confidence of the target left and right lane lines of the current frame and multiple frames before the current frame, and obtains the variable weight fitting lane line fitting coefficient of the current frame; updates the target left lane line and the target right lane line of the current frame based on the variable weight fitting lane line fitting coefficient of the current frame, and uses the lane between the updated target left lane line and the target right lane line as the target lane of the current frame. The above lane recognition method improves the accuracy and reliability of lane recognition in complex environments.
[0025] In some exemplary embodiments, the lane line fitting model includes: a quadratic curve. In other embodiments, the lane line fitting model may also be other curves.
[0026] In some exemplary embodiments, the screening strategy comprises:
[0027] If the lane semantic graph does not have a connected area, the default left lane line is used as the target left lane line of the current frame, and the default right lane line is used as the target right lane line of the current frame;
[0028] If the curve fitting coefficient of the candidate left lane line is outside the first preset threshold range, the default left lane line is used as the target left lane line of the current frame;
[0029] If the curve fitting coefficient of the candidate right lane line is outside the first preset threshold range, the default right lane line is used as the target right lane line of the current frame;
[0030] If the curve fitting coefficient of the candidate left lane line is within the first preset threshold range, and there is only one candidate left lane line, the only candidate left lane line is used as the target left lane line of the current frame;
[0031] If the curve fitting coefficient of the candidate right lane line is within the first preset threshold range, and there is only one candidate right lane line, the only candidate right lane line is used as the target right lane line of the current frame;
[0032] If the curve fitting coefficient of the candidate left lane line is within a first preset threshold range, and there are multiple candidate left lane lines, then select a candidate left lane line that is closest to the current vehicle from the multiple candidate left lane lines as the target left lane line of the current frame;
[0033] If the curve fitting coefficient of the candidate right lane line is within a first preset threshold range and there are multiple candidate right lane lines, a candidate right lane line that is closest to the current vehicle is selected from the multiple candidate right lane lines as the target right lane line of the current frame.
[0034] The curve fitting coefficient of the lane line can ensure that the shape of the lane line meets the requirements within the first preset threshold range, thereby avoiding selecting an excessively curved curve that is fitted as the target lane line.
[0035] In some exemplary embodiments, determining the confidence of the target left and right lane lines of the current frame includes:
[0036] If the target left lane line of the current frame is the default left lane line, the confidence CR_R_L(N) of the target left lane line of the current frame is set to 0, and the steering coefficient TR_L(N) of the target left lane line of the current frame is set to 0;
[0037] If the target left lane line of the current frame is a candidate left lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is less than the right threshold and greater than the left threshold, the confidence CR_R_L(N) of the target left lane line of the current frame is set to 0, and the steering coefficient TR_L(N) of the target left lane line of the current frame is set to 0;
[0038] If the target left lane line of the current frame is a candidate left lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is greater than or equal to the right threshold, the confidence CR_R_L(N) of the target left lane line of the current frame is set to 1, and the steering coefficient TR_L(N) of the target left lane line of the current frame is set to 1;
[0039] If the target left lane line of the current frame is a candidate left lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is less than or equal to the left threshold, the confidence CR_R_L(N) of the target left lane line of the current frame is set to 1, and the steering coefficient TR_L(N) of the target left lane line of the current frame is set to -1;
[0040] If the target right lane line of the current frame is the default right lane line, the confidence CR_R_R(N) of the target right lane line of the current frame is set to 0, and the steering coefficient TR_R(N) of the target right lane line of the current frame is set to 0;
[0041] If the target lane line of the current frame is a candidate right lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is less than the right threshold and greater than the left threshold, then the confidence CR_R_R(N) of the target right lane line of the current frame is set to 0, and the steering coefficient TR_R(N) of the target right lane line of the current frame is set to 0;
[0042] If the target right lane line of the current frame is a candidate right lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is greater than or equal to the right threshold, the confidence CR_R_L(N) of the target right lane line of the current frame is set to 1, and the steering coefficient TR_R(N) of the target right lane line of the current frame is set to 1;
[0043] If the target right lane line of the current frame is a candidate right lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is less than or equal to the left threshold, the confidence CR_R_L(N) of the target right lane line of the current frame is set to 1, and the steering coefficient TR_R(N) of the target right lane line of the current frame is set to -1;
[0044] Among them, a confidence value of 0 indicates that the target lane line is unreliable, and a confidence value of 1 indicates that the target lane line is credible; a steering coefficient value of 1 indicates that the lane line bends to the right, a steering coefficient value of 0 indicates that the bending direction of the lane line is uncertain, and a steering coefficient value of -1 indicates that the lane line bends to the left.
[0045] In some exemplary embodiments, optimal variable weight regression of lane line historical data is performed based on curve fitting coefficients and confidences of target left and right lane lines of a current frame and multiple frames before the current frame to obtain variable weight fitting lane line fitting coefficients of the current frame, including:
[0046] Determine the weight WH_L(i) corresponding to the curve fitting coefficient CF_L(i) of the target left lane line of the i-th frame, and calculate the weighted sum SUM_CF_L of the curve fitting coefficients of the target left lane line of N frames; determine the weight WH_R(i) corresponding to the curve fitting coefficient CF_R(i) of the target right lane line of the i-th frame, and calculate the weighted sum SUM_CF_R of the curve fitting coefficients of the target right lane line of N frames;
[0047] Calculate the cumulative confidence sum SUM_CR_L of the target left lane line in N frames and the cumulative confidence sum SUM_CR_R of the target right lane line in N frames;
[0048] If the cumulative confidence sum SUM_CR_L of the target left lane line of N frames is less than the first confidence threshold and the cumulative confidence sum SUM_CR_R of the target right lane line of N frames is greater than the second confidence threshold, the variable weighted fitting left lane line fitting coefficient of the current frame is set to the weighted sum SUM_CF_R of the curve fitting coefficient of the target right lane line of N frames;
[0049] If the cumulative confidence sum SUM_CR_R of the target right lane line of N frames is less than the first confidence threshold and the cumulative confidence sum SUM_CR_L of the target left lane line of N frames is greater than the second confidence threshold, the variable weight fitting right lane line fitting coefficient of the current frame is set to the weighted sum SUM_CF_L of the curve fitting coefficient of the target left lane line of N frames;
[0050] If the cumulative confidence sum SUM_CR_L of the target left lane line of N frames and the cumulative confidence sum SUM_CR_R of the target right lane line of N frames do not meet the first condition, the variable weighted fitting left lane line fitting coefficient of the current frame is set to the weighted sum SUM_CF_L of the curve fitting coefficients of the target left lane line of N frames, and the variable weighted fitting right lane line fitting coefficient of the current frame is set to the weighted sum SUM_CF_R of the curve fitting coefficients of the target right lane line of N frames;
[0051] The first condition is: the cumulative confidence sum SUM_CR_L of the target left lane line of N frames is less than the first confidence threshold and the cumulative confidence sum SUM_CR_R of the target right lane line of N frames is greater than the second confidence threshold, or the cumulative confidence sum SUM_CR_R of the target right lane line of N frames is less than the first confidence threshold and the cumulative confidence sum SUM_CR_L of the target left lane line of N frames is greater than the second confidence threshold;
[0052]
[0053]
[0054]
[0055]
[0056] 0≤WH_L(i)≤1; WH_L(j)≤WH_L(k);
[0057] 0≤WH_R(i)≤1; WH_R(j)≤WH_R(k);
[0058] 1≤i≤N; 1≤j≤N-1; 2≤k≤N; j<k;
[0059] Among them, CR_L(i) is the confidence of the target left lane line of the i-th frame, CR_R(i) is the confidence of the target right lane line of the i-th frame; N frames include the current frame and the N-1 frames before the current frame; the first confidence threshold is less than the second confidence threshold.
[0060] In some exemplary embodiments, when the total number of all frames before the current frame is less than the preset frame number threshold, N is the total number of all frames before the current frame plus 1; when the total number of all frames before the current frame is greater than or equal to the preset frame number threshold, N is the preset frame number threshold. For example, when the preset frame number threshold is 20 frames, if the total number of all frames before the current frame a is less than 20, then N = a + 1; if the total number of all frames before the current frame a is greater than or equal to 20, then N = 20.
[0061] In some exemplary embodiments, determining the weight WH_L(i) corresponding to the curve fitting coefficient CF_L(i) of the target left lane line of the i-th frame and the weight WH_R(i) corresponding to the curve fitting coefficient CF_R(i) of the target right lane line of the i-th frame includes:
[0062] Determine the weight WH_L(i) corresponding to the curve fitting coefficient CF_L(i) of the target left lane line of the i-th frame and the weight WH_R(i) corresponding to the curve fitting coefficient CF_R(i) of the target right lane line of the i-th frame, including:
[0063] The weight WH_L(i) corresponding to the curve fitting coefficient CF_L(i) of the target left lane line in the i-th frame is set to: WH_L(i) = i / SUM_N;
[0064] The weight WH_R(i) corresponding to the curve fitting coefficient CF_R(i) of the target right lane line in the i-th frame is set to: WH_R(i) = i / SUM_N;
[0065] in,
[0066] 1≤i≤N; N frames include the current frame and the N-1 frames before the current frame.
[0067] In other implementations, the weights corresponding to the curve fitting coefficients of the target left lane line and the target right lane line of each frame may also be determined in other ways, as long as the weights of image frames closer to the current frame are set larger.
[0068] In some exemplary embodiments, updating the target left lane line and the target right lane line of the current frame according to the variable weighted fitting lane line fitting coefficient of the current frame includes:
[0069] Update the curve fitting coefficient of the target left lane line of the current frame using the variable weight fitting left lane line fitting coefficient of the current frame;
[0070] The curve fitting coefficient of the target right lane line of the current frame is updated using the variable weight fitting right lane line fitting coefficient of the current frame.
[0071] In some exemplary embodiments, after taking the lane between the updated target left lane line and the target right lane line as the target lane of the current frame, the method further includes:
[0072] Displays the target lane for the current frame.
[0073] In some exemplary embodiments, after taking the lane between the updated target left lane line and the target right lane line as the target lane of the current frame, the method further includes:
[0074] Determine the distance between the current vehicle and the target left and right lane lines, and issue a warning prompt when the distance between the current vehicle and the target left and right lane lines is less than the distance threshold.
[0075] In some exemplary embodiments, after extracting features from the current frame of the lane image using the lane semantic segmentation model to obtain a lane semantic map, the method further includes:
[0076] Perform at least one of the following:
[0077] Conversion of camera view to bird's-eye view, binarization, dilation processing, connected area calculation and connected area filtering.
[0078] like Figure 2 As shown, an embodiment of the present disclosure provides a lane recognition device, including: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the above-mentioned lane recognition method are implemented.
[0079] An embodiment of the present disclosure provides a computer-readable storage medium storing a computer program, which implements the steps of the lane recognition method when executed by a processor.
[0080] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
Claims
1. A lane recognition method, comprising: The lane semantic segmentation model is used to extract features of the current frame of the lane image to obtain a lane semantic map; Using a lane line fitting model to perform curve fitting on the data of the lane semantic map to obtain candidate lane lines, and selecting left and right lane lines that meet the screening strategy from the candidate lane lines and the default lane lines as target left and right lane lines of the current frame; wherein the default lane lines are left and right lane lines with default curve fitting coefficients; Determine the confidence of the target left and right lane lines in the current frame; Perform optimal variable weight regression of lane line historical data based on curve fitting coefficients and confidences of target left and right lane lines in the current frame and multiple frames before the current frame to obtain variable weight fitting lane line fitting coefficients of the current frame; Update the target left lane line and the target right lane line of the current frame according to the variable weighted fitting lane line fitting coefficient of the current frame, and use the lane between the updated target left lane line and the target right lane line as the target lane of the current frame; Among them, the optimal variable weight regression of lane line historical data is performed according to the curve fitting coefficients and confidences of the target left and right lane lines of the current frame and multiple frames before the current frame to obtain the variable weight fitting lane line fitting coefficients of the current frame, including: Determine the weight WH_L(i) corresponding to the curve fitting coefficient CF_L(i) of the target left lane line of the i-th frame, and calculate the weighted sum SUM_CF_L of the curve fitting coefficients of the target left lane line of N frames; determine the weight WH_R(i) corresponding to the curve fitting coefficient CF_R(i) of the target right lane line of the i-th frame, and calculate the weighted sum SUM_CF_R of the curve fitting coefficients of the target right lane line of N frames; Calculate the cumulative confidence sum SUM_CR_L of the target left lane line in N frames and the cumulative confidence sum SUM_CR_R of the target right lane line in N frames; If the cumulative confidence sum SUM_CR_L of the target left lane line of N frames is less than the first confidence threshold and the cumulative confidence sum SUM_CR_R of the target right lane line of N frames is greater than the second confidence threshold, the variable weighted fitting left lane line fitting coefficient of the current frame is set to the weighted sum SUM_CF_R of the curve fitting coefficient of the target right lane line of N frames; If the cumulative confidence sum SUM_CR_R of the target right lane line of N frames is less than the first confidence threshold and the cumulative confidence sum SUM_CR_L of the target left lane line of N frames is greater than the second confidence threshold, the variable weight fitting right lane line fitting coefficient of the current frame is set to the weighted sum SUM_CF_L of the curve fitting coefficient of the target left lane line of N frames; If the cumulative confidence sum SUM_CR_L of the target left lane line of N frames and the cumulative confidence sum SUM_CR_R of the target right lane line of N frames do not meet the first condition, the variable weighted fitting left lane line fitting coefficient of the current frame is set to the weighted sum SUM_CF_L of the curve fitting coefficients of the target left lane line of N frames, and the variable weighted fitting right lane line fitting coefficient of the current frame is set to the weighted sum SUM_CF_R of the curve fitting coefficients of the target right lane line of N frames; The first condition is: the cumulative confidence sum SUM_CR_L of the target left lane line of N frames is less than the first confidence threshold and the cumulative confidence sum SUM_CR_R of the target right lane line of N frames is greater than the second confidence threshold, or the cumulative confidence sum SUM_CR_R of the target right lane line of N frames is less than the first confidence threshold and the cumulative confidence sum SUM_CR_L of the target left lane line of N frames is greater than the second confidence threshold; 1≤i≤N; 1≤j≤N-1; 2≤k≤N; j<k; Among them, CR_L(i) is the confidence of the target left lane line of the i-th frame, CR_R(i) is the confidence of the target right lane line of the i-th frame; N frames include the current frame and the N-1 frames before the current frame; the first confidence threshold is less than the second confidence threshold; j is the j-th frame of the lane image, and k is the k-th frame of the lane image.
2. The method according to claim 1, characterized in that: The screening strategy includes: If the lane semantic graph does not have a connected area, the default left lane line is used as the target left lane line of the current frame, and the default right lane line is used as the target right lane line of the current frame; If the curve fitting coefficient of the candidate left lane line is outside the first preset threshold range, the default left lane line is used as the target left lane line of the current frame; If the curve fitting coefficient of the candidate right lane line is outside the first preset threshold range, the default right lane line is used as the target right lane line of the current frame; If the curve fitting coefficient of the candidate left lane line is within the first preset threshold range and there is only one candidate left lane line, the only candidate left lane line is used as the target left lane line of the current frame; If the curve fitting coefficient of the candidate right lane line is within the first preset threshold range, and there is only one candidate right lane line, the only candidate right lane line is used as the target right lane line of the current frame; If the curve fitting coefficient of the candidate left lane line is within a first preset threshold range, and there are multiple candidate left lane lines, then select a candidate left lane line that is closest to the current vehicle from the multiple candidate left lane lines as the target left lane line of the current frame; If the curve fitting coefficient of the candidate right lane line is within a first preset threshold range and there are multiple candidate right lane lines, a candidate right lane line that is closest to the current vehicle is selected from the multiple candidate right lane lines as the target right lane line of the current frame.
3. The method according to claim 1 or 2, characterized in that: Determining the confidence of the target left and right lane lines of the current frame includes: If the target left lane line of the current frame is the default left lane line, the confidence CR_R_L(N) of the target left lane line of the current frame is set to 0, and the steering coefficient TR_L(N) of the target left lane line of the current frame is set to 0; If the target left lane line of the current frame is a candidate left lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is less than the right threshold and greater than the left threshold, the confidence CR_R_L(N) of the target left lane line of the current frame is set to 0, and the steering coefficient TR_L(N) of the target left lane line of the current frame is set to 0; If the target left lane line of the current frame is a candidate left lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is greater than or equal to the right threshold, the confidence CR_R_L(N) of the target left lane line of the current frame is set to 1, and the steering coefficient TR_L(N) of the target left lane line of the current frame is set to 1; If the target left lane line of the current frame is a candidate left lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is less than or equal to the left threshold, the confidence CR_R_L(N) of the target left lane line of the current frame is set to 1, and the steering coefficient TR_L(N) of the target left lane line of the current frame is set to -1; If the target right lane line of the current frame is the default right lane line, the confidence CR_R_R(N) of the target right lane line of the current frame is set to 0, and the steering coefficient TR_R(N) of the target right lane line of the current frame is set to 0; If the target lane line of the current frame is a candidate right lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is less than the right threshold and greater than the left threshold, then the confidence CR_R_R(N) of the target right lane line of the current frame is set to 0, and the steering coefficient TR_R(N) of the target right lane line of the current frame is set to 0; If the target right lane line of the current frame is a candidate right lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is greater than or equal to the right threshold, the confidence CR_R_L(N) of the target right lane line of the current frame is set to 1, and the steering coefficient TR_R(N) of the target right lane line of the current frame is set to 1; If the target right lane line of the current frame is a candidate right lane line and the cumulative sum of the steering coefficients of the N-1 frames before the current frame is less than or equal to the left threshold, the confidence CR_R_L(N) of the target right lane line of the current frame is set to 1, and the steering coefficient TR_R(N) of the target right lane line of the current frame is set to -1; Among them, a confidence value of 0 indicates that the target lane line is unreliable, and a confidence value of 1 indicates that the target lane line is credible; a steering coefficient value of 1 indicates that the lane line bends to the right, a steering coefficient value of 0 indicates that the bending direction of the lane line is uncertain, and a steering coefficient value of -1 indicates that the lane line bends to the left.
4. The method according to claim 1, characterized in that: Determine the weight WH_L(i) corresponding to the curve fitting coefficient CF_L(i) of the target left lane line of the i-th frame and the weight WH_R(i) corresponding to the curve fitting coefficient CF_R(i) of the target right lane line of the i-th frame, including: The weight WH_L(i) corresponding to the curve fitting coefficient CF_L(i) of the target left lane line in the i-th frame is set to: WH_L(i) = i / SUM_N; The weight WH_R(i) corresponding to the curve fitting coefficient CF_R(i) of the target right lane line in the i-th frame is set to: WH_R(i) = i / SUM_N; in, 1≤i≤N; N frames include the current frame and the N-1 frames before the current frame.
5. The method according to claim 1, characterized in that: The target left lane line and the target right lane line of the current frame are updated according to the variable weight fitting lane line fitting coefficient of the current frame, including: Update the curve fitting coefficient of the target left lane line of the current frame using the variable weight fitting left lane line fitting coefficient of the current frame; The curve fitting coefficient of the target right lane line of the current frame is updated using the variable weight fitting right lane line fitting coefficient of the current frame.
6. The method according to claim 1, characterized in that: After taking the lane between the updated target left lane line and the target right lane line as the target lane of the current frame, the method further includes: Displays the target lane for the current frame.
7. The method according to claim 1, characterized in that: After taking the lane between the updated target left lane line and the target right lane line as the target lane of the current frame, the method further includes: Determine the distance between the current vehicle and the target left and right lane lines, and issue a warning prompt when the distance between the current vehicle and the target left and right lane lines is less than the distance threshold.
8. A lane recognition device, comprising: A memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the lane recognition method described in any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the lane recognition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Lane detection method and device, electronic equipment and storage medium
CN110516652A
Lane line recognition method and device and electronic equipment
CN111291601A