Lane line real-time identification method and system, electronic equipment and storage medium

By extracting real-time video data features of lane lines, constructing feature vectors, and processing noise, the accuracy and cost issues of lane line recognition in complex environments in existing technologies are solved, achieving efficient lane line recognition.

CN121482736APending Publication Date: 2026-02-06CHINA FAW CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511510445.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-21
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing lane line recognition technologies suffer from problems such as incomplete scene coverage, high cost, poor real-time performance, and synchronization errors in multi-sensor fusion in complex environments.

Method used

By acquiring real-time video data within the lane, extracting lane marking area features and edge map features, constructing feature vectors, and combining geometric and inter-frame constraints, noise processing is performed to obtain reliable candidate lane line data.

Benefits of technology

It improves the accuracy and efficiency of lane line recognition in complex environments, reduces costs, reduces false alarms, and solves the problems of synchronization errors and confidence conflict decision delays in multi-sensor fusion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121482736A_ABST
    Figure CN121482736A_ABST
Patent Text Reader

Abstract

The invention discloses a lane line real-time identification method and system, electronic equipment and a storage medium, and relates to the field of automobile navigation, and the method comprises the steps: obtaining real-time video data in a lane; according to the real-time video data, lane marking area features in a lane are extracted; real-time video data in the lane are obtained again, edge extraction is carried out, and edge image features of the lane marks are obtained; constructing a feature vector according to the lane mark area feature and the edge image feature of the lane mark; obtaining candidate lane line data; according to the candidate lane line data, judging whether a constraint condition is met or not; and carrying out noise processing on the candidate lane line data to obtain the processed candidate lane line data, and simultaneously solving the problems of space-time synchronization error, confidence conflict decision delay and high-precision map dependence of multi-sensor fusion by adopting a feature vector fusion scheme instead of a laser radar scheme. Lane line marks can be identified more efficiently, and the cost of the whole vehicle is further reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of car navigation, and in particular to a real-time lane line recognition method, a real-time lane line recognition system, an electronic device, and a storage medium. Background Technology

[0002] Car navigation systems have become increasingly popular because they provide drivers with location, route selection, and navigation services. Lane detection technology in navigation systems primarily employs several methods: vision-based systems, LiDAR technology, and methods combining high-precision maps.

[0003] For example, the Chinese patent, titled "Post-training Quantization Method and Apparatus for Lane Detection Model Based on Semantic Sensitivity," application number CN120339977A, specifically discloses a method that collects unlabeled training datasets, calculates the semantic sensitivity of different semantic output heads, dynamically adjusts weight coefficients, uses the region sensitivity loss function for post-training quantization until the model converges, and converts the simulated quantization weights into fixed-point numbers.

[0004] For example, the Chinese patent, titled "A Method for Generating Simulation Data for Autonomous Driving," application number CN115719439B, discloses a method for generating drivable lanes by marking drivable lanes on road images without vehicles, obtaining drivable lanes in the world coordinate system through back projection of camera parameters, fitting road surface equations by selecting point cloud data, rendering by combining vehicle 3D models and lighting information, generating highly realistic simulation images using a style harmonization model, and marking 3D detection boxes.

[0005] Among these methods, low-cost vision solutions cannot cover complex environments, while high-precision fusion solutions are limited by real-time performance and cost-effectiveness. Specifically:

[0006] 1. The visual solution is limited by factors such as sudden changes in lighting, rain and fog interference, and wear and tear on road markings, resulting in incomplete scene coverage;

[0007] 2. Due to insufficient point cloud density and surface fitting distortion, lidar solutions require lidar with more than 16 lines, leading to a surge in costs.

[0008] 3. Multi-sensor fusion faces challenges such as spatiotemporal synchronization errors, confidence conflict decision delays, and reliance on high-precision maps. Summary of the Invention

[0009] In view of this, the purpose of the present invention is to provide a real-time lane line recognition method, a real-time lane line recognition system, an electronic device and a storage medium, which aims to solve the technical problems existing in the current lane line recognition technology in complex environments.

[0010] This invention provides the following solution:

[0011] According to one aspect of the present invention, a method for real-time lane line recognition is provided, comprising the following steps:

[0012] Acquire real-time video data within the lane;

