Vehicle positioning method based on monocular vision feature fusion and readable storage medium
By restoring and fusing the scale of the front and rear visual images and the vehicle trajectory, the problem of scale uncertainty in monocular visual SLAM and the non-coincidence of the vehicle trajectory is solved, improving the accuracy and robustness of vehicle positioning and reducing the processing time. The computing power requirements of the computer.
Patent Information
- Application Number
- CN202210428550.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-04-22
AI Technical Summary
Monocular visual SLAM has scale uncertainty, which results in low vehicle positioning accuracy. Existing solutions are difficult to achieve scale recovery and vehicle motion trajectory fusion with front and rear visual sensors, affecting mapping and positioning accuracy.
By obtaining the target vehicle's odometer data and front and rear vision images, the scale of the visual image is restored and mapped, the vehicle trajectory and visual feature map are generated, and the visual feature map is integrated to achieve vehicle relocation, giving priority to using the rear vision image for positioning. , and switch to the front eye for positioning when the rear eye fails.
It realizes the restoration of front and rear eye scales and the fusion of vehicle motion trajectories, improves the accuracy of monocular visual mapping and positioning, reduces the computing power requirements of the processor, and provides robust positioning results under special circumstances.
Smart Images

Figure CN114812573B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent driving vehicle technology, and in particular to a vehicle positioning method based on monocular vision feature fusion and a readable storage medium. Background Art
[0002] Monocular vision simultaneous localization and mapping (SLAM) refers to the use of a single visual sensor (such as a camera) to create a map consistent with the real environment and simultaneously determine its own position in the map. However, the image data measured by a single visual sensor can only provide the relative distance relationship between objects, but cannot provide the real three-dimensional spatial information of these objects. Therefore, monocular vision SLAM has the problem of scale ambiguity.
[0003] Due to the scale uncertainty of monocular vision SLAM, when using the SLAM map constructed by monocular vision SLAM for vehicle positioning, there is a problem of low positioning accuracy. To this end, the Chinese patent with publication number CN109887032B discloses "A vehicle positioning method and system based on monocular vision feature fusion", which includes: when mapping, during the monocular vision SLAM initialization process, the scale of the monocular vision SLAM map is determined by the actual moving distance of the vehicle, and the scale and other information of the SLAM map are continuously optimized by the actual moving distance of the vehicle in the subsequent mapping; when positioning based on the map, the target image and the feature points in the SLAM map are matched to determine the repositioning posture of the vehicle in the SLAM map, so as to obtain the conversion relationship between the body posture measured by the vehicle positioning module and the visual posture of the monocular camera, and the conversion relationship is continuously optimized using multiple body postures and visual postures.
[0004] The vehicle positioning method in the above-mentioned existing scheme can provide real scale information for the monocular vision SLAM map, thereby improving the vehicle positioning accuracy. The applicant found that the above-mentioned existing scheme is to complete the vehicle position positioning for a single monocular vision sensor, but in order to improve the robustness of vehicle positioning, at least two front and rear monocular vision sensors need to be set. However, when visual positioning is performed by the front and rear two monocular vision sensors, if the vehicle positioning method in the above-mentioned existing scheme is still used, two feature maps and two vehicle motion trajectories (constructed by the front and rear vision sensors, respectively) will be obtained during mapping, and the scale and vehicle motion trajectory obtained by the front or rear vision for mapping are not overlapped in most cases, but the downstream module only needs one vehicle motion trajectory. Therefore, how to design a method that can realize the fusion of front and rear scale recovery and vehicle motion trajectory, so as to improve the accuracy of mapping and positioning, is a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is: how to provide a vehicle positioning method based on monocular vision feature fusion, so as to realize the restoration of the foreground and background scales and the fusion of the vehicle motion trajectory, thereby improving the accuracy of monocular vision mapping and positioning.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] The vehicle positioning method based on monocular vision feature fusion includes the following steps:
[0008] S1: Obtain the odometer data of the target vehicle, as well as the visual images of the front and rear targets;
[0009] S2: restoring the scale of any one of the previous and next visual images through the odometer data and performing mapping to generate a corresponding first vehicle running trajectory and a first visual feature map;
[0010] S3: restoring the scale of the other visual image in the front view and the back view through the running trajectory of the first vehicle and performing mapping to generate a corresponding second visual feature map;
[0011] S4: fusing the first visual feature map and the second visual feature map to generate a fused visual feature map;
[0012] S5: Matching the visual images of the preceding and / or succeeding objects and the feature points in the fused visual feature map to achieve relocation of the target vehicle in the fused visual feature map.
[0013] Preferably, step S1 specifically includes the following steps:
[0014] S101: obtaining displacement data and angle data of the target vehicle through a wheel speed sensor and an inertial sensor, and obtaining front and rear visual sensor images through front and rear visual sensors;
[0015] S102: removing abnormal data from the displacement data, angle data, and visual sensor images of the front and rear eyes;
[0016] S103: Time synchronization of the displacement data, the angle data, and the visual sensor images of the front and rear eyes, and generation of corresponding image timestamps;
[0017] S104: performing dead reckoning based on the displacement data and the angle data to generate corresponding odometer data;
[0018] S105: Dedistortion processing is performed on the visual sensor images of the front and rear objects to generate visual images of the front and rear objects.
[0019] Preferably, step S2 specifically includes the following steps:
[0020] S201: Perform pure visual initialization on the visual image;
[0021] S202: Obtaining a pure visual displacement between corresponding image frames through epipolar constraints;
[0022] S203: performing displacement interpolation on the odometer data based on the image timestamp to obtain the actual displacement between corresponding image frames;
[0023] S204: Calculate the mapping relationship between the pure visual displacement and the real displacement to restore the scale of the visual image.
[0024] Preferably, in step S2, the map building process includes the following steps:
[0025] S211: constructing a map based on the scale-restored visual image to obtain corresponding three-dimensional feature points and visual poses;
[0026] S212: Adding the odometer data as a constraint to the optimization process of the visual pose;
[0027] S213: Perform loop detection and global optimization on the visual posture to generate a corresponding first vehicle running trajectory and a first visual feature map.
[0028] Preferably, in step S212, the pose change between corresponding image frames is obtained by visual odometer, and the displacement between corresponding image frames is constrained by interpolation displacement of three-dimensional feature points, image frame reprojection and odometer data.
[0029] Preferably, step S3 specifically includes the following steps:
[0030] S301: Perform pure visual initialization on the visual image;
[0031] S302: Obtaining pure visual displacement between corresponding image frames through epipolar constraints;
[0032] S303: searching for the corresponding first vehicle running track based on the image timestamp and performing displacement interpolation to obtain the real displacement between the corresponding image frames;
[0033] S304: Calculate the mapping relationship between the pure visual displacement and the real displacement to restore the scale of the visual image.
[0034] Preferably, in step S3, the map building process includes the following steps:
[0035] S311: constructing a map based on the scale-restored visual image to obtain corresponding three-dimensional feature points and visual poses;
[0036] S313: adding the first vehicle running trajectory as a constraint to the optimization process of the visual posture;
[0037] S313: Perform loop detection and global optimization on the visual posture to generate a corresponding second visual feature map.
[0038] Preferably, in step S5, the visual image of the rear target is preferentially used for positioning, and when the rear target fails, the visual image of the front target is used for positioning.
[0039] Preferably, in step S5, corresponding odometer data is added to achieve relocation and position update of the target vehicle in the fused visual feature map.
[0040] The present invention also discloses a readable storage medium on which a computer management program is stored. When the computer management program is executed by a processor, the steps of the vehicle positioning method based on monocular visual feature fusion of the present invention are implemented.
[0041] Compared with the prior art, the vehicle positioning method of the present invention has the following beneficial effects:
[0042] The present invention can realize the relocation of the vehicle in the map through two single-purpose visual images of the front view and the rear view, thereby improving the robustness of the vehicle positioning.
[0043] The present invention restores the scale of the rear-view visual image through odometer data, and then restores the scale of the front-view visual image through the rear-view vehicle running trajectory, so that the scales of the visual feature maps constructed by the front and rear eyes can be kept consistent, and then by fusing the rear-view visual feature map and the front-view visual feature map, the problem of the non-overlapping movement trajectories of the front and rear vehicles is solved. That is, the present invention can realize the restoration of the front and rear scales and the fusion of the vehicle movement trajectory, thereby improving the accuracy of monocular vision mapping and positioning.
[0044] The present invention preferentially uses the rear camera for monocular visual positioning. Combined with the vehicle's running trajectory, it can greatly reduce the processor's computing power requirements and ensure that the positioning result has good robustness. Compared with the prior art of calling multi-eye visual features to ensure the robustness of vehicle positioning, the present invention has lower processor computing power requirements. In addition, in the case of rear camera failure (for example, special cases such as rear camera being blocked or damaged), the present invention can switch to the front camera for visual positioning. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0046] Figure 1 This is the logical block diagram of the vehicle positioning method based on monocular vision feature fusion. DETAILED DESCRIPTION
[0047] The following is a further detailed description through specific implementation methods:
[0048] Embodiment 1:
[0049] This embodiment discloses a vehicle positioning method based on monocular vision feature fusion.
[0050] like Figure 1 As shown, the vehicle positioning method based on monocular vision feature fusion includes the following steps:
[0051] S1: Obtain the odometer data of the target vehicle, as well as the visual images of the front and rear targets;
[0052] S2: Restore the scale of the rear-view (front-view) visual image through the odometer data and build a map to generate the corresponding rear-view (front-view) vehicle running trajectory and rear-view (front-view) visual feature map;
[0053] S3: restore the scale of the front (back) visual image through the running trajectory of the rear (front) vehicle and build a map to generate the corresponding front (back) visual feature map;
[0054] S4: Fusing the rear-view visual feature map and the front-view visual feature map to generate a fused visual feature map;
[0055] S5: Match the rear target visual image and the feature points in the fused visual feature map to achieve relocation of the target vehicle in the fused visual feature map. In this embodiment, the rear target visual image is preferentially used for positioning, and in the case of rear target failure, the front target visual image is used for positioning.
[0056] It should be noted that the vehicle positioning method based on monocular visual feature fusion in the present invention can generate corresponding software codes or software services through program programming, and can then be run and implemented on servers and computers.
[0057] The present invention can realize the relocation of the vehicle in the map through the two monocular visual images of the front and rear eyes, thereby improving the robustness of vehicle positioning. Secondly, the present invention restores the scale of the rear visual image through the odometer data, and then restores the scale of the front visual image through the rear vehicle running trajectory, so that the scale of the visual feature map constructed by the front and rear eyes can be kept consistent, and then by fusing the rear visual feature map and the front visual feature map, the problem of the non-overlapping of the front and rear vehicle motion trajectories is solved, that is, the present invention can realize the restoration of the front and rear scales and the fusion of the vehicle motion trajectory, thereby improving the accuracy of monocular vision mapping and positioning. Finally, the present invention does not need to use expensive vehicle-mounted sensors such as lidar and binocular cameras, nor does it require special modifications to the factory side.
[0058] The present invention preferentially uses the rear camera for monocular visual positioning. Combined with the vehicle's running trajectory, it can greatly reduce the processor's computing power requirements and ensure that the positioning result has good robustness. Compared with the prior art of calling multi-eye visual features to ensure the robustness of vehicle positioning, the present invention has lower processor computing power requirements. In addition, in the case of rear camera failure (for example, special cases such as rear camera being blocked or damaged), the present invention can switch to the front camera for visual positioning.
[0059] In the specific implementation process, step S1 includes the following steps:
[0060] S101: obtaining displacement data and angle data of the target vehicle through a wheel speed sensor and an inertial sensor (IMU), and obtaining front and rear visual sensor images through front and rear visual sensors;
[0061] S102: Abnormal data is eliminated from the displacement data, angle data, and visual sensor images of the front and rear objects; in this embodiment, abnormal data caused by unstable working state of the sensor, delayed blockage of the communication network, etc. is eliminated.
[0062] S103: Time-synchronize the displacement data, angle data, and visual sensor images of the front and rear objects to generate corresponding image timestamps. In this embodiment, all sensor data need to be time-synchronized, and the data range statistics within a period of time are determined according to the time sequence of the previous and next frames, and the data are filtered according to the set threshold to obtain sensor data with normal time series.
[0063] S104: Perform dead reckoning based on displacement data and angle data to generate corresponding odometer data; in this embodiment, corresponding dead reckoning and specific dead reckoning models are configured to implement dead reckoning. In a short period of time, the displacement obtained by the wheel speed encoder is relatively accurate, and the angle obtained by integrating the IMU measurement value is relatively accurate, and then the advantages of the two sensors are combined to perform dead reckoning.
[0064] S105: Dedistortion processing is performed on the visual sensor images of the front eye and the rear eye to generate the visual images of the front eye and the rear eye. In this embodiment, the visual sensor image acquired by the monocular sensor is generally a fisheye image, and the fisheye image is dedistorted by multi-faceted expansion. After the dedistortion processing, the feature point information corresponding to the pixel, especially the spatial information, is more accurate than before the dedistortion.
[0065] In the specific implementation process, step S2 includes the following steps:
[0066] S201: Perform pure visual initialization on the visual image; in this embodiment, pure visual initialization is achieved by existing means.
[0067] S202: Obtain the pure visual displacement between the corresponding image frames through the epipolar constraint; in this embodiment, the selection and translation between the two frames are restored according to the epipolar constraint, and the initial frame is set as the reference frame, the position is the three-dimensional zero vector, and the posture is the 3*3 unit matrix. Among them, the epipolar constraint is an existing mature method, and its purpose is to estimate the movement of the camera based on multiple groups of 2D pixel points between two images under the premise of knowing the 2D pixel coordinates.
[0068] S203: Displacement interpolation is performed on the odometer data based on the image timestamp to obtain the real displacement between the corresponding image frames; in this embodiment, the actual moving distance (real displacement) of the vehicle can be obtained by displacement interpolation of the odometer data, and then the scale of the visual image is determined by the actual moving distance.
[0069] S204: Calculate the mapping relationship between the pure visual displacement and the real displacement to restore the scale of the visual image.
[0070] The present invention restores the scale of a visual image through odometer data, and can achieve scale restoration of the visual image without increasing costs.
[0071] In the specific implementation process, in step S2, the map building includes the following steps:
[0072] S211: Mapping is performed based on the scale-restored visual image to obtain corresponding three-dimensional feature points and visual poses. In this embodiment, the existing visual odometer is used to achieve mapping.
[0073] S212: Add the odometer data as a constraint to the optimization process of the visual pose; in this embodiment, the pose change between corresponding image frames is obtained by the visual odometer, and the displacement between corresponding image frames is constrained by the interpolation displacement of three-dimensional feature points, image frame reprojection and odometer data.
[0074] S213: Perform loop detection and global optimization on the visual posture to generate a corresponding first vehicle running track and a first visual feature map. In this embodiment, loop detection and global optimization are both completed using existing mature means, and the present invention only adds the odometer data constraint.
[0075] The present invention adds odometer data as a constraint to the optimization process of visual pose, so that the accumulated error between image frames can be reduced, that is, the drift can be reduced, thereby improving the accuracy of monocular vision mapping and positioning.
[0076] In the specific implementation process, step S3 includes the following steps:
[0077] S301: Perform pure visual initialization on the visual image; in this embodiment, pure visual initialization is achieved by existing means.
[0078] S302: Obtain the pure visual displacement between the corresponding image frames through the epipolar constraint; in this embodiment, the selection and translation between the two frames are restored according to the epipolar constraint, and the initial frame is set as the reference frame, the position is the three-dimensional zero vector, and the posture is the 3*3 unit matrix. Among them, the epipolar constraint is an existing mature method, and its purpose is to estimate the movement of the camera based on multiple groups of 2D pixel points between two images under the premise of knowing the 2D pixel coordinates.
[0079] S303: searching for the corresponding first vehicle running trajectory based on the image timestamp and performing displacement interpolation to obtain the real displacement between the corresponding image frames; in this embodiment, by performing displacement interpolation on the first vehicle running trajectory, the actual moving distance (real displacement) of the vehicle can be obtained, and then the scale of the visual image can be determined by the actual moving distance.
[0080] S304: Calculate the mapping relationship between the pure visual displacement and the real displacement to restore the scale of the visual image.
[0081] The present invention restores the scale of the visual image by using the running trajectory of the first vehicle, can achieve scale restoration of the visual image without increasing the cost, and can solve the problem of non-overlapping movement trajectories of front and rear vehicles, thereby improving the accuracy of monocular vision mapping and positioning.
[0082] In the specific implementation process, in step S3, the map building includes the following steps:
[0083] S311: Mapping is performed based on the scale-restored visual image to obtain corresponding three-dimensional feature points and visual poses. In this embodiment, the existing visual odometer is used to achieve mapping.
[0084] S313: Add the first vehicle running trajectory as a constraint to the optimization process of the visual posture; in this embodiment, the posture change between the corresponding image frames is obtained by the visual odometer, and the displacement between the corresponding image frames is constrained by the interpolation displacement of the three-dimensional feature points, image frame reprojection and the first vehicle running trajectory.
[0085] S313: Perform loop detection and global optimization on the visual posture to generate a corresponding second visual feature map. In this embodiment, loop detection and global optimization are both completed using existing mature means, and the present invention only adds the constraint condition of odometer data.
[0086] The present invention adds the first vehicle running trajectory as a constraint to the optimization process of the visual posture, so that the cumulative error between image frames can be reduced, that is, the drift can be reduced, the accuracy of monocular vision mapping and positioning can be improved, and the problem of non-overlapping movement trajectories of front and rear vehicles can be solved, thereby improving the accuracy of monocular vision mapping and positioning.
[0087] In the specific implementation process, in step S5, the corresponding odometer data is added to realize the relocation and position update of the target vehicle in the fused visual feature map. In this embodiment, the fusion positioning module receives the ROS message of the relocation data and the odometer data for fusion positioning, and the result of the fusion positioning is given to the DSPACE regulation and control module in UDP mode.
[0088] The present invention realizes vehicle positioning by fusing repositioning (position and posture) and odometer data (vehicle running trajectory), which can further improve the accuracy of monocular vision mapping and positioning.
[0089] Embodiment 2:
[0090] This embodiment discloses a readable storage medium.
[0091] A readable storage medium stores a computer management program, which, when executed by a processor, implements the steps of the vehicle positioning method based on monocular visual feature fusion of the present invention. The readable storage medium can be a device with a readable storage function such as a USB flash drive or a computer.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.
Claims
1. A vehicle positioning method based on monocular vision feature fusion, characterized in that: The following steps are involved: S1: Obtain the odometer data of the target vehicle, as well as the visual images of the front and rear targets; Step S1 specifically includes the following steps: S101: obtaining displacement data and angle data of the target vehicle through a wheel speed sensor and an inertial sensor, and obtaining front and rear visual sensor images through front and rear visual sensors; S102: removing abnormal data from the displacement data, angle data, and visual sensor images of the front and rear eyes; S103: Time synchronization of the displacement data, the angle data, and the visual sensor images of the front and rear eyes, and generation of corresponding image timestamps; S104: performing dead reckoning based on the displacement data and the angle data to generate corresponding odometer data; S105: performing a dedistortion process on the visual sensor images of the front eye and the rear eye to generate visual images of the front eye and the rear eye; S2: restoring the scale of any one of the previous and next visual images through the odometer data and performing mapping to generate a corresponding first vehicle running trajectory and a first visual feature map; S3: restoring the scale of the other visual image in the front view and the back view through the running trajectory of the first vehicle and performing mapping to generate a corresponding second visual feature map; Step S3 specifically includes the following steps: S301: Perform pure visual initialization on the visual image; S302: Obtaining pure visual displacement between corresponding image frames through epipolar constraints; S303: searching for the corresponding first vehicle running track based on the image timestamp and performing displacement interpolation to obtain the real displacement between the corresponding image frames; S304: Calculate the mapping relationship between the pure visual displacement and the real displacement to restore the scale of the visual image; The following steps are involved in building a map: S311: constructing a map based on the scale-restored visual image to obtain corresponding three-dimensional feature points and visual poses; S312: adding the first vehicle running trajectory as a constraint to the optimization process of the visual posture; S313: Perform loop detection and global optimization on the visual posture to generate a corresponding second visual feature map; S4: fusing the first visual feature map and the second visual feature map to generate a fused visual feature map; S5: Matching the visual images of the preceding and / or succeeding objects and the feature points in the fused visual feature map to achieve relocation of the target vehicle in the fused visual feature map.
2. The vehicle positioning method based on monocular vision feature fusion as claimed in claim 1, characterized in that: In step S2, the following steps are specifically included: S201: Perform pure visual initialization on the visual image; S202: Obtaining a pure visual displacement between corresponding image frames through epipolar constraints; S203: performing displacement interpolation on the odometer data based on the image timestamp to obtain the actual displacement between corresponding image frames; S204: Calculate the mapping relationship between the pure visual displacement and the real displacement to restore the scale of the visual image.
3. The vehicle positioning method based on monocular vision feature fusion as claimed in claim 2, characterized in that: In step S2, the map building process includes the following steps: S211: constructing a map based on the scale-restored visual image to obtain corresponding three-dimensional feature points and visual poses; S212: Adding the odometer data as a constraint to the optimization process of the visual pose; S213: Perform loop detection and global optimization on the visual posture to generate a corresponding first vehicle running trajectory and a first visual feature map.
4. The vehicle positioning method based on monocular vision feature fusion as claimed in claim 3, characterized in that: In step S212, the pose change between corresponding image frames is obtained by visual odometer, and the displacement between corresponding image frames is constrained by interpolation displacement of three-dimensional feature points, image frame reprojection and odometer data.
5. The vehicle positioning method based on monocular vision feature fusion as claimed in claim 1, characterized in that: In step S5, the visual image of the rear target is used for positioning first, and when the rear target fails, the visual image of the front target is used for positioning.
6. The vehicle positioning method based on monocular vision feature fusion as claimed in claim 1, characterized in that: In step S5, the corresponding odometer data is added to achieve the relocation and position update of the target vehicle in the fused visual feature map.
7. A readable storage medium, characterized in that: A computer management program is stored thereon, and when the computer management program is executed by the processor, the steps of the vehicle positioning method based on monocular visual feature fusion as described in any one of claims 1 to 6 are implemented.
