Gear trigger-based automatic driving reverse data automatic extraction method

By using a gear-triggered method and automatic determination of heading angle sequences, the problems of unstable state recognition and multi-source data synchronization in autonomous driving reversing data were solved, and high-quality automatic extraction of reversing datasets was achieved.

CN121256307BActive Publication Date: 2026-02-24JILIN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511833541.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-02-24
Estimated Expiration
2045-12-08

AI Technical Summary

Technical Problem

Existing technologies for automatic extraction of reversing data in autonomous driving suffer from problems such as unstable reversing status recognition, lack of time alignment of multi-source data, reliance on manual annotation of reversing direction and parking target pose, and lack of unified judgment standards for segment validity.

Method used

A gear-based triggering method is adopted, which reads the chassis gear field as the trigger source for reversing segments, and automatically determines the reversing direction and filters the validity of segments by combining the heading angle sequence. A single camera channel is used as the synchronization reference to perform soft synchronization frame extraction of multi-camera data, reducing manual intervention.

Benefits of technology

It improves the stability and accuracy of reversing status recognition, achieves time synchronization consistency of multi-source data, reduces reliance on manual annotation, and improves the annotation consistency and quality of the reversing training dataset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121256307B_ABST
    Figure CN121256307B_ABST
Patent Text Reader

Abstract

The application discloses an automatic driving reverse data automatic extraction method based on gear triggering and belongs to the technical field of automatic driving data processing. A plurality of topics are acquired by reading a configuration file, a mapping relationship between each topic and a channel is established, and image caching and positioning caching are initialized. After detecting that positioning data and four-way cameras have all received at least one frame of valid data, a reverse segment record is started when a gear field value in a chassis message is equal to a preset reverse gear value, and the current reverse segment is ended when the gear field value is not equal to the preset reverse gear value. During the reverse segment, a pre-specified trigger camera channel is taken as a synchronization reference, a saving action is triggered at a set frame extraction period, a timestamp of the nearest valid image frame is extracted from each channel image caching queue for fish-eye distortion correction, and positioning data at a corresponding moment is saved synchronously. The application realizes automatic extraction of a reverse segment and improves the recognition accuracy of reverse training data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of autonomous driving data processing technology, specifically a method for automatically extracting autonomous driving reversing data based on gear position triggering. Background Technology

[0002] As autonomous driving systems extend to complex operating conditions and low-speed parking scenarios, multimodal data (including multi-camera images and high-precision positioning information) during vehicle reversing is becoming increasingly important for training models in perception, prediction, and planning modules. High-quality reversing datasets have become a crucial foundation for improving system performance. In existing solutions, reversing data is acquired primarily through two methods:

[0003] (1) Automatic extraction based on velocity signal

[0004] A common approach is to read the vehicle's longitudinal speed and trigger the reversing segment based on a negative speed or a change in the speed sign. This method is simple to implement, but it is susceptible to noise, quantization errors, and subtle vehicle movements: during low-speed starts, hill starts, and congested crawling, the vehicle speed fluctuates frequently around zero, causing repeated false triggers or missed triggers of the reversing mode, resulting in unstable start and end times for the reversing segment. Furthermore, the speed signal and gear position are not strictly one-to-one; in actual operating conditions, there may be a transitional state where the gear has shifted but the vehicle speed has not yet changed accordingly.

[0005] (2) Manual screening and manual labeling

[0006] Another method relies on manual playback of the ROS bag, subjectively judging the reversing time period based on speed curves, trajectories, or image images, and manually marking the reversing direction and parking endpoint. This method is highly dependent on the operator's experience, inefficient, and lacks a systematic time alignment strategy when multiple cameras acquire data asynchronously, easily leading to inconsistencies between the image data from different channels and the positioning time.

[0007] In addition, existing technologies generally lack quantitative screening of the effectiveness of reversing segments. For example, they do not explicitly use indicators such as heading angle change and minimum segment length to remove short-term disturbances or abnormal segments, resulting in inconsistent quality of the final training dataset and introducing noise into model training.