[0013] Based on the real-time video data, extract the features of the lane marking area within the lane;

[0014] Reacquire real-time video data within the lane;

[0015] Based on the reacquired real-time video data, edge extraction is performed to obtain the edge map features of the lane markings;

[0016] Based on the lane marking region features and the lane marking edge map features, a feature vector is constructed;

[0017] Based on the feature vector, candidate lane line data is obtained;

[0018] Based on the candidate lane line data, determine whether the constraint conditions are met;

[0019] If the conditions are met, then the candidate lane line is marked as reliable;

[0020] The candidate lane line data is subjected to noise processing to obtain the processed candidate lane line data.

[0021] Furthermore, including:

[0022] The lane marking area within the lane is characterized as a dynamically defined rectangular or polygonal region obtained based on the video data;

[0023] Furthermore, including:

[0024] Obtaining the edge map of lane markings includes:

[0025] Based on the real-time video data, lane markings are segmented, region growing is performed, the lane markings are labeled, and the connected regions of the labeled lane markings are obtained.

[0026] Based on the lane marking connected region, extract the pixel at the current position, the center pixel of the region, and the pixel at a certain distance from the center pixel. Pixels;

[0027] The center pixel is at a certain distance from the center pixel. The average width of the lane marking is obtained by comparing the pixels.

[0028] Based on real-time video data, obtain the difference threshold of lane edge markings. ;

[0029] The pixel at the current position is weighted and summed for its RGB intensity, specifically:

[0030] ;

[0031] Where (x, y) are the x and y coordinates of the current position; P (Pixel Value) is the single-channel pixel intensity value, and red, green, and blue are the red, green, and blue channels, respectively;

[0032] Extracting lane markings, specifically: .

[0033] Furthermore, including:

[0034] The construction of the feature vector includes: fusing the lane marking region features within the lane with the edge map features of the lane marking to construct a feature vector with dimensions of 8-12, and normalizing each feature dimension.

[0035] Furthermore, including:

[0036] Based on the feature vectors, candidate lane line data is obtained including:

[0037] Input the feature vector into the preset filtering model to obtain the region that conforms to the feature pattern of lane lines;

[0038] Based on the regions that conform to the characteristics of lane lines, obtain the corresponding edge points;

[0039] The corresponding edge points are fitted to straight lines or curves using the least squares method to obtain candidate lane line data.

[0040] Lane line data includes: the starting coordinates, ending coordinates, fitting parameters, and confidence level of the lane line.

[0041] Furthermore, including:

[0042] The constraints include: geometric constraints, inter-frame constraints, and confidence constraints;

[0043] The geometric constraint is that the spacing between adjacent candidate lane lines is within a preset threshold range;

[0044] The inter-frame constraint is that the positional deviation between the candidate lane line in the current frame and the confirmed lane line in the previous frame does not exceed 50 pixels.

[0045] The confidence constraint is that the confidence of the candidate lane line is greater than a preset threshold.

[0046] Furthermore, including:

[0047] Noise processing of candidate lane line data includes:

[0048] Noise processing is performed on the candidate lane line data to obtain the processed candidate lane line data;

[0049] The median filtering algorithm is used to smooth the edge points of the candidate lane lines and remove isolated noise points;

[0050] Remove outlier edge points that deviate from the fitted curve to obtain a refitted lane line curve;

[0051] Based on the fitted lane line curve, output the processed candidate lane line data;

[0052] The processed candidate lane line data includes: lane line fitting parameters, real-time location, and confidence level.

[0053] According to a second aspect of the present invention, a real-time lane line recognition system is provided, comprising:

[0054] The system includes a data acquisition module, a lane marking area feature extraction module, a lane marking edge feature extraction module, a feature vector construction module, a candidate lane line data acquisition module, a constraint condition judgment module, and a candidate lane line data output module.

[0055] The data acquisition module is used to acquire real-time video data within the lane;

[0056] The lane marking area feature extraction module is used to extract lane marking area features within the lane based on the real-time video data.

[0057] The lane marking edge feature extraction module is used to reacquire real-time video data within the lane;

[0058] It is used to extract edges based on the reacquired real-time video data and obtain the edge map features of lane markings;

[0059] The feature vector construction module is used to construct feature vectors based on the lane marking region features and the edge map features of the lane markings;

