Road offset distance measurement and verification method and system for lane departure early warning system, and storage medium
By using digital scale and real-time video stream overlay technology in the LDW system, synchronous comparison between the internal perception results of the ADAS system and the external real physical world is achieved. This solves the problem of data stream synchronization and problem localization in real-world scenarios in existing technologies, and improves the efficiency of algorithm debugging and optimization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-13
AI Technical Summary
Existing LDW system testing and verification methods cannot provide continuous and visualized data streams in real-world scenarios, making it difficult to synchronize external reference measurements with internal perception results for comparison. This leads to difficulties in algorithm performance evaluation and iterative optimization, especially in reproducing and analyzing edge-related sporadic problems.
By installing auxiliary cameras to collect images of the calibration board, a mapping between the image coordinate system and the physical coordinate system is established to generate a digital scale, which is then overlaid with real-time road video streams. Data from the ADAS system is received in real time for synchronous comparison and display, and the data is recorded and stored to support offline analysis.
It enables intuitive, real-time visualization comparison between algorithm perception results and actual values, quickly locates problems, improves the efficiency of algorithm debugging and optimization, solves the problem of reproducing and analyzing boundary sporadic problems, and provides a foundation for data-driven in-depth verification.
Smart Images

Figure CN121661863A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of advanced driver assistance systems (ADAS), and in particular to a method, system, and storage medium for measuring and verifying road deviation distance in a lane departure warning (LDW) system. Background Technology
[0002] With the development of ADAS technology, LDW (Driver Warning) systems have become a key function in ensuring driving safety. Their reliability and accuracy depend on extensive testing in real-world road scenarios and iterative algorithm optimization.
[0003] In the existing technology, the main methods for testing and verifying LDW systems include: Laser measurement method: This method uses high-precision laser equipment to measure the relative position of vehicles and lane lines in specific scenarios. While it can provide accurate data, it is limited by fixed scenarios and cannot fully cover real and changing road environments. Furthermore, the equipment is expensive and complex to deploy.
[0004] RTK differential positioning method: This method uses a high-precision satellite positioning system to calibrate vehicle trajectory and lane line positions. While it performs well in test field trials, it is heavily dependent on the environment, has limited test scenario coverage, consumes significant manpower and resources, and has a long testing cycle, making it unsuitable for algorithm performance evaluation and iterative optimization.
[0005] Functional self-checking method: As disclosed in Chinese patent CN112365742A, when the LDW system triggers a warning, it calculates the actual distance between the vehicle and the lane line using camera images and compares it with the system's preset warning distance to determine whether the warning function is abnormal. This method focuses on diagnosing the correctness of a single warning event and is a type of online self-checking mechanism.
[0006] Furthermore, existing technologies share the following common drawbacks: It is impossible to provide a continuous, visualized data stream that corresponds one-to-one with the real scenario during the LDW system development phase, so that engineers can observe the algorithm decision-making process in real time and quickly locate the root cause of the problem.
[0007] The lack of a mechanism to synchronize and intuitively compare the internal perception results of the ADAS system with the reference measurement values of the external real scene is not conducive to the comprehensive evaluation and iterative optimization of algorithm performance.
[0008] For occasional boundary issues that occur on the road (such as false alarms or missed alarms under specific conditions), existing methods are unable to effectively record and reconstruct the complete context (including video, internal system data, and precise physical distance) when the problem occurs, making it difficult to reproduce and resolve the problem.
[0009] Therefore, there is a need in this field for a low-cost, easy-to-operate end-to-end solution that can serve the development and deep verification of LDW algorithms. Summary of the Invention
[0010] The purpose of this invention is to overcome the aforementioned deficiencies of the prior art and provide a method, system, and storage medium that can not only measure road offset distance in real time but also serve the entire process of LDW algorithm development, debugging, and verification. Its core is to achieve visualized restoration of the real scene and transparent comparison of the algorithm's internal state through video scale overlay and multi-source data synchronization technology, thereby quickly locating algorithm problems and accelerating algorithm iteration.
[0011] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for measuring and verifying road deviation distance for a lane departure warning system, comprising the following steps: Images of the calibration board are captured by an auxiliary camera installed on the vehicle, and a mapping relationship between the image coordinate system and the world physical coordinate system is established based on the images to generate a digital scale. The real-time road video stream captured by the auxiliary camera is superimposed on the digital scale to generate and display a composite video stream embedded with the digital scale in real time. The scale of the digital scale corresponds to the actual physical distance. It receives lane departure warning signals and lane line perception data output by the ADAS system in real time, and synchronously compares and displays the lane line perception data with the physical distance measurement data obtained based on the digital scale; The lane line perception data and warning signals output by the ADAS system are recorded and stored synchronously along with the synthesized video stream; The stored synthetic video stream and synchronously recorded ADAS system data are played back to perform a retrospective analysis of the road scene and system status at the time the LDW alarm was triggered.
[0012] Secondly, the present invention provides a road deviation distance measurement and verification system for a lane departure warning system, used to implement the above method, including: The calibration module is used to acquire images of the calibration board through an auxiliary camera installed on the vehicle, and to establish a mapping relationship between the image coordinate system and the world physical coordinate system based on the images to generate a digital scale. The video synthesis and display module is used to overlay the real-time road video stream captured by the auxiliary camera with the digital scale to generate and display the synthesized video stream embedded with the digital scale in real time. The data receiving and comparison module is used to receive lane departure warning signals and lane line perception data output by the ADAS system in real time, and synchronously compare and display the lane line perception data with the physical distance measurement data obtained based on the digital scale. The data recording module is used to synchronously record and store the lane line perception data and warning signals output by the ADAS system and the synthetic video stream; The data playback and analysis module is used to play back the stored synthetic video stream and synchronously recorded ADAS system data to review and analyze the road scene and system status at the time of LDW alarm triggering.
[0013] Thirdly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect.
[0014] Compared with the prior art, the present invention has at least the following beneficial effects: This invention generates a synthetic video stream by overlaying a digital scale with a real-time road video stream and synchronously comparing it with ADAS lane line perception data. This provides an intuitive and real-time visual association between the internal perception world of the ADAS system and the external real physical world, making the algorithm transparent. It allows direct observation of the difference between the algorithm's perception results and the actual values in any real road scenario, thereby achieving rapid and accurate localization of LDW algorithm problems and greatly improving the efficiency of algorithm debugging and optimization.
[0015] By synchronously recording and storing synthetic video streams and structured lane line perception data, and supporting offline playback and analysis, a complete data closed loop is constructed. It allows for precise replay of any LDW alarm trigger moment or scene of interest, particularly solving the industry challenge of reproducing and analyzing boundary-based, sporadic problems. The complete context in which the problem occurred can be repeatedly examined, providing a solid foundation for data-driven in-depth algorithm verification and iterative optimization.
[0016] By defining and recording a structured .info file format that includes lane line cubic curve coefficients, type, and quality, not only are the results recorded, but also the key perception states within the algorithm are documented. This concretizes abstract algorithm performance into quantifiable and analyzable data. During analysis, parameters such as lane line quality and type can be combined to achieve in-depth root cause analysis, from whether an anomaly occurred to why it occurred, guiding targeted performance improvements to the algorithm. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the system architecture and data flow in an embodiment of the present invention; Figure 2 This is a flowchart of the road deviation distance measurement and verification method for a lane departure warning system according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the camera installation position in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the measurement of the reference distance d0 and the alarm distance d_measure in an embodiment of the present invention; Figure 5 This is a schematic diagram of the lane line mathematical model parameters in an embodiment of the present invention. Detailed Implementation
[0019] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0020] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] This invention provides a method, system, and storage medium for measuring and verifying road deviation distance in a lane departure warning system.
[0022] First, refer to Figure 1 A hardware system for implementing this invention is constructed. This system mainly consists of three parts: Auxiliary camera module: Employs two USB cameras, for example, such as Figure 3As shown, the camera model can be a Logitech C270, which should be securely mounted below the left and right exterior rearview mirrors of the vehicle. During installation, the angle needs to be precisely adjusted to ensure that the USB camera's field of view covers the vehicle wheels and the adjacent lane line area used to measure the lateral offset distance between the vehicle and the lane lines. The auxiliary camera module is responsible for acquiring real-time video streams of the actual road scene and inputting them to the data processing and display module.
[0023] ADAS system module: This includes the ADAS camera and processing unit, i.e., the original or developed LDW system of the vehicle under test. This module communicates with the data processing and display module via the vehicle's CAN bus, sending the lane line perception data and lane departure warning signals obtained from its internal perception and calculation to the data processing and display module in real time.
[0024] Data processing and display module (PC host computer): This can be an in-vehicle laptop computer used to run the software corresponding to the steps described in the embodiments of the present invention. The computer needs to be equipped with sufficient USB ports and CAN bus interfaces (e.g., using a PCAN-USB adapter). This module integrates the various functional modules that implement the methods described in the embodiments of the present invention.
[0025] In the system of the present invention, the above-mentioned hardware resources are configured by software to work together to realize the various functional modules of the road deviation distance measurement and verification system for lane departure warning system described in the embodiments of the present invention.
[0026] Next, the steps of the road deviation distance measurement and verification method for a lane departure warning system described in the embodiments of the present invention will be explained in detail through the above system. Figure 2 As shown, the method mainly includes the following steps.
[0027] S101: System Calibration This step is completed by the calibration function in the software, and its purpose is to generate a benchmark—a digital scale—for all subsequent measurements. Specifically, it includes: Acquiring calibration images: Images of the calibration board are acquired using an auxiliary camera mounted on the vehicle. Specifically, the software's calibration mode is activated, and a checkerboard calibration board with sides of 50mm is placed horizontally on the ground approximately 1 meter in front of the auxiliary camera. The control software then uses the USB camera to acquire approximately 15-20 clear images of the calibration board from multiple angles and positions.
[0028] Establishing a mapping relationship and generating a digital scale: Based on the image, a mapping relationship between the image coordinate system and the world physical coordinate system is established to generate a digital scale. In a preferred embodiment, the intrinsic parameters and distortion coefficients of the auxiliary camera are obtained using the Zhang Zhengyou calibration method, and a mapping relationship between image pixels and ground physical coordinates is established through perspective transformation to generate the digital scale. Specifically, the software calls the OpenCV library and uses the Zhang Zhengyou calibration method to process these images. The algorithm automatically detects checkerboard corner points and calculates the intrinsic parameter matrix and distortion coefficients of the auxiliary camera by minimizing reprojection error. Subsequently, for the ground area directly below the vehicle, the homography matrix between the image pixel coordinate system and the ground physical coordinate system (in meters) is solved through perspective transformation. This precise mathematical mapping relationship is the core of the digital scale. To facilitate user use, the software visualizes this relationship by drawing an overlay graphic with actual physical distances (e.g., one main scale every 10cm) on the video screen. This graphic is the digital scale visible to the user. All calibration parameters are serialized and saved to the hard drive for subsequent process calls.
[0029] S102: Real-time Synthesis and Display This step overlays the real-time road video stream captured by the auxiliary camera with the digital scale to generate and display a composite video stream embedded with the digital scale in real time, thereby achieving a visual fusion of the real road scene and the precise measurement tool. Specifically, this includes: Video stream overlay: In real-time testing, the software continuously acquires the raw video stream from the USB camera. Using the intrinsic parameters, distortion coefficients, and homography matrix saved in step S101, distortion correction is performed on each frame of the image, and the precise pixel position of the graphic elements of the digital scale in the current frame is calculated based on the homography matrix.
[0030] Generation and Display of Composite Video: Subsequently, using graphics drawing functions, the calculated scale lines, scale values, and other digital scale elements are superimposed onto the corrected video frames in real time. This process generates a composite video stream embedded with the digital scale. This composite video stream is displayed in real time in a designated area of the host computer software interface. Any scale value seen by the user in this video strictly corresponds to a physical distance in the real world, realizing that the scale of the digital scale corresponds to the actual physical distance. As a preferred implementation, the host computer software interface is divided into three core functional areas on the same screen to achieve efficient synchronous comparison and analysis: Video display area: This area displays the synthetic video stream with the embedded digital scale. The video stream clearly shows the vehicle wheels, lane lines, and the digital scale lines with physical graduations (e.g., units of meters) superimposed on them, allowing the user or algorithm to directly read the real-time distance d_measure between the vehicle and the lane lines.
[0031] ADAS Data Curve Area: This area plots and displays the lane line perception data received from the CAN bus in the form of a real-time curve, such as the waveform of key parameters like lane line lateral distance and lateral deviation speed calculated internally by the system as a function of time.
[0032] Comparison and Log Area: This area displays and calculates the differences between the lateral distance within the ADAS system shown in the ADAS data curve area and the d_measure obtained from the video display area in real time, using numerical values, lists, or parallel curves. Simultaneously, this area also displays the system's status log in real time, such as the trigger time of the LDW alarm signal.
[0033] Through the above-mentioned layout of multiple regions on the same screen, the embodiments of the present invention realize the integrated and visualized synchronous comparison of external real measurement, internal algorithm perception and decision state, providing engineers with a perspective for analyzing algorithm problems.
[0034] S103: Multi-source data synchronization comparison This step receives lane departure warning signals and lane line perception data output by the ADAS system in real time, and synchronously compares and displays the lane line perception data with physical distance measurement data obtained based on the digital scale. This enables real-time, on-screen comparison between the internal perception results of the ADAS system and external real-world measurements. Specifically, it includes: Data reception: The software receives and parses data packets from the ADAS system module in real time through an independent CAN listening thread. Based on a predefined database (DBC file), it parses the lane departure warning signal (LDW_Alert_Status, Boolean) and lane line perception data. The lane line perception data includes at least: the lane line lateral distance (Lateral_Offset), lateral deviation speed (Lateral_Offset_Speed), lane line type (Lane_Line_Type, such as solid line, dashed line), and lane line curvature parameters (C0, C1, C2, C3) calculated internally by the system.
[0035] Obtaining physical distance measurement data: This invention supports two parallel physical distance measurement methods, specifically: Manual interpretation: Testers directly observe the real-time synthesized video and read the scale value corresponding to the outer edge of the wheel on the digital scale. This reading is the physical distance measurement data d_measure. This method is fast and intuitive, and suitable for the initial stage of algorithm debugging.
[0036] Automated Measurement: The software integrates a lightweight image recognition algorithm to automatically locate the wheel edges and lane lines in video frames. Then, using the homography matrix mapping model behind the digital scale, the pixel coordinate difference between the two in the image is converted into the actual physical distance d_measure in real time. This method is highly accurate, automated, and suitable for quantitative testing. For example, the image recognition algorithm is based on Canny edge detection and Hough transform; however, this is only a preferred implementation, and the invention is not limited thereto.
[0037] Synchronous comparison display: The software maintains a unified, high-precision timeline. Data from the CAN bus is strictly time-aligned (synchronized) with video frames from the camera (and their corresponding automatic measurement data). Subsequently, in the host computer interface, the lane line lateral distance curve calculated by the ADAS system itself is plotted on the same time axis and compared in real time with the d_measure curve obtained in the above manner, allowing for rapid identification of differences.
[0038] The synchronous comparison described in this embodiment of the invention analyzes the consistency between the internal perception results of the ADAS system and the real-world measurement values. The resulting comparison results are mainly used for analysis at two levels: Real-time Algorithm Problem Diagnosis: During real-time testing, the direct representation of the comparison results is the difference value. For example, the software interface displays the difference curve between "ADAS lateral distance" and "ruler measurement distance" in real time in the comparison area. When this difference consistently and significantly deviates from zero under specific scenarios (such as clear lane lines and good weather), it indicates a systematic bias or calibration error in the ADAS system's perception algorithm. This problem can be detected immediately without waiting for the LDW system itself to issue an alert.
[0039] Warning Decision Logic Verification: Comparison results can verify whether the decision logic for generating warning signals in the ADAS system is correct. The warning logic of the LDW system is usually as follows: if the lateral distance of the lane lines calculated internally is less than a certain preset threshold, a lane departure warning signal is triggered.
[0040] In an embodiment of the present invention, the true physical distance d_measure is obtained through a digital ruler. When the ADAS system triggers an alarm, we check the d_measure at this time; if the d_measure is also less than the preset reference distance or safety distance threshold d0, it indicates that this alarm is reasonable. If the d_measure is significantly greater than d0, and the ADAS system triggers an alarm due to its own perception distance deviation, it indicates that this alarm is a "false alarm", and the root cause of the problem lies in the accuracy of the perception module. On the contrary, if the vehicle has significantly deviated (d_measure < d0), but the ADAS system does not alarm, it indicates that a "missed alarm" has occurred, and the problem may be improper setting of the decision threshold or the perception module failing to correctly output the result.
[0041] Therefore, the comparison result in the embodiment of the present invention is not just a simple comparison of two data, but a key basis for qualitatively judging whether there are faults in the two links of perception and decision-making of the ADAS system and locating the root cause of the faults. Through this qualitative analysis process, the algorithm problem can be quickly located.
[0042] S104: Data recording In this step, the lane line perception data, warning signal, and the synthesized video stream output by the ADAS system are synchronously recorded and stored, laying a data foundation for subsequent offline in-depth analysis and ensuring that any accidental problems can be traced. Specifically, it includes: The data recording module encapsulates and persistently stores the multiplexed data that has been time-synchronized from step S103. And simultaneously records the synthesized video stream from step S102 (usually compressed into an.mp4 file using an H.264 encoder). And the lane line perception data and warning signal output by the ADAS system from step S103.
[0043] The data output by the ADAS system is written into a structured.info text file. The format of this file is clearly defined and includes but is not limited to the following fields: timestamp, LDW_Alert_Status (lane departure warning signal), Lateral_Offset_Speed, Lane_Line_Type (using an enumeration type, such as: LDW_LINE_SOLID = 1), Lane_Line_Quality (lane line quality), Lane_Line_Color (lane line color), and the most critical cubic curve coefficients C0, C1, C2, C3 of the lane line. The video file and the.info file are associated through a unified timestamp, forming a complete and traceable test data set.
[0044] Specifically, Lane_Line_Type can be defined as follows: LDW_LINE_SOLID = 1 indicates a solid lane line; LDW_LINE_DASHED = 2 indicates a dashed lane line; LDW_LINE_DOUBLE_YELLOW = 4 indicates a double lane line. Lane line quality can be categorized into high, medium, and low. Lane line color can be white, yellow, or blue.
[0045] This .info text file records the complete mathematical model of lane lines by the ADAS system, the core of which is the cubic curve parameters of the lane lines. For example... Figure 5 As shown, the lane line model is defined by the following equations: X = C0 + C1*Y + C2*Y² + C3*Y³ Where Y represents the forward distance of the lane line from the vehicle, and X represents the lateral offset of the lane line from the vehicle. The specific physical meanings of each coefficient (C0, C1, C2, C3) are as follows: C0 (intercept): Represents the lateral offset distance between the vehicle and the lane boundary at the position Y=0 (usually in front of the vehicle's front bumper). This is the most direct parameter for assessing the vehicle's current position relative to the lane lines.
[0046] C1 (linear coefficient): represents the tangent slope of the lane line. The heading angle of the vehicle relative to the lane line can be calculated using arctan(C1), which is crucial for determining whether the vehicle is traveling parallel to the lane or beginning to deviate.
[0047] C2 (quadratic coefficient): Directly related to the curvature of the lane lines. Curvature Curvature ≈ 2 * C2, and its reciprocal is the radius of curvature. This parameter directly reflects whether the road is straight or curved, and the degree of curvature of the curve, and is a key input for LDW system decision-making.
[0048] C3 (cubic coefficient): Represents the rate of change of lane curvature, i.e., Curvature'rate ≈ 6 * C3. This parameter describes whether the road is gradually curving or straightening, and is of great value for predicting future vehicle trajectories and making more advanced early warning judgments.
[0049] Recording these complete parameters, rather than just a final distance result, enables in-depth analysis.
[0050] S105: Offline Playback and Analysis This step involves replaying the stored synthetic video stream and synchronously recorded ADAS system data to conduct a post-mortem analysis of the road scene and system status at the moment the LDW alarm was triggered, in order to achieve in-depth diagnosis and precise localization of algorithm problems.
[0051] Specifically, after the test, the user can use the software's playback function to load the composite video file and corresponding .info file of any test record.
[0052] By dragging the progress bar on the interface, you can precisely jump to any LDW alarm trigger moment.
[0053] On the playback screen, users can simultaneously observe: the real road scene at that time (video with ruler); and the complete internal status of the ADAS system (all lane line perception data read from and displayed from the .info file).
[0054] Retrospective analysis: such as Figure 4 As shown, users can calculate the actual offset distance d using the formula d = d_measure - d0, where d0 is a preset safe distance threshold or baseline distance, and d_measure is the distance from the outer edge of the wheel to the lane line measured by a digital scale at the time of the alarm. Simultaneously, the measured value d_measure (physical distance) based on the digital scale can be compared with the lateral distance of the lane line calculated by the ADAS system itself. Combined with parameters such as Lane_Line_Quality and Lane_Line_Type from the .info file, a deep analysis of the lane departure warning algorithm's problems and performance can be performed. For example, it was found that when the lane line quality was marked as "low," the distance calculated internally by the ADAS deviated significantly from the true value on the scale, leading to a false alarm. This method accurately identified the algorithm problem and clarified that the optimization direction is to improve the robustness of the perception module in low-quality lane line scenarios.
[0055] To ensure the accuracy of the measurement results, the baseline distance d0 must be calibrated before starting the road test. For specific methods, please refer to [link to relevant documentation]. Figure 4 As shown: Park the vehicle within the lane with the outer edge of the left wheel aligned with the left lane line. At this point, the vehicle's lateral deviation relative to the left lane line is zero. Using a measuring tool (such as a tape measure) or the aforementioned digital ruler system, accurately measure the distance from the outer edge of the right wheel to the right lane line. This distance is the reference distance d0. The figure also shows the distance measurement d_measure for the first lane departure warning frame.
[0056] In subsequent tests, regardless of how the vehicle moves, its actual offset distance d can be calculated using the formula d = d_measure - d0, where d_measure is the real-time distance from the outer edge of the right wheel to the right lane line measured by the digital ruler at the time of the alarm.
[0057] This method clearly defines the measurement benchmark, ensuring data consistency and reliability throughout the measurement and verification process.
[0058] Based on the above detailed description of the method steps, this embodiment of the invention provides a road deviation distance measurement and verification system for a lane departure warning system, used to achieve the functions of the above method. Figure 1 As shown, the system specifically includes: Calibration Module: This module controls the auxiliary camera installed on the vehicle to acquire images of the calibration board, and drives the OpenCV library to execute Zhang Zhengyou calibration method and perspective transformation calculation. Finally, it completes the accurate calculation of camera parameters and the establishment and storage of the mathematical model of the digital scale. It also completes the mapping relationship between the image coordinate system and the world physical coordinate system based on the image, and generates the digital scale.
[0059] Video Synthesis and Display Module: This module overlays the real-time road video stream captured by the auxiliary camera with the digital scale to generate and display a composite video stream embedded with the digital scale in real time. Specifically, this module is responsible for acquiring the original frames from the camera in real time, calling the parameters generated by the calibration module to perform image distortion correction and digital scale graphic rendering, and finally outputting the composite video stream to the display interface. The host computer software interface of this module is configured to display three areas simultaneously: the real-time composite video area with the digital scale overlaid, the ADAS system data curve area, and the data comparison and system log area.
[0060] Data Reception and Comparison Module: This module receives lane departure warning signals and lane line perception data output by the ADAS system in real time via the CAN bus, and synchronously compares and displays the lane line perception data with the physical distance measurement data obtained based on the digital scale. Specifically, this module consists of a CAN listening thread and a data processing unit. The listening thread is responsible for receiving and parsing ADAS data from the CAN bus in real time; the data processing unit is responsible for executing the automatic distance measurement algorithm, synchronizing the ADAS data with the measurement data in time and comparing their contents to obtain the comparison result, and finally driving the update of the display interface.
[0061] Data Recording Module: This module is used to synchronously record and store the lane perception data and warning signals output by the ADAS system along with the synthesized video stream. Specifically, this module is responsible for data persistence, creating and managing video file streams and .info file streams, and writing the synchronized video data and structured ADAS data to their respective files to ensure that all data is correctly associated.
[0062] Data Playback and Analysis Module: This module is used to play back the stored synthetic video stream and synchronously recorded ADAS system data to perform a retrospective analysis of the road scene and system status at the time of LDW alarm triggering. Specifically, this module operates in playback mode, simultaneously loading video files and .info files, parsing the data, and establishing a time synchronization mapping. It provides users with interactive playback controls and data visualization tools, thereby supporting in-depth retrospective analysis of historical test data.
[0063] Through the above-described hardware and software collaborative operation, the system described in this embodiment of the invention fully implements the aforementioned method, providing a powerful tool for the development and verification of the LDW algorithm.
[0064] Furthermore, embodiments of the present invention also provide a computer-readable storage medium, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), flash memory (FLASH), a solid-state drive (SSD), or any other non-transitory storage medium. One or more computer programs (or software units, instructions) are stored on this storage medium. When these programs are executed by the processor of a device (such as the aforementioned electronic device), the device performs the steps of the road deviation distance measurement and verification method for a lane departure warning system described above. The specific steps are as described above and will not be repeated here.
[0065] In summary, this invention, through digital scale overlay and multi-source data synchronization technology, constructs an "algorithm-transparent" development and verification environment, and establishes a complete, closed-loop road offset distance measurement and verification scheme. This system not only achieves a one-to-one, visualized real-time mapping between the real physical world and the algorithm-perceived world, but also, through synchronous recording and offline playback functions, fully preserves the full-dimensional data context for any critical scenario.
[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for measuring and verifying road deviation distance in a lane departure warning system, characterized in that, Includes the following steps: Images of the calibration board are captured by an auxiliary camera installed on the vehicle, and a mapping relationship between the image coordinate system and the world physical coordinate system is established based on the images to generate a digital scale. The real-time road video stream captured by the auxiliary camera is superimposed on the digital scale to generate and display a composite video stream embedded with the digital scale in real time. The scale of the digital scale corresponds to the actual physical distance. It receives lane departure warning signals and lane line perception data output by the ADAS system in real time, and synchronously compares and displays the lane line perception data with the physical distance measurement data obtained based on the digital scale; The lane line perception data and warning signals output by the ADAS system are recorded and stored synchronously along with the synthesized video stream; The stored synthetic video stream and synchronously recorded ADAS system data are played back to perform a retrospective analysis of the road scene and system status at the time the LDW alarm was triggered.
2. The method according to claim 1, characterized in that, The calibration board adopts a checkerboard calibration board. The intrinsic parameters and distortion coefficients of the auxiliary camera are obtained through Zhang Zhengyou calibration method, and the mapping relationship between image pixels and ground physical coordinates is established through perspective transformation to generate the digital scale.
3. The method according to claim 1 or 2, characterized in that, The auxiliary camera is a USB camera, installed below the left and right exterior rearview mirrors of the vehicle. The field of view of the USB camera covers the vehicle wheels and the adjacent lane line area used to measure the lateral offset distance between the vehicle and the lane line.
4. The method according to claim 1, characterized in that, The lane line perception data includes at least: lane line lateral distance, lateral deviation speed, lane line type, and lane line curvature parameters calculated internally by the system.
5. The method according to claim 4, characterized in that, The data output by the ADAS system is stored as a structured .info file, which contains fields for the cubic curve coefficient of the lane line, lane line type, lane line quality, and lane line color.
6. The method according to claim 5, characterized in that, The post-mortem analysis of the road scene and system status at the time of LDW alarm triggering includes: comparing the physical distance obtained based on the digital scale at the time of alarm with the lateral distance of the lane line calculated internally by the ADAS system, and combining the lane line quality and lane line type in the .info file to locate and analyze the performance of the lane departure warning algorithm problem.
7. The method according to claim 1, characterized in that, The method further includes: when an LDW alarm signal is received, calculating the actual offset distance d between the current vehicle wheel and the lane line based on the digital scale, the calculation formula is: d = d_measure - d0, where d_measure is the distance from the outer edge of the wheel to the lane line measured by the digital scale at the time of the alarm, and d0 is a preset reference distance or safety distance threshold.
8. A road deviation distance measurement and verification system for a lane departure warning system, used to implement the method of any one of claims 1-7, characterized in that, include: The calibration module is used to acquire images of the calibration board through an auxiliary camera installed on the vehicle, and to establish a mapping relationship between the image coordinate system and the world physical coordinate system based on the images to generate a digital scale. The video synthesis and display module is used to overlay the real-time road video stream captured by the auxiliary camera with the digital scale to generate and display the synthesized video stream embedded with the digital scale in real time. The data receiving and comparison module is used to receive lane departure warning signals and lane line perception data output by the ADAS system in real time, and synchronously compare and display the lane line perception data with the physical distance measurement data obtained based on the digital scale. The data recording module is used to synchronously record and store the lane line perception data and warning signals output by the ADAS system and the synthetic video stream; The data playback and analysis module is used to play back the stored synthetic video stream and synchronously recorded ADAS system data to review and analyze the road scene and system status at the time of LDW alarm triggering.
9. The system according to claim 8, characterized in that, The host computer software interface of the video synthesis and display module is configured to display three areas on the same screen: a real-time synthesized video area with digital scales superimposed, an ADAS system data curve area, and a data comparison and system log area.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
LDW function test method and device, test equipment and storage medium
CN112365742A