[0008] Therefore, existing technologies still have problems in the automatic extraction of reversing data, such as unstable reversing status recognition, lack of time alignment of multi-source data, reliance on manual annotation of reversing direction and parking target pose, and lack of unified judgment standards for segment validity, which need to be further improved. Summary of the Invention

[0009] The technical solution of this invention is as follows: a method for automatically extracting reverse data for autonomous driving based on gear position triggering, comprising the following steps:

[0010] Data initialization steps: Read the configuration file, obtain the multi-camera topic, vehicle positioning topic and chassis gear topic, establish the mapping relationship between the topics and multiple camera channels, and initialize the image cache and positioning cache;

[0011] Recording preparation steps: After detecting the positioning data and that each camera has received at least one frame of valid data, the conditions for starting the reversing segment recording are determined to be met;

[0012] Gear triggering steps: Parse the gear field in the chassis message. When the value of the gear field is equal to the preset reverse gear value, start recording the reversing segment; when the value of the gear field is not equal to the preset reverse gear value, end the current reversing segment recording.

[0013] Synchronous frame extraction steps: During the recording of the reversing segment, a pre-specified camera channel is used as the synchronization reference. The saving action is triggered according to the set frame extraction cycle. The valid image frame with the nearest timestamp is extracted from the image buffer of each camera channel and saved. The positioning data at the corresponding time is saved synchronously.

[0014] Post-processing steps: Construct a heading angle sequence based on the continuous frame positioning data within the reversing segment, and automatically determine the reversing direction and filter the segment validity based on the heading angle sequence.

[0015] Furthermore, the gear triggering step includes anti-shake processing for the gear status: reversing segment recording is only initiated when the value of the gear field is continuously equal to the preset reverse gear value for a period of time exceeding a preset duration threshold.

[0016] Furthermore, in the synchronous frame extraction step, the frame extraction period is K frames, where K is an integer ≥ 1.

[0017] Furthermore, K ranges from 3 to 5.

[0018] Furthermore, in the synchronous frame extraction step, after extracting the most recent valid image frame from the image buffer of each camera channel, fisheye distortion correction is performed on the image frame, and then the corrected image is saved.

[0019] Furthermore, in the synchronous frame extraction step, the image saving action is performed in a multi-threaded parallel manner.

[0020] Furthermore, the post-processing steps specifically include: normalizing the heading angle sequence so that the value range of the heading angle in each frame is between 0° and 360°; calculating the difference between the heading angle of the first frame and the heading angle of the last frame in the heading angle sequence; and automatically determining the reversing direction based on the sign of the difference.

[0021] Furthermore, the segment validity screening based on the heading angle sequence includes: when the absolute value of the difference is less than the preset minimum angle threshold or greater than the preset maximum angle threshold, the current reversing segment is determined to be an invalid segment and deleted; the minimum angle threshold is 10° to 30°, and the maximum angle threshold is 330° to 350°.

[0022] Furthermore, after the segment post-processing step, the following steps are also included: dataset construction step: saving the last frame positioning data of the reverse segments that have passed the validity screening as parking target pose, and dividing the reverse segments that have passed the validity screening into training set and validation set according to a preset ratio.

[0023] Furthermore, it also includes: a frame number filtering step: if the number of valid frames in the reversing segment is lower than the preset minimum frame number threshold, the segment is determined to be invalid and deleted; the minimum frame number threshold is 15 to 30 frames.

[0024] The beneficial effects of this invention are as follows:

[0025] (1) Using the chassis gear field, a control signal with high certainty, as the trigger source for the reversing segment, replacing the speed sign determination method that is easily affected by noise in the existing technology, significantly improving the stability and accuracy of reversing state recognition and segment start and end boundaries;

[0026] (2) A multi-camera soft synchronization frame extraction method is proposed, which uses a single camera channel as the sampling beat and combines the nearest valid frame selection strategy. Without adding hardware synchronization lines, it can achieve approximate time alignment between multiple fisheye cameras and positioning data, and improve the time synchronization consistency of the reversing dataset.

[0027] (3) Construct a heading angle sequence using the continuous frame positioning data within the reversing segment. Automatically label the reversing direction and parking target pose by normalization and calculation of the first and last differences. Introduce heading angle threshold and minimum frame number threshold to quantitatively screen the segment validity, reduce manual intervention, and improve the labeling consistency and overall quality of the reversing training dataset.