[0060] The candidate lane line data acquisition module is used to acquire candidate lane line data based on the feature vector.

[0061] The constraint condition judgment module is used to determine whether the constraint conditions are met based on the candidate lane line data.

[0062] If the conditions are met, then the candidate lane line is marked as reliable;

[0063] The candidate lane line data output module is used to perform noise processing on the candidate lane line data to obtain the processed candidate lane line data.

[0064] According to three aspects of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0065] The memory stores a computer program that, when executed by a processor, causes the processor to perform steps of a real-time lane line recognition method.

[0066] According to four aspects of the present invention, a computer-readable storage medium is provided that stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a lane line real-time recognition method.

[0067] Compared with the prior art, the present invention has the following advantages:

[0068] This application overcomes the bottleneck of environmental adaptability and reduces the feature distortion of visual solutions by using a vehicle lane line recognition method.

[0069] This application overcomes the limitations of generalization in non-standard scenarios and reduces false alarms by addressing blind spots in the recognition of worn road markings, lanes with different colors, and roads without curbs.

[0070] This application replaces the lidar solution with a feature vector fusion scheme, which solves the problems of spatiotemporal synchronization error, confidence conflict decision delay and high-precision map dependence faced by multi-sensor fusion. It can more efficiently identify lane markings and further reduce the cost of the whole vehicle. Attached Figure Description

[0071] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0072] Figure 1 This is a flowchart of a real-time lane line recognition method provided by one or more embodiments of the present invention.

[0073] Figure 2 This is a structural diagram of a real-time lane line recognition system provided by one or more embodiments of the present invention.

[0074] Figure 3 This is a flowchart of a real-time lane line recognition method according to a specific embodiment of the present invention.

[0075] Figure 4 This is a schematic diagram of lane line recognition implemented using existing technical solutions.

[0076] Figure 5 This is a schematic diagram of the lane lines identified by the present invention.

[0077] Figure 6 This is a schematic diagram of the proposed mask for extracting vertical edges, including lane markings, according to the present invention.

[0078] Figure 7 This is a block diagram of an electronic device structure for a real-time lane line recognition method provided by one or more embodiments of the present invention. Detailed Implementation

[0079] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0080] Figure 1 This is a flowchart of a real-time lane line recognition method provided by one or more embodiments of the present invention.

[0081] like Figure 1 As shown, it includes the following steps:

[0082] Step S1: Obtain real-time video data within the lane;

[0083] Based on the real-time video data, extract the features of the lane marking area within the lane;

[0084] Specifically, real-time video is collected from mobile vehicles equipped with positioning devices and cameras.

[0085] An AOI (Area of ​​Interest) is used to extract information within lane markings. An AOI can be defined as a region large enough to contain various types of road lane markings.

[0086] Step S2: Reacquire real-time video data within the lane;

[0087] Based on the reacquired real-time video data, edge extraction is performed to obtain the edge map features of the lane markings.

[0088] Specifically, resampling is performed to reduce the computation time for real-time processing, and edge extraction is performed to extract the edge map of the lane markings.

[0089] Step S3: Construct a feature vector based on the lane marking region features and the lane marking edge map features;

[0090] Specifically, constructing feature vectors

[0091] Explanation: P(i) is the lane X coordinate, which is the lane center point detected on the scan line y=i; θ(i) is the lane angle, which is the tangent direction of the lane line at point P(i); S(i) is the lane intensity, which is the cumulative pixel intensity along the lane line direction.

[0092]

[0093] Q(i) is the lane X coordinate, which is the lane center point detected on the scan line y=i. P(i) and Q(i) correspond to different scan lines, and the two points are located on the same lane line.

[0094] Step S4: Obtain candidate lane line data based on the feature vector;

[0095] Step S5: Determine whether the constraint conditions are met based on the candidate lane line data;

[0096] If the conditions are met, then the candidate lane line is marked as reliable;

[0097] Specifically, potential lanes are identified by examining the distances between vectors in consecutive frames. If the distance between two vectors in consecutive frames is short enough, a potential lane is considered to have been successfully detected.

[0098] Examine the identified possible lanes to determine if they meet the constraints. If the road is flat, the task lane shape will be trapezoidal. Checking the constraints can reduce false alarms.

[0099] Step S6: Perform noise processing on the candidate lane line data to obtain the processed candidate lane line data.

[0100] Furthermore, including:

[0101] The lane marking area within the lane is characterized as a dynamically defined rectangular or polygonal region obtained based on the video data;

[0102] Furthermore, including:

[0103] Obtaining the edge map of lane markings includes:

[0104] Based on the real-time video data, lane markings are segmented, region growing is performed, the lane markings are labeled, and the connected regions of the labeled lane markings are obtained.

[0105] Based on the lane marking connected region, extract the pixel at the current position, the center pixel of the region, and the pixel at a certain distance from the center pixel. Pixels;

[0106] The center pixel is at a certain distance from the center pixel. The average width of the lane marking is obtained by comparing the pixels.

[0107] Based on real-time video data, obtain the difference threshold of lane edge markings. ;

[0108] The pixel at the current position is weighted and summed for its RGB intensity, specifically:

[0109] ;

[0110] Where (x, y) are the x and y coordinates of the current position; P (Pixel Value) is the single-channel pixel intensity value, and red, green, and blue are the red, green, and blue channels, respectively;

[0111] Extracting lane markings, specifically:

[0112] .

[0113] Furthermore, including:

[0114] The construction of the feature vector includes: fusing the lane marking region features within the lane with the edge map features of the lane marking to construct a feature vector with dimensions of 8-12, and normalizing each feature dimension.

[0115] Furthermore, including:

[0116] Based on the feature vectors, candidate lane line data is obtained including:

[0117] Input the feature vector into the preset filtering model to obtain the region that conforms to the feature pattern of lane lines;

[0118] Based on the regions that conform to the characteristics of lane lines, obtain the corresponding edge points;

[0119] The corresponding edge points are fitted to straight lines or curves using the least squares method to obtain candidate lane line data.

[0120] Lane line data includes: the starting coordinates, ending coordinates, fitting parameters, and confidence level of the lane line.

[0121] Furthermore, including:

[0122] The constraints include: geometric constraints, inter-frame constraints, and confidence constraints;

[0123] The geometric constraint is that the spacing between adjacent candidate lane lines is within a preset threshold range;

[0124] The inter-frame constraint is that the positional deviation between the candidate lane line in the current frame and the confirmed lane line in the previous frame does not exceed 50 pixels.

[0125] The confidence constraint is that the confidence of the candidate lane line is greater than a preset threshold.

[0126] Furthermore, including:

[0127] Noise processing of candidate lane line data includes:

[0128] Noise processing is performed on the candidate lane line data to obtain the processed candidate lane line data;

[0129] The median filtering algorithm is used to smooth the edge points of the candidate lane lines and remove isolated noise points;

[0130] Remove outlier edge points that deviate from the fitted curve to obtain a refitted lane line curve;

[0131] Based on the fitted lane line curve, output the processed candidate lane line data;

[0132] The processed candidate lane line data includes: lane line fitting parameters, real-time location, and confidence level.

[0133] Specifically, by adopting a feature vector fusion scheme to replace the lidar scheme, the problems of spatiotemporal synchronization error, confidence conflict decision delay and high-precision map dependence faced by multi-sensor fusion are solved at the same time. This allows for more efficient identification of lane markings and further reduces the cost of the whole vehicle.

[0134] Figure 2 This is a structural diagram of a real-time lane line recognition system provided by one or more embodiments of the present invention.

[0135] like Figure 2 As shown, it includes:

[0136] The system includes a data acquisition module, a lane marking area feature extraction module, a lane marking edge feature extraction module, a feature vector construction module, a candidate lane line data acquisition module, a constraint condition judgment module, and a candidate lane line data output module.

[0137] The data acquisition module is used to acquire real-time video data within the lane;

[0138] The lane marking area feature extraction module is used to extract lane marking area features within the lane based on the real-time video data.

[0139] The lane marking edge feature extraction module is used to reacquire real-time video data within the lane;

[0140] It is used to extract edges based on the reacquired real-time video data and obtain the edge map features of lane markings;

[0141] The feature vector construction module is used to construct feature vectors based on the lane marking region features and the edge map features of the lane markings;

[0142] The candidate lane line data acquisition module is used to acquire candidate lane line data based on the feature vector.