[0028] This invention effectively solves the technical problems of unstable reversing status recognition, difficulty in synchronizing multi-source data, and reliance on manual annotation of reversing direction and parking endpoint during automatic reversing data extraction. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the system architecture involved in the automatic extraction process of reversing data in this invention.

[0030] Figure 2 This is a schematic diagram illustrating the determination of the reversing direction based on the heading angle sequence;

[0031] In the picture:

[0032] 101 Configuration and parsing module, 102 Data receiving module, 103 Gear position determination module, 104 Segment management module, 105 Image synchronization module, 106 Heading angle determination module, 107 Data set construction module;

[0033] The modules are connected via a data bus or function calls, and the arrows indicate the direction of data flow and control signal flow. Detailed Implementation

[0034] It should be noted that in the description of this invention, the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", "clockwise", "counterclockwise", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation.

[0035] In this invention, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; a connection can be a mechanical connection or an electrical connection; a link can be a direct connection or an indirect connection through an intermediate medium, and can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0036] An automatic data extraction method for autonomous driving reversing based on gear position triggering includes the following steps:

[0037] S1 reads the configuration file, obtains the multi-channel fisheye camera topics, vehicle positioning topics, and chassis gear topics, establishes a one-to-one mapping relationship between the topics and the four types of camera channels: front, rear, left, and right, and initializes the image cache and positioning cache.

[0038] S2 reads camera data and positioning data sequentially from the ROS bag file. When it detects that the positioning data and that the front, rear, left, and right cameras have all received at least one frame of valid data, it determines that the conditions for starting the reversing segment recording are met.

[0039] S3 parses the gear position field in the chassis message. When the gear position field value is 2, it automatically starts recording the reversing segment. When the gear position field value is not 2, it terminates the current reversing segment.

[0040] During the reversing segment, S4 uses the preset trigger camera channel as the synchronization reference and performs frame sampling according to the set frame sampling period. It extracts the most recent valid image frame from the image buffer queue of each camera channel, performs fisheye distortion correction and saves it, and synchronously records the positioning data at the corresponding time.

[0041] S5 constructs a heading angle sequence based on the positioning data of consecutive frames in the reversing segment, normalizes the heading angle sequence, calculates the difference between the first and last heading angles, and automatically determines the reversing direction and filters the segment validity based on a preset threshold.

[0042] S6 saves the last frame localization data of the reversing segment that has passed the validity screening as the parking target pose, and divides each reversing segment into a training set and a validation set according to a preset ratio;

[0043] In step S3, the reverse state is triggered by the gear field instead of the speed symbol, which can avoid misjudgment caused by vehicle speed fluctuations and noise. Step S4 adopts a multi-camera soft synchronization frame extraction strategy driven by the trigger channel, taking the arrival of the trigger channel image as the sampling time, and the other channels participate in the storage according to the most recent valid image frame, so as to achieve approximate time alignment of multi-source asynchronous data without the need for hardware synchronization.

[0044] The camera channels include four types: front, rear, left, and right. Each channel corresponds to a fisheye vision acquisition device for different directions of the vehicle, which is used to ensure multi-view coverage and integrity of the reversing footage.

[0045] The gear field is directly obtained from the gear field in the chassis message. The reversing state is identified by precisely matching gear=2. The gear state is de-shaking in combination with a preset duration threshold. The reversing state is only determined when the gear is continuously 2 for more than the threshold.

[0046] Frame sampling is performed with the arrival of the trigger channel image as the sampling cycle. When the trigger channel has received a total of K frames, a saving action is triggered. K is an integer greater than or equal to 1. The value range of K is preferably 1 to 10, and more preferably 3 to 5.

[0047] Image saving is performed in parallel using multiple threads to avoid disk I / O blocking from interfering with the ROS bag decoding speed, thus ensuring the requirements for building high frame rate datasets.

[0048] The heading angle sequence is normalized to ensure that the heading angle of each frame is within the range of 0°-360°, so as to avoid sign jump when the heading angle crosses -180° / 180° and improve the stability of direction determination.