[0143] The constraint condition judgment module is used to determine whether the constraint conditions are met based on the candidate lane line data.

[0144] If the conditions are met, then the candidate lane line is marked as reliable;

[0145] The candidate lane line data output module is used to perform noise processing on the candidate lane line data to obtain the processed candidate lane line data.

[0146] It is worth noting that although only some basic functional modules are disclosed in this embodiment, it does not mean that the composition of this system is limited to the above-mentioned basic functional modules. On the contrary, what this embodiment intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with existing technology to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. The fact that this embodiment only discloses a few basic functional modules does not mean that the scope of protection of the claims of this invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above device is described separately according to its functions as various units and modules. Of course, in implementing this invention, the functions of each unit and module can be implemented in one or more software and / or hardware.

[0147] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0148] Figure 3 This is a flowchart of a real-time lane line recognition method according to a specific embodiment of the present invention.

[0149] like Figure 3 As shown, it includes:

[0150] Real-time video is captured from mobile vehicles equipped with positioning devices and cameras.

[0151] An AOI (Area of ​​Interest) is used to extract information within lane markings. An AOI can be defined as a region large enough to contain various types of road lane markings.

[0152] Resampling is performed to reduce the computation time for real-time processing.

[0153] Perform edge extraction to extract the edge map of the lane markings.

[0154] Lane markings are segmented from the road image, region growing is performed, and the lane markings are labeled. Figure 6 Proposed mask for extracting vertical edges, including lane markings.

[0155] The center pixel is compared with pixels at a distance (D) from the center pixel, which is the average width of the lane marking.

[0156] The difference threshold τ for extracting lane edge markers was calculated and calibrated experimentally. Road images under different lighting conditions were collected, and τ=40 was used to process various lighting conditions.

[0157] The pixel at the current coordinate is summed by weighted RGB intensity.

[0158]

[0159] Note that (x, y) are the horizontal and vertical coordinates of the current position; P (Pixel Value) is the single-channel pixel intensity value, and red, green, and blue are the red, green, and blue channels, respectively.

[0160] Extract lane markings.

[0161]

[0162] V. Constructing Feature Vectors

[0163] Explanation: P(i) is the lane X coordinate, which is the lane center point detected on the scan line y=i; θ(i) is the lane angle, which is the tangent direction of the lane line at point P(i); S(i) is the lane intensity, which is the cumulative pixel intensity along the lane line direction.

[0164]

[0165] Q(i) is the lane X coordinate, which is the lane center point detected on the scan line y=i. P(i) and Q(i) correspond to different scan lines, and the two points are located on the same lane line.

[0166] VI. Candidate Lane Detection: Possible lanes are obtained by checking the distance between vectors in consecutive frames. If the distance between two vectors in consecutive frames is short enough, a possible lane is considered to have been successfully detected. The specific implementation process can be found in the following code (C language).

[0167] typedef struct {

[0168] float pos_x; / / Normalized position [0,1]

[0169] float angle; / / Normalized angle [-1, 1]

[0170] float strength; / / Normalized strength [0,1]

[0171] FeatureVec;

[0172] uint8_t is_candidate(FeatureVec current, FeatureVec prev, floatspeed) {

[0173] / / Calculate dynamic threshold

[0174] float tau = BASE_TAU * (1.0 + SPEED_COEF * fabs(speed));

[0175] / / Calculate distance components

[0176] float dist_pos = fabs(current.pos_x - prev.pos_x);

[0177] float dist_angle = min_angle_diff(current.angle, prev.angle);

[0178] float dist_str = fabs(current.strength - prev.strength);

[0179] / / Weighted distance

[0180] float total_dist = POS_WEIGHT * dist_pos +

[0181] ANGLE_WEIGHT * dist_angle +

[0182] STR_WEIGHT * dist_str;

[0183] return (total_dist < tau) ? 1 : 0;

[0184] }

[0185] illustrate:

[0186] FeatureVec structure:

[0187] It includes three features of the lane line: normalized position pos_x, normalized angle angle, and normalized strength.

[0188] The is_candidate function:

[0189] The input parameters include the current frame feature vector (current), the previous frame feature vector (prev), and the vehicle speed (speed).

[0190] Calculate the dynamic threshold tau and adjust the matching strictness according to vehicle speed.

[0191] Calculate the differences in position, angle, and intensity, respectively: dist_pos, dist_angle, and dist_str.

[0192] The differences are weighted and summed to obtain the total distance total_dist.

[0193] If the total distance is less than the dynamic threshold tau, return 1 (match), otherwise return 0 (no match).

[0194] 7. Inspect the obtained possible lanes to determine if they meet the constraints. If the road is flat, the task lane shape will be trapezoidal. Checking the constraints can reduce false alarms. The specific implementation process can be found in the following code (C language).

[0195] typedef struct {

[0196] Point2D top_left;

[0197] Point2D top_right;

[0198] Point2D bottom_left;

[0199] Point2D bottom_right;

[0200] Trapezoid;

[0201] uint8_t validate_trapezoid(Trapezoid t) {

[0202] / / Quick Width Check

[0203] float top_w = t.top_right.x - t.top_left.x;

[0204] float bot_w = t.bottom_right.x - t.bottom_left.x;

[0205] if (bot_w < top_w * MIN_RATIO) return 0;

[0206] / / Approximate angle check

[0207] float left_slope = (t.bottom_left.y - t.top_left.y) / (t.bottom_left.x - t.top_left.x);

[0208] float right_slope = (t.bottom_right.y - t.top_right.y) / (t.bottom_right.x - t.top_right.x);

[0209] if (fabs(left_slope - right_slope) > MAX_SLOPE_DIFF) return 0;

[0210] return 1;

[0211] }

[0212] Note: This code defines a structure `Trapezoid` to represent a trapezoid and implements a function `validate_trapezoid` to verify the validity of the trapezoid. The function determines the validity of the trapezoid through the following two main checks:

[0213] Quick width check:

[0214] Ensure that the bottom width bot_w of the trapezoid is not less than MIN_RATIO times the top width top_w.

[0215] This check is used to avoid situations where the bottom of the trapezoid is too narrow.

[0216] Approximate angle check:

[0217] Calculate the slopes of the left and right sides of the trapezoid, left_slope and right_slope, and check if their difference is within the allowable range (MAX_SLOPE_DIFF).

[0218] This check is used to ensure that the angle difference between the left and right sides of the trapezoid is small, conforming to the basic geometry of a trapezoid.

[0219] 8. Implement an averaging filter to reduce various noises caused by other vehicles on the road, road surface damage, or intersections. The specific implementation process can be found in the following code (Python language).

[0220] def handle_occlusion(frame_data, prev_lanes):

[0221] if detect_vehicle(frame_data):

[0222] # Fill using historical data

[0223] current_lane = weighted_average(prev_lanes[-3:], weights=[0.1,0.3,0.6])

[0224] current_lane.confidence *= 0.7

[0225] else:

[0226] current_lane = detect_lane(frame_data)

[0227] return current_lane

[0228] illustrate:

[0229] detect_vehicle(frame_data): Used to detect whether there are vehicles or other obstacles obstructing the lane lines in the current frame.

[0230] weighted_average(prev_lanes[-3:], weights=[0.1,0.3,0.6]): When occlusion is detected, the weighted average of the lane line data of the most recent three frames is used to fill in the occluded part of the current frame.

[0231] current_lane.confidence *= 0.7: Reduces the confidence of the current lane line, reflecting the uncertainty of its detection results.

[0232] detect_lane(frame_data): Detects lane lines directly in the current frame when there are no obstructions.

[0233] return current_lane: Returns the processed lane line data for later use.

[0234] Figure 7 This is a block diagram of an electronic device structure for a real-time lane line recognition method provided by one or more embodiments of the present invention.

[0235] like Figure 7 As shown, this application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0236] The memory stores a computer program that, when executed by a processor, causes the processor to perform the steps of a real-time lane line recognition method.

[0237] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a lane line real-time recognition method.

[0238] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0239] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0240] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for real-time lane line recognition, characterized in that, The steps include: acquiring real-time video data within the lane; Based on the real-time video data, extract the features of the lane marking area within the lane; Reacquire real-time video data within the lane; Based on the reacquired real-time video data, edge extraction is performed to obtain the edge map features of the lane markings; Based on the lane marking region features and the lane marking edge map features, a feature vector is constructed; Based on the feature vector, candidate lane line data is obtained; Based on the candidate lane line data, determine whether the constraint conditions are met; If the conditions are met, then the candidate lane line is marked as reliable; The candidate lane line data is subjected to noise processing to obtain the processed candidate lane line data.