[0049] When the absolute value of the difference between the first and last heading angles is less than the preset minimum angle threshold or greater than the preset maximum angle threshold, the reversing segment is determined to be an invalid segment and deleted to ensure that the reversing action in the training data has significant directional characteristics. The minimum angle threshold is preferably 10 to 30° to filter noise and minor vehicle movement segments, and the maximum angle threshold is preferably 330 to 350° to remove abnormal segments caused by near full circle rotation or positioning abnormalities.

[0050] The parking target pose is generated from the positioning data of the last frame of the segment, which includes the vehicle's position coordinates and heading angle information, and serves as the termination status label for the reversing action.

[0051] If the number of valid frames in a reversing segment is lower than the set minimum frame threshold, the segment will be automatically marked as invalid and deleted to eliminate false reversing segments caused by short-term disturbances or slight vehicle movement. The minimum frame threshold is preferably set to 15 to 30 frames to ensure that each valid reversing segment covers at least about 1 to 3 seconds of the reversing process.

[0052] The training set and validation set are divided in a 9:1 ratio and random sampling is used to ensure the consistency of distribution and generalization ability of the two datasets.

[0053] A reversing data automatic extraction system includes:

[0054] The system includes a parsing module, a data receiving module, a gear position determination module, a segment management module, an image synchronization module, a heading angle determination module, and a dataset construction module; among which:

[0055] The configuration parsing module is used to read the configuration file, obtain the multi-channel fisheye camera topic, vehicle positioning topic and chassis gear topic, establish a one-to-one mapping relationship between the topic and the camera channel, and send out the frame extraction period, trigger channel and threshold parameters.

[0056] The data receiving module is used to sequentially read the image messages, positioning messages and chassis messages from each camera from the ROS bag file, write the image data into the image buffer queue of each channel, write the positioning data into the positioning buffer, and send the chassis messages to the gear determination module.

[0057] The gear position determination module is used to parse the gear position field in the chassis message. When the gear position field value is 2, it outputs a reversing segment start signal and when the gear position field value is not 2, it outputs a reversing segment end signal.

[0058] The segment management module is used to create a reversing segment directory and reset the segment counter and heading angle sequence buffer when a reversing segment start signal is received, and to end the current segment and trigger post-processing when a reversing segment end signal is received;

[0059] The image synchronization module is used to trigger a saving action during the reversing segment, using a designated trigger camera channel as the synchronization reference and a set frame extraction period. It extracts the most recent valid image frame from the image buffer queue of each camera channel, performs fisheye distortion correction, and saves it. Simultaneously, it extracts and saves the corresponding positioning data. In one embodiment, the frame extraction period K of the trigger channel is selected as an integer between 1 and 10, preferably 3 to 5. Considering that the frame rate of an onboard fisheye camera is typically 10 to 30 fps, when K is 3 to 5, the corresponding time interval is approximately 0.1 to 0.5 s. This ensures sufficient temporal correlation between consecutive frames, facilitating the network's learning of dynamic changes during the reversing process, while effectively controlling the number of images generated in a single reversing segment, reducing storage and computational overhead for subsequent annotation and training. When K is too small (e.g., 1), although the temporal continuity is the best, the amount of data grows too fast, which can easily cause disk and network bandwidth pressure; when K is too large (e.g., greater than 10), the detailed actions in the reversing trajectory may be oversampled, affecting the model's learning effect on subtle operations.

[0060] The heading angle determination module is used to construct a heading angle sequence based on the positioning data of consecutive frames within a segment, normalize the heading angle and calculate the difference between the first and last points to automatically determine the reversing direction and filter the validity of the segment according to the threshold.

[0061] The dataset construction module is used to save the last frame positioning data of the valid reversing segments as the parking target pose, and divide the valid segments into training set and validation set according to a preset ratio to generate a structured reversing training dataset.

[0062] An automatic data extraction method for autonomous driving reversing based on gear position triggering includes:

[0063] Step 1: Use the configuration parsing module to obtain the multi-channel fisheye camera topics, positioning topics, and chassis gear topics from the configuration file, establish a one-to-one mapping relationship between topics and camera channels, and configure parameters such as frame extraction period, trigger channel, heading angle threshold, and minimum frame number threshold.