2. The real-time lane line recognition method according to claim 1, characterized in that, The lane marking area within the lane is characterized as a dynamically defined rectangular or polygonal region obtained based on the video data.

3. The real-time lane line recognition method according to claim 1, characterized in that, The acquisition of the lane marking edge map includes: Based on the real-time video data, lane markings are segmented, region growing is performed, the lane markings are labeled, and the connected regions of the labeled lane markings are obtained. Based on the lane marking connected region, extract the pixel at the current position, the center pixel of the region, and the pixel at a certain distance from the center pixel. Pixels; The center pixel is at a certain distance from the center pixel. The average width of the lane marking is obtained by comparing the pixels. Based on real-time video data, obtain the difference threshold of lane edge markings. ; The pixel at the current position is weighted and summed for its RGB intensity, specifically: ; Where (x, y) are the x and y coordinates of the current position; P (Pixel Value) is the single-channel pixel intensity value, and red, green, and blue are the red, green, and blue channels, respectively; Extracting lane markings, specifically: 。 4. The real-time lane line recognition method according to claim 1, characterized in that, The construction of the feature vector includes: fusing the lane marking region features within the lane with the edge map features of the lane marking to construct a feature vector with dimensions of 8-12, and normalizing each feature dimension.

5. The real-time lane line recognition method according to claim 1, characterized in that, The step of obtaining candidate lane line data based on the feature vector includes: The feature vector is input into a preset filtering model to obtain regions that conform to the lane line feature patterns; Based on the regions that conform to the lane line feature patterns, obtain the corresponding edge points; The corresponding edge points are fitted to straight lines or curves using the least squares method to obtain candidate lane line data. The lane line data includes: the starting coordinates, ending coordinates, fitting parameters, and confidence level of the lane line.

6. The real-time lane line recognition method according to claim 1, characterized in that, The constraints include: geometric constraints, inter-frame constraints, and confidence constraints. The geometric constraint is that the spacing between adjacent candidate lane lines is within a preset threshold range; The inter-frame constraint is that the positional deviation between the candidate lane line in the current frame and the confirmed lane line in the previous frame does not exceed 50 pixels. The confidence constraint is that the confidence of the candidate lane line is greater than a preset threshold.

7. The real-time lane line recognition method according to claim 1, characterized in that, The noise processing of the candidate lane line data includes: The candidate lane line data is subjected to noise processing to obtain the processed candidate lane line data; The median filtering algorithm is used to smooth the edge points of the candidate lane lines and remove isolated noise points; Remove outlier edge points that deviate from the fitted curve to obtain a refitted lane line curve; Based on the fitted lane line curve, output the processed candidate lane line data; The processed candidate lane line data includes: lane line fitting parameters, real-time location, and confidence level.

8. A real-time lane line recognition system, characterized in that, include: The system includes a data acquisition module, a lane marking area feature extraction module, a lane marking edge feature extraction module, a feature vector construction module, a candidate lane line data acquisition module, a constraint condition judgment module, and a candidate lane line data output module. The data acquisition module is used to acquire real-time video data within the lane; The lane marking area feature extraction module is used to extract lane marking area features within the lane based on the real-time video data. The lane marking edge feature extraction module is used to reacquire real-time video data within the lane; It is used to extract edges based on the reacquired real-time video data and obtain the edge map features of lane markings; The feature vector construction module is used to construct feature vectors based on the lane marking region features and the edge map features of the lane markings; The candidate lane line data acquisition module is used to acquire candidate lane line data based on the feature vector. The constraint condition judgment module is used to determine whether the constraint conditions are met based on the candidate lane line data. If the conditions are met, then the candidate lane line is marked as reliable; The candidate lane line data output module is used to perform noise processing on the candidate lane line data to obtain the processed candidate lane line data.

9. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the lane line real-time recognition method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a lane line real-time recognition method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • A method for generating autonomous driving simulation data

    CN115719439B

  • Lane detection model post-training quantification method and device based on semantic sensitivity

    CN120339977A