[0064] Step 2: The data receiving module sequentially reads the images and positioning data from each camera from the ROS bag file and writes them into their respective buffers; after the positioning data and at least one complete frame of data from each of the four cameras have been obtained, the conditions for recording the reversing segment are considered to have been met.

[0065] Step 3: The gear determination module parses the gear field in the chassis message. When gear = 2, it determines that the vehicle is in reverse gear and uses this as the start signal for the reversing segment. When gear ≠ 2, it uses this as the end signal for the reversing segment.

[0066] Step 4: During the reversing segment, the image synchronization module uses the designated trigger camera channel as the time frame, triggers the saving action according to the frame extraction cycle, extracts the image frame with the closest timestamp from the image buffer queue of each channel and performs fisheye distortion correction, and at the same time extracts the positioning data with the closest timestamp from the positioning buffer as the pose label at that moment, and writes to the disk in a multi-threaded manner to achieve approximate time alignment of multi-source data.

[0067] Step 5: The heading angle determination module constructs a heading angle sequence based on the continuous frame positioning data within the segment, normalizes the heading angle to 0°-360°, calculates the difference between the first and last heading angles, automatically determines the reversing direction based on the sign of the difference, and determines the validity of the segment based on the minimum / maximum heading angle threshold.

[0068] Step 6: The dataset construction module counts the number of valid frames for the segments that have passed the validity screening, deletes short segments with fewer frames than the minimum frame threshold, saves the last frame localization data of the remaining segments as the parking target pose, and divides the training set and validation set according to a preset ratio.

[0069] Meanwhile, this invention provides a system architecture and storage medium implementation scheme corresponding to the above method.

[0070] like Figure 1 As shown, the automatic reversing data extraction system includes:

[0071] Configuration parsing module 101: Used to read external configuration files (e.g., YAML, JSON, or XML format), parse them to obtain the topic names of the four fisheye cameras (front, rear, left, right), the vehicle positioning topic name, and the chassis status topic name, and establish a one-to-one mapping relationship between the topic names and camera channel identifiers. The parsing results are passed to the data receiving module 102 and the image synchronization module 105 for subsequent subscription and channel management.

[0072] Data receiving module 102: Based on the topic mapping relationship provided by configuration parsing module 101, it sequentially reads messages from each camera image topic, positioning topic, and chassis status topic from the ROS bag file. Internally, the module establishes an independent image cache queue for each camera and a positioning cache queue for positioning data. When a camera image is received, it is cached into the corresponding queue in timestamp order. When positioning data is received, it is written to the positioning cache queue. Chassis messages are sent to gear position determination module 103 for parsing.

[0073] Gear determination module 103: parses the gear field in the chassis message, generates a reversing segment start signal when gear = 2, and generates a reversing segment end signal when gear ≠ 2; optionally, time debouncing is performed on the gear state.

[0074] The segment management module 104 is used to create a new reversing segment directory, initialize the frame counter, heading angle sequence buffer, and parking target pose buffer of the current segment when it receives the "start reversing segment" control signal, and notify the image synchronization module 105 to enter the reversing segment working mode; when it receives the "end reversing segment" control signal, it terminates the recording of the current reversing segment, triggers the heading angle determination module 106 to start segment post-processing, and feeds back the segment validity result to the dataset construction module 107.

[0075] Image synchronization module 105: During the reversing segment, a pre-specified trigger camera channel is used as the time reference. Preferably, the front channel is selected as the trigger channel in this embodiment. On the one hand, the front channel is usually configured with higher resolution and frame rate, and its output timestamp is stable, making it suitable as a unified sampling rhythm for the system. On the other hand, in typical road and parking scenarios, the probability of the front-view camera being occluded or completely malfunctioning is relatively low, making it easier to ensure continuous output compared to channels such as rear, left, and right, thereby avoiding unstable frame skipping rhythm caused by frequent frame loss in the trigger channel. In addition, front view information has a high weight for environmental modeling and trajectory prediction in autonomous driving systems. Using the front channel as the frame skipping trigger source can prioritize the acquisition of image frames most valuable for environmental perception while ensuring the time alignment accuracy of multiple channels. Internally, the image synchronization module 105 maintains an ordered image buffer queue for each camera. The queue depth is configured according to the camera frame rate and the maximum allowable time alignment error, and can be 10 to 50 frames to absorb the jitter of arrival times from multiple cameras. Each time a trigger channel receives an image frame, the internal counter is updated. When the counter reaches the preset frame extraction period K, a save operation is triggered, where K is an integer greater than or equal to 1, preferably 1 to 10, and more preferably 3 to 5. Considering that the frame rate of the vehicle-mounted fisheye camera is usually 10 to 30 fps, when K is 3 to 5, the corresponding time interval is approximately 0.1 to 0.5 s. This ensures sufficient temporal correlation between consecutive frames, facilitating the network's learning of dynamic changes during the reversing process, while effectively controlling the number of images generated by a single reversing segment, reducing storage and computational overhead for subsequent training. In each save operation, the current image frame is retrieved from the trigger channel queue; in the image buffer queue of the remaining channels, a valid image frame with the closest timestamp to the trigger frame is searched within the allowed time window based on the timestamp; distortion correction is performed on the four fisheye images; the positioning data with the timestamp closest to the current trigger frame is searched from the positioning buffer queue as the pose label at that moment; and the four corrected images and pose data are asynchronously written to the current reversing segment directory using a multi-threaded approach. The aforementioned soft synchronization strategy enables near-time alignment of multi-source asynchronous data without relying on hardware synchronization lines, and significantly reduces timestamp errors between multi-camera images and positioning data.

[0076] Heading angle determination module 106: Used during the reversing segment, to receive positioning data corresponding to each saved action from the positioning buffer queue, extract heading angle information from it, and construct a heading angle sequence. For example... Figure 2 As shown, after the segment ends, the heading angle sequence is uniformly normalized to ensure its value range is within 0-360°, avoiding jumps caused by crossing the -180° / 180° boundary. Then, the heading angle of the first frame of the sequence is calculated. With the heading angle of the last frame The difference ,according to The symbol is used to determine the reversing direction and is compared. With the preset minimum threshold and maximum threshold The validity of a segment is determined by whether it exhibits significant reversing direction characteristics.

[0077] Dataset construction module 107: This module manages the valid reversing segments output by the heading angle determination module 106. It adds left and right direction labels to the segment directory based on the direction of each segment; it records the last frame of positioning data for each segment as a parking target pose file, which includes vehicle position coordinates and heading angle information to describe the termination state of the reversing action. Simultaneously, the dataset construction module 107 counts the number of valid frames for each segment. When the number of valid frames is lower than the minimum frame threshold... When this happens, the segment is marked as invalid and deleted to eliminate false reversing segments caused by short-term disturbances or slight vehicle movement. In one specific embodiment, The preferred setting is 15 to 30 frames per second. Considering that the image saving frame rate in this invention is typically 10 to 15 fps, The corresponding reversing duration is approximately 1–3 seconds, which ensures that the retained segments cover a representative reversing action process without discarding too many valid samples, thus achieving a balance between data volume and sample quality. After the above screening is completed, the remaining valid segments are randomly divided into training and validation sets according to a preset ratio (e.g., 9:1), and auxiliary files such as camera intrinsics and correction parameters can be copied for each segment to form a standardized reversing training dataset structure.

[0078] Various modifications and improvements can be made without departing from the basic idea of ​​this invention.

[0079] 1. Multiple options for triggering camera channels

[0080] While the above embodiments preferably use the front channel as the trigger channel, in some scenarios, such as parking scenarios where rearward environmental perception is more sensitive, the rear channel can also be used as the trigger channel; or, depending on the actual sensor layout, the left or right channel can be used as the trigger channel. As long as the selected channel has a relatively stable frame rate and timestamp, the soft synchronization frame dropping strategy of this invention is applicable.

[0081] 2. Precise synchronization implementation method based on hardware timestamps

[0082] In another embodiment, the multi-camera system can achieve timestamp alignment via a hardware time synchronization line or a network time protocol. In this case, the image synchronization module 105 can match images from other channels for the trigger frame within a smaller time error window based on the hardware timestamp under a unified time source, thereby achieving higher precision time alignment. The gear triggering, heading angle determination, and dataset construction process proposed in this invention are also applicable, except that the image synchronization implementation method is extended from soft synchronization to a combination of soft and hardware or pure hardware synchronization.

[0083] 3. Different anti-shake strategies for gear signal jitter

[0084] In addition to employing a fixed-delay confirmation mechanism, the gear signal can be denoised based on counting or filtering strategies that continuously change the gear position. For example, if the proportion of gear=2 exceeds a certain threshold within the sliding time window, it is determined to be in reverse mode; otherwise, it is determined to exit reverse mode, further improving robustness against bus anomalies or short-term jitter. Furthermore, the gear determination module can further combine wheel speed direction, longitudinal acceleration, and heading angle change rate to achieve multi-source fusion reverse determination. The system uses a multi-state finite state machine mechanism, combining the duration of the gear signal, the heading angle change trend, and slope information to perform confidence assessment and anomaly elimination for the reverse state. If negative vehicle displacement is detected in a non-reverse gear and the slope exceeds a threshold, it is determined to be a slope rollover segment rather than a valid reverse segment and is automatically removed to ensure the accuracy and consistency of the dataset.

[0085] 4. Adaptive adjustment of frame extraction period

[0086] In addition to being configured to a fixed value, the frame extraction period K can also be adaptively adjusted according to real-time vehicle speed, heading angle change rate, or reversing distance. For example, a smaller frame extraction period can be used when the speed is high or the turning is frequent to improve the time resolution; a slightly larger frame extraction period can be used when reversing a long straight distance to reduce data redundancy. Through the above-mentioned fixed or adaptive frame extraction period configuration, the present invention can balance the amount of data and the continuity of time sequence, and adapt to the reversing data acquisition needs in different scenarios.

[0087] 5. Extended Indicators for Heading Angle Determination

[0088] In addition to utilizing the difference in heading between the bow and stern In addition to determining direction, indicators such as the monotonicity, curvature, or lateral displacement of the heading angle change can be introduced to classify and filter the reversing trajectory in a more granular way; information such as wheel turning angle and yaw rate can also be combined to further improve the accuracy of direction determination.

[0089] Key technology effectiveness verification

[0090] The invention was validated using multi-segment reversing ROS bag data collected from real vehicles. The gear triggering mechanism of this invention can stably identify the start and end of reversing under conditions such as low-speed vibration and slope slippage; soft synchronization frame extraction compresses the time deviation between multiple cameras and positioning data to approximately 10–20 ms; heading angle difference... The automatic direction determination and threshold screening results show a consistency rate of over 95% with manual annotation. Verification demonstrates that the method of this invention has good stability and engineering applicability.

[0091] Real-world testing was conducted on a small unmanned delivery vehicle equipped with four GMSL2 fisheye cameras, GNSS+IMU integrated navigation, and chassis gear and speed signals. Approximately 20 sets of rosbag data (each set approximately 1GB) of reversing maneuvers were recorded using ROS Noetic. The vehicle repeatedly reversed into parking spaces in both left and right directions. The chassis gear trigger mechanism accurately identified the start and end points of the reversing maneuvers. Soft synchronization frame extraction compressed the time deviation between the multi-camera images and the positioning data to approximately 10–20 ms, and the reversing direction was automatically determined based on the heading angle difference Δψ. Experimental results show that the reversing start and end point recognition is stable and reliable under conditions of low-speed vibration and slight slope slippage. The automatic direction determination has a consistency rate of over 95% with manual annotations, verifying the good stability and engineering applicability of the method.

[0092] In addition, real vehicle data including low-speed creep and ramp rollback were selected, and two triggering strategies, "speed < 0" and "gear = 2 (including time-based anti-shake)," were compared on the same ROS bag. To avoid evaluation bias, this embodiment constructs the longitudinal displacement of the vehicle coordinate system based on the positioning data and independently generates "true value segments," that is, segments with negative cumulative longitudinal displacement within the judgment window and a duration / displacement exceeding a preset threshold are recorded as reversing segments. The triggering results of the two strategies were paired with the true values ​​according to the time interval IoU, and the recall rate, precision (and thus the false trigger rate), start / end delay (giving the mean and 95th percentile), and segment fragmentation were statistically analyzed. The results show that under low-speed creep and ramp rollback conditions, the "speed < 0" strategy exhibits significant false triggers and boundary jitter; the "gear = 2" strategy is superior in terms of precision and boundary stability, and has a smaller start delay. By combining the time-based stabilization, minimum frame count, and heading angle threshold filtering mechanisms of this invention, the system can automatically identify and eliminate segments such as "gear shifting incorrectly / not actually reversing" and "rolling back on a slope," thereby improving the consistency and trainability of reversing segments as a whole.

[0093] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be included within the scope of protection of the present invention. Furthermore, all content not described in detail in this specification is prior art known to those skilled in the art.

Claims

1. An automatic driving reverse data automatic extraction method based on gear trigger, characterized in that, The method comprises the following steps: A data initialization step: reading a configuration file, obtaining a multi-camera topic, a vehicle positioning topic and a chassis gear topic, establishing a mapping relationship between the topics and multiple camera channels, and initializing image buffering and positioning buffering; A recording preparation step: after detecting that the positioning data and each camera have received at least one valid frame of data, it is determined that the recording start condition of the reversing segment is met; A gear triggering step: analyzing the gear field in the chassis message, and starting the reversing segment recording when the value of the gear field is equal to the preset reverse gear value; ending the current reversing segment recording when the value of the gear field is not equal to the preset reverse gear value; A synchronous frame extraction step: during the reversing segment recording, taking a pre-specified camera channel as a synchronous reference, triggering a saving action at a set frame extraction period, extracting the latest valid image frame from the image buffer of each camera channel, and saving the image frame and the positioning data at the corresponding time; A segment post-processing step: constructing a heading angle sequence based on the continuous frame positioning data in the reversing segment, automatically determining the reversing direction according to the heading angle sequence, and filtering the segment effectiveness.

2. The method of claim 1, wherein, In the gear triggering step, the gear state is subjected to anti-shake processing: only when the value of the gear field is equal to the preset reverse gear value for more than a preset duration threshold, the reversing segment recording is started.

3. The method of claim 1, wherein, In the synchronous frame extraction step, the frame extraction period is K frames, where K is an integer greater than or equal to 1.

4. The method of claim 3, wherein, K is 3 to 5.

5. The method of claim 1, wherein, In the synchronous frame extraction step, after extracting the latest valid image frame from the image buffer of each camera channel, the image frame is subjected to fish-eye distortion correction, and then the corrected image is saved.

6. The method of claim 1, wherein, In the synchronous frame extraction step, the saving action of the image is performed in a multi-thread parallel mode.

7. The method of claim 1, wherein, The segment post-processing step specifically comprises: normalizing the heading angle sequence to make the value range of each frame of heading angle between 0° and 360°; calculating the difference between the first frame of heading angle and the last frame of heading angle in the heading angle sequence; and automatically determining the reversing direction according to the sign of the difference.

8. The method of claim 7, wherein, Filtering the segment effectiveness according to the heading angle sequence comprises: when the absolute value of the difference is less than a preset minimum angle threshold or greater than a preset maximum angle threshold, determining that the current reversing segment is an invalid segment and deleting it; the minimum angle threshold is 10° to 30°, and the maximum angle threshold is 330° to 350°.

9. The method according to any one of claims 1 to 8, characterized in that, After the segment post-processing step, a data set construction step is further included: saving the last frame of positioning data of the reversing segment that passes the effectiveness filtering as a parking target pose, and dividing the reversing segment that passes the effectiveness filtering into a training set and a validation set according to a preset ratio.

10. The method of claim 9, wherein, Further comprising: A frame number filtering step: if the number of valid frames of the reversing segment is lower than a preset minimum frame number threshold, the segment is determined to be invalid and is deleted; The minimum frame number threshold is 15 to 30 frames.

Citation Information

Patent Citations

  • Parking control method, device and equipment and computer storage medium

    CN116811843A

  • Vehicle-mounted monitoring video stitching method and device, electronic equipment and storage medium

    CN117041456A