Parking map construction method and device, equipment and storage medium
By employing a compact sliding window and multiple constraint factors in parking map construction, combined with IMU and wheel speed odometer observations, and optimizing keyframes and map points, the high computing power problem caused by large-scale optimization is solved, enabling effective deployment on low-computing-power platforms.
Patent Information
- Application Number
- CN202311848057.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-12-28
AI Technical Summary
Existing vision-based parking map construction methods require the design of large optimization keyframes and the scale of optimization map points to ensure optimization accuracy, resulting in high computing power consumption and making them unsuitable for deployment on low-computing-power platforms.
By employing a compact sliding window and multiple constraint factors, including visual constraints and trajectory estimation constraints, the keyframe pose and map point coordinates are optimized. The window size is reduced and combined with observations from IMU and wheel speed odometer to optimize errors and construct a parking map.
While ensuring optimization accuracy, the computational power requirement has been significantly reduced, enabling the parking map construction method to be deployed on low-computing-power platforms.
Smart Images

Figure CN117804428B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of driver assistance technology, and in particular to a parking map construction method, apparatus, device, and storage medium. Background Technology
[0002] In the field of driver assistance systems, the implementation of functions such as autonomous parking often requires a human to manually drive the vehicle to demonstrate the route. During this demonstration, the autonomous driving system continuously collects sensor information and builds a parking map. During the parking phase, once the vehicle reaches the starting point of the map, the autonomous driving system guides the vehicle to park in the designated space based on the existing parking map.
[0003] However, in order to ensure a certain level of optimization accuracy, vision-based parking map construction methods often require the design of large optimization keyframes and the scale of optimization map points during backend mapping optimization. This results in a significant consumption of computing power, making it difficult to deploy on low-computing-power platforms and limiting the application of vision-based map construction methods. Summary of the Invention
[0004] The main objective of this invention is to provide a parking map construction method, apparatus, device, and storage medium, aiming to solve the technical problem that related vision-based parking map construction methods often require the design of large optimization keyframes and the scale of optimization map points during backend mapping optimization in order to ensure a certain level of optimization accuracy. This results in a large consumption of computing power and is not conducive to deployment on low-computing-power platforms.
[0005] To achieve the above objectives, the present invention provides a parking map construction method, the parking map construction method comprising: Acquire keyframes and map points within a compact sliding window, wherein the window size of the compact sliding window is smaller than the window size of a preset regular sliding window, the keyframes include key images selected from multiple frames, the multiple frames include the most recent multiple frames obtained from the target site at the current time, and the map points include observable map points within the compact sliding window that can be observed by the keyframes, the observable map points include map points obtained by constructing coordinates based on the keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points; Based on the constraint factor, the keyframe pose of the keyframe and the map point coordinates of the map point are error-optimized to obtain the optimized keyframe pose and optimized map point coordinates. A target parking map of the target site is constructed based on the optimized keyframe pose and the optimized map point coordinates.
[0006] Optionally, the constraint factors include visual constraint factors and trajectory estimation constraint factors.
[0007] Optionally, the trajectory estimation constraint factor includes at least one of a first trajectory estimation constraint factor, a second trajectory estimation constraint factor, and a third trajectory estimation constraint factor. The first trajectory estimation constraint factor is the relative pose constraint between adjacent keyframes within the compact sliding window. The second trajectory estimation constraint factor is the relative pose constraint between the first keyframe and the last keyframe within the compact sliding window. The third trajectory estimation constraint factor is the absolute pose constraint between the first keyframe within the compact sliding window and the target keyframe outside the compact sliding window. The distance between the target keyframe and the compact sliding window is less than that between other keyframes outside the compact sliding window.
[0008] Optionally, the visual constraint factors include visual factor constraints to be optimized and target visual factor constraints. The visual factor constraints to be optimized are constraints that associate target map points and keyframes within the compact sliding window, and the residual form of the visual factor constraints to be optimized is reprojection error. The target visual factor constraints are visual factor constraints with fixed constraints, including a first target visual factor constraint and a second target visual factor constraint. The first target visual factor constraint is a constraint between map points outside the compact sliding window and keyframes within the compact sliding window, and the second target visual factor constraint is a constraint between keyframes outside the compact sliding window and target map points within the compact sliding window.
[0009] Optionally, the step of performing error optimization on the keyframe pose of the keyframe and the map point coordinates of the map point based on the constraint factor to obtain the optimized keyframe pose and optimized map point coordinates includes: The total number of times the map point is observed in all keyframes is counted, and target map points are selected from the map points based on the total number of observations. Based on the constraint factor, the keyframe pose of the keyframe and the map point coordinates of the target map point are optimized to obtain the optimized keyframe pose and optimized map point coordinates.
[0010] Optionally, constructing the target parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates includes: Construct the current parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates; Obtain other map points within the compact sliding window besides the target map point, wherein the target map point is a map point obtained by filtering based on the total number of times the map point is observed in all keyframes; Based on the optimized keyframe pose, the coordinates of the other map points are reconstructed to obtain the reconstructed map points. When a new multi-frame image is obtained from the target site, the step of obtaining keyframes and map points within the compact sliding window is returned until no new multi-frame image is obtained, and the current parking map is used as the target parking map for the target site.
[0011] Optionally, before acquiring the keyframes and map points within the compact sliding window, the method further includes: Obtain the current frame of the target site, and obtain the inertial measurement unit data and wheel speed odometer data corresponding to the current frame; Feature extraction is performed on the current frame to obtain feature point data of the current frame, and multi-sensor data fusion is performed on the inertial measurement unit data and the wheel speed odometer data to obtain the trajectory estimation pose data of the current frame. Determine if the system is in an initialized state; When the system is in an uninitialized state, determine whether the current frame meets the preset initialization conditions; When the current frame meets the preset initialization conditions, map points in the initial map corresponding to the target site are constructed based on the feature point data and trajectory estimation pose data of the current frame, and key frames are selected from the current frame.
[0012] Optionally, when the current frame satisfies the preset initialization condition, constructing map points in the initial map corresponding to the target site based on the feature point data and trajectory-based pose data of the current frame, and selecting keyframes from the current frame, includes: When the current frame meets the preset initialization conditions, feature point data of the current frame is matched with feature point data of the initialization frame to obtain the number of matches. The initialization frame is a historical frame that meets the preset initialization conditions. The two-frame spacing between the current frame and the initial frame is calculated based on the trajectory-inferred pose data of the current frame and the trajectory-inferred pose data of the initial frame. When the number of matches is greater than a preset number of matches threshold and the distance between the two frames is greater than a preset distance, the inter-frame pose between the current frame and the initial frame is calculated based on the trajectory-based pose data of the current frame and the trajectory-based pose data of the initial frame. Based on the inter-frame pose and the number of matches, map points in the initial map corresponding to the target site are constructed, and keyframes are selected from the current frame.
[0013] Optionally, when the system is in an uninitialized state, determining whether the current frame meets the preset initialization conditions includes... When the system is in an uninitialized state, the number of feature points in the current frame is obtained from the feature point data of the current frame, and it is determined that the number of feature points in the current frame is greater than a preset threshold to obtain a first judgment result. Determine that the trajectory estimation pose data of the current frame meets the preset reliability conditions, and obtain the second determination result; Based on the first judgment result and the second judgment result, determine whether the current frame meets the preset initialization conditions.
[0014] Optionally, after determining whether the system is in an initialized state, the method further includes: When the system is in an initialized state, the map points are associated with the current frame under the guidance of the trajectory estimation pose data, and key frames are selected from the current frame according to the association relationship. Map points in the initial map corresponding to the target site are constructed based on the keyframe poses of the keyframes.
[0015] Furthermore, to achieve the above objectives, the present invention also proposes a parking map construction device, the parking map construction device comprising: The acquisition module is used to acquire keyframes and map points within a compact sliding window. The window size of the compact sliding window is smaller than the window size of a preset regular sliding window. The keyframes include key images selected from multiple frames, which include the most recent multiple frames obtained from the target site. The map points include observable map points within the compact sliding window that can be observed by the keyframes. The observable map points include map points obtained by constructing coordinates based on the keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points. The optimization module is used to perform error optimization on the keyframe pose of the keyframe and the map point coordinates of the map point according to the constraint factor, so as to obtain the optimized keyframe pose and the optimized map point coordinates. The reconstruction module is used to construct a target parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates.
[0016] Furthermore, to achieve the above objectives, the present invention also proposes a parking map building device, which includes a memory, a processor, and a parking map building program stored in the memory and executable on the processor. The parking map building program is configured to implement the parking map building method described above.
[0017] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a parking map building program, which, when executed by a processor, implements the parking map building method as described above.
[0018] This invention discloses a method for acquiring keyframes and map points within a compact sliding window. The size of the compact sliding window is smaller than that of a preset conventional sliding window. Keyframes include key images selected from multiple frames, which include the most recent multiple frames obtained from the target site. Map points include observable map points within the compact sliding window that can be observed by the keyframes. Observable map points include map points obtained by constructing coordinates based on keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points. Error optimization is performed on the keyframe poses of the keyframes and the map point coordinates of the map points according to constraint factors to obtain optimized keyframe poses and optimized map point coordinates. A target parking map of the target site is constructed based on the optimized keyframe poses and optimized map point coordinates. Because this invention uses a sliding window with a reduced window size, combined with constraint factors under various measurements, it can effectively reduce the required computing power while ensuring optimization accuracy, thus facilitating the deployment of the parking map construction method on low-computing-power platforms. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the parking map construction device in the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the first embodiment of the parking map construction method of the present invention; Figure 3 This is a flowchart illustrating the second embodiment of the parking map construction method of the present invention; Figure 4 This is a flowchart illustrating the third embodiment of the parking map construction method of the present invention; Figure 5 This is a flowchart illustrating the fourth embodiment of the parking map construction method of the present invention; Figure 6 This is an overall mapping framework diagram of an embodiment of the parking map construction method of the present invention; Figure 7 This is a flowchart of the fast inter-frame initialization module processing in an embodiment of the parking map construction method of the present invention; Figure 8 This is a flowchart of the backend map building module processing in an embodiment of the parking map building method of the present invention; Figure 9 This is a specific scene diagram of an embodiment of the parking map construction method of the present invention; Figure 10 This is an optimization factor diagram of an embodiment of the parking map construction method of the present invention; Figure 11 This is a structural block diagram of the first embodiment of the parking map construction device of the present invention.
[0020] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0022] Reference Figure 1 , Figure 1 This is a schematic diagram of the parking map construction device structure in the hardware operating environment involved in the embodiments of the present invention.
[0023] like Figure 1 As shown, the parking map building device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen, and optionally, it may also include a standard wired interface or a wireless interface. In this invention, the wired interface of the user interface 1003 may be a USB interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (RAM) or a non-volatile memory (NVM), such as a disk storage device. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0024] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on parking map building equipment and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0025] like Figure 1 As shown, the memory 1005, which is identified as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a parking map construction program.
[0026] exist Figure 1In the parking map building device shown, the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; the user interface 1003 is mainly used to connect to the user device; the parking map building device calls the parking map building program stored in the memory 1005 through the processor 1001 and executes the parking map building method provided in this embodiment of the invention.
[0027] Based on the above hardware structure, an embodiment of the parking map construction method of the present invention is proposed.
[0028] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the parking map construction method of the present invention, which presents the first embodiment of the parking map construction method of the present invention.
[0029] It should be understood that in the field of assisted driving, the realization of functions such as autonomous parking often requires a human to manually drive the vehicle to demonstrate the route. During the demonstration, the autonomous driving system continuously collects sensor information and builds a parking map. In the parking phase, after the vehicle reaches the starting point of the map, the autonomous driving system guides the vehicle to park in the designated parking space based on the existing parking map.
[0030] In automotive systems, common sensors include wheel speed odometers, inertial measurement units (IMUs), global positioning systems (GPS), image sensors, millimeter-wave radar sensors, and lidar sensors. Among these, visual sensors contain a wealth of information and have a significant advantage in identifying identical locations, making them a crucial information source for parking map construction. However, due to the large amount of visual information, generating maps requires significant computational power. Wheel speed odometers and IMUs, on the other hand, are less susceptible to interference from environmental textures, providing accurate vehicle position and attitude information with lower computational requirements. However, they are prone to cumulative drift over time. This invention combines visual sensors, wheel speed odometers, and IMUs, using a multi-sensor fusion approach to achieve lightweight feature-point parking map construction.
[0031] This invention relates to a mapping method based on tight coupling of IMU, wheel velocities, and panoramic images. The Simultaneous Localization and Mapping (SLAM) system is divided into four modules: sensor data preprocessing, system initialization, front-end association, and local map construction. The sensor measurement data preprocessing module mainly performs feature point processing, feature point projection, IMU pre-integration calculation, and wheel velocities pre-integration calculation on the panoramic image. The initialization module performs panoramic vision initialization to obtain the initial pose, then aligns the wheel velocities and IMUs one by one, and performs joint adjustment optimization. The front-end association module is used to estimate the pose of the current frame and determine whether the current frame is a keyframe. The local map construction module is used to triangulate the matching points of the keyframes and perform joint adjustment based on panoramic vision, IMU, and wheel velocities observations to optimize map point coordinates and keyframe poses, while removing redundant frames and mismatched points. The related technologies address the following problems: using panoramic cameras to solve the problem of insufficient field of view; using IMUs to solve the problem of visual odometry data loss caused by extreme conditions such as severe lighting or texture loss; and using wheel speed odometry to solve the problem of observation drift of IMUs during uniform acceleration motion on a plane. SLAM refers to taking in sensor information (commonly visual images or LiDAR point clouds) and outputting the sensor's pose in real time to construct an environmental map. If the sensor's pose cannot be output in real time, it is usually referred to as a mapping method.
[0032] The following differences exist between related technologies and this application: 1. Different Protection Objectives: Related technologies address the issue of insufficient robustness of mapping algorithms in panoramic vision-based SLAM methods under conditions of rapid motion, lighting changes, and sparse texture. Therefore, they introduce panoramic camera observation, IMU observation, and wheeled odometry observation to improve the robustness of the mapping algorithm. This invention, however, addresses the computational burden of traditional pure vision-based SLAM mapping methods by employing fusion camera observation (e.g., fisheye camera, but not limited to specific camera types in this embodiment), IMU observation, and wheeled odometry observation.
[0033] 2. Different sensor usage methods: Related technologies combine IMU pre-integration observations, wheel speed odometer integration observations, and visual observations to construct a joint adjustment of the local map in the local map construction module. However, this invention uses Dead Reckoning (DR) measurements obtained by fusing IMU and wheel speed odometer data, along with visual observations, to construct the local map for joint adjustment. Because DR measurements are used instead of raw measurements, and because DR measurements are measurements obtained after fusing two sensors, they are less susceptible to the influence of a single abnormal observation from the IMU or wheel speed odometer. Furthermore, compared to related technologies, DR measurements do not introduce additional IMU bias optimization variables during the optimization process, resulting in fewer optimization variables and improved optimization efficiency to some extent. DR measurements refer to the pose output after fusing the raw measurements from the IMU and wheel speed odometer.
[0034] 3. There are differences in the implementation of optimized joint adjustment: Related technologies use the conventional sliding window optimization method, which directly optimizes keyframes and map points within the sliding window. However, considering the large computational power required for the implementation of conventional joint adjustment, this invention adopts two additional lightweight methods (a. optimizing only a portion of map points, and performing post-triangulation on the remaining map points; b. reducing the sliding window size and adding various motion constraints), which significantly reduces the computational power required compared to the methods of related technologies.
[0035] In this embodiment, the parking map construction method includes: Step S10: Obtain keyframes and map points within a compact sliding window. The window size of the compact sliding window is smaller than the window size of a preset regular sliding window. The keyframes include key images selected from multiple frames. The multiple frames include the most recent multiple frames obtained from the target site at the current time. The map points include observable map points within the compact sliding window that can be observed by the keyframes. The observable map points include map points obtained by constructing coordinates based on the keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points.
[0036] It is understood that the executing entity of this embodiment may be a parking map building device with data processing, network communication and program running functions, such as an autonomous driving device, or other electronic devices that can achieve the same or similar functions. This embodiment does not limit this.
[0037] It should be understood that this method takes into account the vehicle's motion during automatic parking, which is mainly forward movement with minimal frequent large-angle turns and reversing. Therefore, a sliding window scheme is used for bundle adjustment optimization. This invention employs a compact optimized sliding window combined with constraint factors that fuse vision and DR measurements, achieving the same optimization effect as conventional sliding windows while significantly reducing the required computational power. In conventional methods, reducing the sliding window size inevitably leads to a deterioration in optimization quality. This invention, while reducing the sliding window size, introduces additional DR constraint factors to achieve the same optimization effect as conventional sliding windows.
[0038] It should be noted that the preset regular sliding window can be set in advance, the target site can be the site where parking map construction is needed, and the key frame can be a key image selected from multiple frames of the target site. The specific selection method can be set in advance according to actual needs, and this embodiment does not limit it.
[0039] It should be understood that map points include observable map points that can be observed by keyframes within a compact sliding window. When the parking map is built in the first round, observable map points may include map points obtained by coordinate construction based on the most recent keyframes. When the parking map is not built in the first round, it may include map points obtained by coordinate construction based on the most recent keyframes, map points obtained by historical parking map construction, and / or reconstructed map points. Among them, map points obtained by historical parking map construction and / or reconstructed map points may be map points obtained by previous rounds and / or other rounds of parking map construction and / or reconstructed map points.
[0040] In the specific implementation, it is assumed that the map points obtained from the historical parking map construction and / or the reconstructed map points are the same as those obtained from the previous round of parking map construction. If no phased optimization was performed during the previous round of parking map construction, then the optimized map points obtained from the previous round of parking map construction are included. If phased optimization was performed during the previous round of parking map construction, then the optimized map points and the reconstructed map points obtained from the previous round of parking map construction are included. The phased optimization can be achieved by using two rounds of optimization to ensure the same optimization accuracy under low computing power. Specifically, it can be that only high-quality map points are optimized during the bundle adjustment optimization process, and non-high-quality map points are retriangulated using the optimized keyframe poses. The optimized map points can be the high-quality map points optimized during the bundle adjustment optimization process, and the reconstructed map points can be the map points obtained by retriangulating the non-high-quality map points using the optimized keyframe poses.
[0041] Step S20: Optimize the keyframe pose and map point coordinates of the keyframe and the map point according to the constraint factor to obtain the optimized keyframe pose and the optimized map point coordinates.
[0042] It is understandable that error optimization of keyframe pose and map point coordinates of keyframes based on constraint factors can be achieved by optimizing the keyframe pose and map point coordinates of keyframes using bundle adjustment based on constraint factors under multiple measurements. Bundle adjustment (BA) refers to the process of using the principles of photogrammetric geometry to project 3D coordinate points onto the image imaging plane using a projection beam, comparing it with the original feature point positions on the image, and minimizing the error, thereby obtaining more accurate 3D coordinate points and camera pose.
[0043] Furthermore, in order to further improve the optimization accuracy, the constraint factors include visual constraint factors and trajectory estimation constraint factors.
[0044] It is understandable that error optimization of the keyframe pose and map point coordinates of keyframes based on constraint factors can be achieved by optimizing the keyframe pose and map point coordinates of keyframes based on visual constraint factors and trajectory-derived constraint factors through bundle adjustment.
[0045] Furthermore, to effectively prevent the optimized variables from becoming disconnected from the previous map, the visual constraint factors include visual factor constraints to be optimized and target visual factor constraints. The visual factor constraints to be optimized are constraints that associate target map points and keyframes within the compact sliding window, and the residual form of the visual factor constraints to be optimized is reprojection error. The target visual factor constraints are visual factor constraints with fixed constraints, including a first target visual factor constraint and a second target visual factor constraint. The first target visual factor constraint is a constraint between map points outside the compact sliding window and keyframes within the compact sliding window, and the second target visual factor constraint is a constraint between keyframes outside the compact sliding window and target map points within the compact sliding window.
[0046] Furthermore, to alleviate the problem of deformation of the optimized keyframe trajectory over long distances and to mitigate the significant drift of the optimized keyframe pose within the sliding window compared to other parts of the map, the trajectory estimation constraint factor includes at least one of a first trajectory estimation constraint factor, a second trajectory estimation constraint factor, and a third trajectory estimation constraint factor. The first trajectory estimation constraint factor is the relative pose constraint between adjacent keyframes within the compact sliding window. The second trajectory estimation constraint factor is the relative pose constraint between the first and last keyframes within the compact sliding window. The third trajectory estimation constraint factor is the absolute pose constraint between the first keyframe within the compact sliding window and the target keyframe outside the compact sliding window. The distance between the target keyframe and the compact sliding window is less than that between other keyframes outside the compact sliding window.
[0047] In its implementation, this invention, while reducing the sliding window size, introduces additional DR constraint factors to achieve the same optimization effect as a conventional sliding window. Specifically, during the optimization process, keyframes are first divided into two categories: keyframes within the sliding window to be optimized, and keyframes outside the sliding window that do not participate in state estimation (their poses are not optimized), also known as fixed keyframes. Map points are also divided into three categories: high-quality map points within the sliding window, low-quality map points within the sliding window (not participating in optimization), and map points outside the sliding window (whose coordinates are not optimized). Although low-quality map points within the sliding window do not participate in optimization, their coordinates are often inaccurate because they were recently created and need re-triangulation for position adjustment. Then, the following three types of constraint factors are constructed: Visual Factor to be Optimized: This factor relates the high-quality map points within the sliding window to the keyframes within the sliding window, and uses the classic reprojection error as the residual form. Let the 3D coordinates of the high-quality map points be P, the pose of the keyframes within the sliding window be T, the camera intrinsic matrix be K, and the position of the 2D feature point corresponding to the map point seen on the keyframe within the sliding window be z. Then the reprojection error form is (where the variables to be optimized are P and T):
[0048] Visual factors with fixed constraints: These factors are divided into two categories. One category is the constraint between map points outside the sliding window (which do not participate in optimization) and keyframes inside the sliding window (i.e., the first target visual factor constraint). The other category is the constraint between keyframes outside the sliding window and high-quality map points inside the sliding window (i.e., the second target visual factor constraint). The addition of these two types of factors can effectively prevent the optimized variables from being disconnected from the previous map.
[0049] For the former, its optimization error edge is (where the variable to be optimized is T):
[0050] For the latter, its optimization error edge is (where the variable to be optimized is P):
[0051] Factors containing DR constraints (i.e., trajectory estimation constraint factors) are further divided into three categories: the first category is the DR factor between keyframes within the sliding window (i.e., the first trajectory estimation constraint factor); the second category is the long-distance pose constraint between the first and last keyframes within the sliding window (i.e., the second trajectory estimation constraint factor); and the third category is the absolute pose constraint between the first frame within the sliding window and the nearest keyframe outside the sliding window (i.e., the third trajectory estimation constraint factor).
[0052] For the first type of constraint, let the pose optimization variables of keyframe T2 be... The corresponding DR observations are The corresponding optimization error edge form is (where the variable to be optimized is ). and ):
[0053] For the second type of constraint, the corresponding optimization error edge form is as follows (where the variable to be optimized is...). Compared to the first type of constraint, it directly constrains the relationship between the poses of the first and last optimized keyframes, which can alleviate the problem of deformation of the optimized keyframe trajectory over long distances.
[0054]
[0055] For the third type of constraint, let the pose variable to be optimized in the first frame within the sliding window be... The pose of the keyframe closest to it in time outside the sliding window is The corresponding optimization error edge form is as follows (where the variable to be optimized is...). By directly linking the oldest frame inside the sliding window with the keyframe outside the sliding window, the problem of significant drift in the pose of the optimized keyframe inside the sliding window compared to other parts of the map can be effectively alleviated.
[0056]
[0057] By integrating visual observation and DR observation, and employing the above six types of residual factors, this invention can maintain similar accuracy to conventional sliding windows while reducing the sliding window size, and at the same time greatly improve efficiency.
[0058] Step S30: Construct a target parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates.
[0059] It is understood that constructing a target parking map of the target site based on the optimized keyframe pose and optimized map point coordinates can be achieved by constructing the target parking map of the target site using a preset map construction model. The preset map construction model can be pre-set, and this embodiment does not impose any restrictions on it.
[0060] In this embodiment, keyframes and map points within a compact sliding window are disclosed. The size of the compact sliding window is smaller than that of a preset conventional sliding window. Keyframes include key images selected from multiple frames, which include the most recent multiple frames obtained from the target site. Map points include observable map points within the compact sliding window that can be observed by the keyframes. Observable map points include map points obtained by constructing coordinates based on keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points. Error optimization is performed on the keyframe poses of the keyframes and the map point coordinates of the map points according to constraint factors to obtain optimized keyframe poses and optimized map point coordinates. A target parking map of the target site is constructed based on the optimized keyframe poses and optimized map point coordinates. Because this embodiment uses a sliding window with a reduced window size, combined with constraint factors under various measurements, it can effectively reduce the required computing power while ensuring optimization accuracy, thus facilitating the deployment of the parking map construction method on low-computing-power platforms.
[0061] Reference Figure 3 , Figure 3 This is a flowchart illustrating the second embodiment of the parking map construction method of the present invention, based on the above. Figure 2 The first embodiment shown presents a second embodiment of the parking map construction method of the present invention.
[0062] In the second embodiment, step S20 includes: Step S201: Count the total number of times the map point is observed in all keyframes, and filter the target map points from the map points according to the total number of observations.
[0063] It should be understood that in this embodiment, only high-quality map points are optimized during the bundle adjustment optimization process, thereby further reducing the required computational power. The target map point can be a high-quality map point; in this embodiment, the target map point is selected from the map points based on the total number of times the map point is observed in all keyframes.
[0064] Step S202: Optimize the keyframe pose and the map point coordinates of the target map point according to the constraint factor to obtain the optimized keyframe pose and the optimized map point coordinates.
[0065] In specific implementation, for example, considering that the number of keyframes and map points directly determines the optimization scale and computing power requirements, this invention only selects high-quality map points from M map points to participate in the optimization process. The selection method is to determine the number of times a map point is seen by keyframes. That is, if a map point is seen by more keyframes, it is determined to be a high-quality map point. Then, the N keyframes and high-quality map points in the sliding window, as well as the DR observation data of each keyframe, are sent to the optimizer to perform bundle adjustment optimization to obtain the optimized keyframe pose and the optimized map point coordinates.
[0066] In this embodiment, only high-quality map points are optimized during the bundle adjustment process, thereby further reducing the required computing power.
[0067] Reference Figure 4 , Figure 4 This is a flowchart illustrating the third embodiment of the parking map construction method of the present invention, based on the above. Figure 2 The first embodiment shown presents a third embodiment of the parking map construction method of the present invention.
[0068] In the third embodiment, step S30 includes: Step S301: Construct the current parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates.
[0069] It should be understood that the relevant technology first uses conventional bundle adjustment to perform a first round of optimization in the local map construction module. Then, based on the optimized keyframe pose and map point coordinates, it obtains the relationship matrix between the errors of these two values. Next, it constructs an optimization model based on this relationship matrix to perform a second optimization on the optimized map points, resulting in more accurate map points. The problem this technology addresses is the high error rate of map point coordinates during bundle adjustment.
[0070] The related technologies differ from this application in the following ways: they address different problems and provide different solutions. Related technologies address the issue of high errors in map point coordinates during the classical bundle adjustment optimization process, thus improving the final accuracy of map point coordinates through a two-round optimization approach. In contrast, this invention addresses the problem of time-consuming bundle adjustment optimization, employing a staged optimization approach to reduce the total optimization time while maintaining accuracy.
[0071] Step S302: Obtain other map points within the compact sliding window besides the target map point, wherein the target map point is a map point obtained by filtering based on the total number of times the map point is observed in all keyframes.
[0072] It is understandable that, compared with related technologies, this embodiment adopts a phased optimization method, which optimizes only high-quality map points (i.e. target map points) during the bundle adjustment optimization process, and retriangulates non-high-quality map points using the optimized keyframe pose, effectively reducing the computational power requirement for optimization.
[0073] Step S303: Based on the optimized keyframe pose, reconstruct the coordinates of the other map points to obtain the reconstructed map points.
[0074] In the specific implementation, map points that are not selected as high-quality points in the sliding window are retriangulated to obtain more accurate map point coordinates. This method, which only selects a portion of map points for optimization and retriangulates the unoptimized map points, saves more computing power than conventional methods while ensuring the same accuracy.
[0075] Step S304: When a new multi-frame image is obtained from the target site, return to the step of obtaining keyframes and map points within the compact sliding window until no new multi-frame image is obtained, and use the current parking map as the target parking map of the target site.
[0076] In this embodiment, a phased optimization method is adopted. During the bundle adjustment optimization process, only high-quality map points are optimized. Non-high-quality map points are retriangulated using the optimized keyframe poses. The optimized and reconstructed map points are then used for the next round of map construction, thereby effectively reducing the computational power requirements for optimization.
[0077] Reference Figure 5 , Figure 5 This is a flowchart illustrating the fourth embodiment of the parking map construction method of the present invention, based on the above. Figure 2 The first embodiment shown presents a fourth embodiment of the parking map construction method of the present invention.
[0078] In the fourth embodiment, before step S10, the method further includes: Step S01: Obtain the current frame of the target site, and obtain the inertial measurement unit data and wheel speed odometer data corresponding to the current frame.
[0079] It should be understood that in this embodiment, the joint adjustment of the local map is achieved by using DR measurements obtained from the fusion of IMU and wheel speed odometer, combined with visual observations. Since DR measurements are used instead of the original measurements, and because DR measurements are measurements obtained after the fusion of two sensors, they are less susceptible to the influence of individual abnormal observations from the IMU or wheel speed odometer. Furthermore, compared to related technologies, DR measurements do not introduce additional IMU bias optimization variables during the optimization process, resulting in fewer optimization variables and improved optimization efficiency to some extent. DR measurements refer to the pose output after fusing the original measurements from the IMU and wheel speed odometer.
[0080] It is understood that in this embodiment, the parking map building device can integrate multiple sensors, and the parking map building device can also acquire data through additional sensors, including but not limited to surround-view cameras, IMUs, and wheel speed odometers. In a specific implementation, the surround-view camera acquires the current frame of the target site, the IMU acquires the inertial measurement unit data corresponding to the current frame, and the wheel speed odometer acquires the wheel speed odometer data corresponding to the current frame.
[0081] Step S02: Extract features from the current frame to obtain feature point data of the current frame, and perform multi-sensor data fusion on the inertial measurement unit data and the wheel speed odometer data to obtain the trajectory estimation pose data of the current frame.
[0082] It should be understood that obtaining the trajectory-based pose data for the current frame by fusing multi-sensor data from inertial measurement unit (IMU) data and wheel speed-odometer (WSO) data can be achieved through extended Kalman filtering (EKF). In specific implementations, for example, the EKF method can be used to fuse IMU and WSO data to generate a 6-DOF vehicle pose (which, without visual constraints, will gradually deteriorate over time). This vehicle pose is also referred to as DR pose data.
[0083] Step S03: Determine whether the system is in an initialized state.
[0084] It is understandable that determining whether the system is in an initialized state can be done by determining whether the parking map building device is in an initialized state. Specifically, this can be done by using a status identifier to determine whether the parking map building device is in an initialized state. The status identifier is used to indicate the system status of the parking map building device, which indicates the state of the parking map building device when it is building the parking map.
[0085] Furthermore, in order to directly guide the association when the system is in an initialized state, after step S03, the method further includes: when the system is in an initialized state, associating the map points with the current frame under the guidance of the trajectory estimation pose data, and selecting key frames from the current frame according to the association relationship; and constructing map points in the initial map corresponding to the target site based on the key frame pose of the key frames.
[0086] Understandably, in this embodiment, when the system is in an initialized state, map points are associated with the current frame under the guidance of trajectory-based pose data, and keyframes are selected from the current frame based on the association relationship. Map points in the initial map corresponding to the target site are constructed based on the keyframe poses, thus enabling direct association guidance when the system is in an initialized state. In a specific implementation, for example, a DR-guided projection method is used to complete the 3D-2D association between 3D map points in the map and the current real-time frame, and some real-time frames are selected as keyframes. Step S04: When the system is in an uninitialized state, determine whether the current frame meets the preset initialization conditions.
[0087] Understandably, in order to select the current frame with higher accuracy for initialization and improve the reliability of key frames and map points, this embodiment also needs to determine whether the current frame meets the preset initialization conditions. Only when the current frame meets the preset initialization conditions can the map points in the initial map corresponding to the target site be constructed based on the feature point data and trajectory inference pose data of the current frame, and key frames be selected from the current frame.
[0088] Furthermore, in order to more accurately determine whether the current frame meets the preset initialization conditions, step S04 includes: when the system is in an uninitialized state, obtaining the number of feature points of the current frame from the feature point data of the current frame, and determining that the number of feature points of the current frame is greater than a preset threshold to obtain a first judgment result; determining that the trajectory estimation pose data of the current frame meets the preset reliability conditions to obtain a second judgment result; and determining whether the current frame meets the preset initialization conditions based on the first judgment result and the second judgment result.
[0089] It should be understood that determining whether the current frame meets the preset initialization conditions based on the first and second judgment results can be done as follows: if the number of feature points in the current frame is greater than a preset threshold and the trajectory-based pose data of the current frame meets the preset reliability conditions, the current frame is determined to meet the preset initialization conditions; if the number of feature points in the current frame is less than or equal to the preset threshold, or the trajectory-based pose data of the current frame does not meet the preset reliability conditions, the current frame is determined not to meet the preset initialization conditions. Since in this embodiment, initialization is performed when the number of feature points in the current frame is greater than the preset threshold and the trajectory-based pose data of the current frame meets the preset reliability conditions, the initialization effect can be improved, thereby improving the accuracy of map points.
[0090] Step S05: When the current frame meets the preset initialization conditions, construct map points in the initial map corresponding to the target site based on the feature point data and trajectory estimation pose data of the current frame, and select key frames from the current frame.
[0091] It is understandable that, in order to obtain a more accurate current frame for initialization when the current frame does not meet the preset initialization conditions, this embodiment may continue to wait for the arrival of a new frame.
[0092] It should be understood that constructing map points in the initial map corresponding to the target site based on the feature point data and trajectory-based pose data of the current frame can be achieved by performing feature matching between the feature point data of the current frame and the feature point data of the initialization frame when the current frame meets the preset initialization conditions, obtaining the number of matches, and the initialization frame being a historical frame that meets the preset initialization conditions; calculating the two-frame distance between the current frame and the initialization frame based on the trajectory-based pose data of the current frame and the trajectory-based pose data of the initialization frame; calculating the inter-frame pose between the current frame and the initialization frame based on the trajectory-based pose data of the current frame and the trajectory-based pose data of the initialization frame when the number of matches is greater than a preset matching number threshold and the two-frame distance is greater than a preset distance; constructing map points in the initial map corresponding to the target site based on the inter-frame pose and the number of matches, and selecting keyframes from the current frame. Of course, in this embodiment, if there is no initialization frame, the current frame can also be used as the initialization frame when the current frame meets the preset initialization conditions, and this embodiment does not limit this. In addition, in this embodiment, after completing the initialization in step S05, the system can also be set to an initialized state so that subsequent direct guidance association can be performed.
[0093] In the specific implementation, for example, firstly, based on the input data, it is determined whether the number of feature points in the current frame is greater than a certain threshold, and whether the DR pose data of the current frame is reliable. If both are satisfied, the current frame is set as the initialization frame. When a new frame is input, and both of the above conditions are met, feature matching is performed between the new frame and the initialization frame to obtain the number of matches. At the same time, the distance between the two frames is calculated based on the DR pose data of the new frame and the initialization frame. If the number of matches is greater than a certain threshold and the distance between the two frames is greater than a certain threshold, the new frame and the initialization frame are sent into the initialization process; otherwise, the new frame is discarded, and the process waits for a new real-time frame that meets the conditions to arrive. The subsequent initialization process is to calculate the inter-frame pose of the two initialization frames (the new frame and the initialization frame) based on the DR pose data, and then use the inter-frame pose and the matching information of the two frames to recover the 3D points (i.e., map points in the initial map) using a triangulation method to complete the initialization process. Compared with related technologies, this eliminates the complex IMU and wheel speed odometer initialization process, and directly performs surround camera triangulation based on DR observations, making the process more streamlined and therefore more efficient.
[0094] This embodiment uses DR measurement instead of the original measurement. Since DR measurement is a measurement after the fusion of two sensors, it is less susceptible to the influence of a single abnormal observation of the IMU or wheel speed odometer. In addition, compared with related technologies, DR measurement does not introduce additional IMU bias optimization variables during the optimization process, so there are fewer optimization variables, which improves the optimization efficiency to a certain extent.
[0095] For ease of understanding, please refer to Figure 6 This description is provided but does not limit the scope of the invention. Figure 6 This is an overall mapping framework diagram of an embodiment of the parking map construction method of the present invention. In the diagram, the entire feature point map (i.e., parking map) construction method is divided into four parts: sensor data preprocessing, fast inter-frame initialization, front-end association, and back-end map construction. Among them, the feature point map refers to a map constructed using a visual sensor by extracting feature points from the image and associating them using descriptors of the feature points.
[0096] The sensor data preprocessing module is responsible for feature extraction from the surround view images received by the parking system's surround view camera. The EKF method is used to fuse IMU data and wheel speed odometer data to generate a 6-DOF (Degree of Freedom, DoF) vehicle pose (this pose deteriorates rapidly over time without visual constraints), which is also known as DR data.
[0097] For ease of understanding, please also refer to Figure 7 This description is provided but does not limit the scope of the invention. Figure 7This is a flowchart of the fast inter-frame initialization module in an embodiment of the parking map construction method of the present invention. In the flowchart, the fast inter-frame initialization module is responsible for performing visual initialization guided by traffic flow (DR) using the input frame-by-frame feature point data and the corresponding frame-by-frame DR pose data. The specific process is as follows: First, based on the input data, it is determined whether the number of feature points in the current frame is greater than a certain threshold, and whether the DR pose data of the current frame is reliable. If both conditions are met, the current frame is set as the initialization frame. When a new frame is input and both conditions are met, feature matching is performed between the new frame and the initialization frame to obtain the number of matches. Simultaneously, the distance between the two frames is calculated based on the DR pose data of the new frame and the initialization frame. If the number of matches is greater than a certain threshold and the distance between the two frames is greater than a certain threshold, the new frame and the initialization frame are sent into the initialization process; otherwise, the new frame is discarded, and the system waits for a new real-time frame that meets the conditions. The subsequent initialization process is to calculate the inter-frame pose of the two initial frames (new frame and initialization frame) based on the DR pose data, and then use the inter-frame pose and the matching information of the two frames to recover the 3D points (i.e. the map points in the initial map) using the triangulation method to complete the initialization process. (Compared with related technologies, it eliminates the complicated IMU and wheel speed odometer initialization process, and directly performs surround camera triangulation based on DR observations, making the process more streamlined and therefore more efficient.)
[0098] The front-end association module is mainly responsible for completing the association of real-time frame features. It uses the DR-guided projection method to complete the 3D-2D association between 3D map points in the map and the current real-time frame, and selects some real-time frames as key frames to send to the back-end mapping thread.
[0099] For ease of understanding, please also refer to Figure 8 , Figure 9 as well as Figure 10 This description is provided but does not limit the scope of the invention. Figure 8 This is a flowchart of the backend map building module processing in an embodiment of the parking map building method of the present invention. Figure 9 This is a specific scene diagram of an embodiment of the parking map construction method of the present invention. Figure 10 This is an optimization factor diagram of an embodiment of the parking map construction method of the present invention. The optimization factor diagram is a diagram that describes the optimization variables and optimization relationships in the optimization process, that is, which variables need to be optimized (marked as vertices in the diagram) and which relationships between variables need to be satisfied as well as possible in the optimization process (marked as line segments in the diagram).
[0100] The backend map building module is primarily responsible for performing bundle adjustment on 3D map points and keyframes to obtain more accurate keyframe poses and 3D map point coordinates. This part requires significant computing power; therefore, this invention focuses on lightweight improvements. The improved process is as follows: Figure 8 As shown.
[0101] This invention considers the vehicle's motion pattern, primarily forward movement with minimal sharp turns and reversing, and therefore employs a sliding window approach for bundle adjustment optimization. First, the most recent N keyframes within the sliding window and the M map points visible from those keyframes are collected. Given that the number of keyframes and map points directly determines the optimization scale and computational requirements, this invention selects only high-quality map points from the M map points for optimization. The selection method involves determining the number of keyframes that each map point is seen by; if a map point is seen by more keyframes, it is considered a high-quality map point. Then, the N keyframes within the sliding window, the high-quality map points, and the DR observation data for each keyframe are fed into the optimizer for bundle adjustment optimization, yielding optimized keyframe poses and optimized map point coordinates. Subsequently, map points not selected as high-quality points in the sliding window are re-triangulated to obtain more accurate map point coordinates. (This method of selecting only a subset of map points for optimization and re-triangulating unoptimized map points saves computational power compared to conventional methods while maintaining the same accuracy.)
[0102] like Figure 10 As shown, this invention employs a compact optimized sliding window combined with constraint factors that fuse vision and DR measurements, achieving the same optimization effect as a conventional sliding window while significantly reducing the required computational power. In conventional methods, reducing the sliding window size inevitably leads to a deterioration in optimization quality. This invention, while reducing the sliding window size, introduces additional DR constraint factors to achieve the same optimization effect as a conventional sliding window. Specifically, during the optimization process, keyframes are first divided into two categories: keyframes to be optimized within the sliding window and keyframes for state estimation outside the sliding window (whose poses are not included in the optimization). Map points are also divided into three categories: high-quality map points within the sliding window, low-quality map points within the sliding window (not included in the optimization), and map points outside the sliding window (whose coordinates are not included in the optimization). Then, the following three types of constraint factors are constructed: Visual Factor to be Optimized: This factor relates the high-quality map points within the sliding window to the keyframes within the sliding window, and uses the classic reprojection error as the residual form. Let the 3D coordinates of the high-quality map points be P, the pose of the keyframes within the sliding window be T, the camera intrinsic matrix be K, and the position of the 2D feature point corresponding to the map point seen on the keyframe within the sliding window be z. Then the reprojection error form is (where the variables to be optimized are P and T):
[0103] Visual factors with fixed constraints: These factors are divided into two categories. One category is the constraint between map points outside the sliding window (which do not participate in optimization) and keyframes inside the sliding window (i.e., the first target visual factor constraint). The other category is the constraint between keyframes outside the sliding window and high-quality map points inside the sliding window (i.e., the second target visual factor constraint). The addition of these two types of factors can effectively prevent the optimized variables from being disconnected from the previous map.
[0104] For the former, its optimization error edge is (where the variable to be optimized is T):
[0105] For the latter, its optimization error edge is (where the variable to be optimized is P):
[0106] Factors containing DR constraints (i.e., trajectory estimation constraint factors) are further divided into three categories: the first category is the DR factor between keyframes within the sliding window (i.e., the first trajectory estimation constraint factor); the second category is the long-distance pose constraint between the first and last keyframes within the sliding window (i.e., the second trajectory estimation constraint factor); and the third category is the absolute pose constraint between the first frame within the sliding window and the nearest keyframe outside the sliding window (i.e., the third trajectory estimation constraint factor).
[0107] For the first type of constraint, let the pose optimization variables of keyframe T2 be... The corresponding DR observations are The corresponding optimization error edge form is (where the variable to be optimized is ). )
[0108] For the second type of constraint, the corresponding optimization error edge form is as follows (where the variable to be optimized is...). Compared to the first type of constraint, it directly constrains the relationship between the poses of the first and last optimized keyframes, which can alleviate the problem of deformation of the optimized keyframe trajectory over long distances.
[0109]
[0110] For the third type of constraint, let the pose variable to be optimized in the first frame within the sliding window be... The pose of the keyframe closest to it in time outside the sliding window is The corresponding optimization error edge form is as follows (where the variable to be optimized is...). By directly linking the oldest frame inside the sliding window with the keyframe outside the sliding window, the problem of significant drift in the pose of the optimized keyframe inside the sliding window compared to other parts of the map can be effectively alleviated.
[0111]
[0112] By integrating visual observation and DR observation, and employing the above six types of residual factors, this invention can maintain similar accuracy to conventional sliding windows while reducing the sliding window size, and at the same time greatly improve efficiency.
[0113] In addition, refer to Figure 11The present invention also proposes a parking map construction device, the parking map construction device comprising: The acquisition module 10 is used to acquire keyframes and map points within a compact sliding window. The window size of the compact sliding window is smaller than the window size of a preset regular sliding window. The keyframes include key images selected from multiple frames. The multiple frames include the most recent multiple frames obtained from the target site. The map points include observable map points within the compact sliding window that can be observed by the keyframes. The observable map points include map points obtained by constructing coordinates based on the keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points. Optimization module 20 is used to perform error optimization on the key frame pose of the key frame and the map point coordinates of the map point according to the constraint factor, so as to obtain the optimized key frame pose and the optimized map point coordinates. The reconstruction module 30 is used to construct a target parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates.
[0114] In this embodiment, keyframes and map points within a compact sliding window are disclosed. The size of the compact sliding window is smaller than that of a preset conventional sliding window. Keyframes include key images selected from multiple frames, which include the most recent multiple frames obtained from the target site. Map points include observable map points within the compact sliding window that can be observed by the keyframes. Observable map points include map points obtained by constructing coordinates based on keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points. Error optimization is performed on the keyframe poses of the keyframes and the map point coordinates of the map points according to constraint factors to obtain optimized keyframe poses and optimized map point coordinates. A target parking map of the target site is constructed based on the optimized keyframe poses and optimized map point coordinates. Because this embodiment uses a sliding window with a reduced window size, combined with constraint factors under various measurements, it can effectively reduce the required computing power while ensuring optimization accuracy, thus facilitating the deployment of the parking map construction method on low-computing-power platforms.
[0115] In one embodiment, the constraint factors include visual constraint factors and trajectory estimation constraint factors.
[0116] In one embodiment, the trajectory estimation constraint factor includes at least one of a first trajectory estimation constraint factor, a second trajectory estimation constraint factor, and a third trajectory estimation constraint factor. The first trajectory estimation constraint factor is the relative pose constraint between adjacent keyframes within the compact sliding window. The second trajectory estimation constraint factor is the relative pose constraint between the first keyframe and the last keyframe within the compact sliding window. The third trajectory estimation constraint factor is the absolute pose constraint between the first keyframe within the compact sliding window and the target keyframe outside the compact sliding window. The distance between the target keyframe and the compact sliding window is less than that between other keyframes outside the compact sliding window.
[0117] In one embodiment, the visual constraint factors include visual factor constraints to be optimized and target visual factor constraints. The visual factor constraints to be optimized are constraints that associate target map points and keyframes within the compact sliding window, and the residual form of the visual factor constraints to be optimized is reprojection error. The target visual factor constraints are visual factor constraints with fixed constraints, including a first target visual factor constraint and a second target visual factor constraint. The first target visual factor constraint is a constraint between map points outside the compact sliding window and keyframes within the compact sliding window, and the second target visual factor constraint is a constraint between keyframes outside the compact sliding window and target map points within the compact sliding window.
[0118] In one embodiment, the optimization module 20 is further configured to count the total number of times the map point is observed in all keyframes, and filter target map points from the map points according to the total number of observations; and perform error optimization on the keyframe pose of the keyframe and the map point coordinates of the target map point according to the constraint factor to obtain the optimized keyframe pose and the optimized map point coordinates.
[0119] In one embodiment, the reconstruction module 30 is further configured to: construct a current parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates; acquire other map points within the compact sliding window besides the target map point, wherein the target map point is a map point obtained by filtering based on the total number of times the map point is observed in all keyframes; reconstruct the coordinates of the other map points based on the optimized keyframe pose to obtain reconstructed map points; and when a new multi-frame image is obtained from the target site, return to the step of acquiring the keyframes and map points within the compact sliding window until no new multi-frame image is obtained, and use the current parking map as the target parking map of the target site.
[0120] In one embodiment, the parking map building device further includes: The module is used to acquire the current frame of the target site and acquire the inertial measurement unit data and wheel speed odometer data corresponding to the current frame; perform feature extraction on the current frame to obtain feature point data of the current frame, and perform multi-sensor data fusion on the inertial measurement unit data and the wheel speed odometer data to obtain the trajectory estimation pose data of the current frame; determine whether the system is in an initialized state; when the system is in an uninitialized state, determine whether the current frame meets the preset initialization conditions; when the current frame meets the preset initialization conditions, construct map points in the initial map corresponding to the target site based on the feature point data and trajectory estimation pose data of the current frame, and select keyframes from the current frame.
[0121] In one embodiment, the construction module is further configured to: when the current frame satisfies the preset initialization conditions, perform feature matching between the feature point data of the current frame and the feature point data of the initialization frame to obtain a matching number, wherein the initialization frame is a historical frame that satisfies the preset initialization conditions; calculate the two-frame spacing between the current frame and the initialization frame based on the trajectory-estimated pose data of the current frame and the trajectory-estimated pose data of the initialization frame; when the matching number is greater than a preset matching number threshold and the two-frame spacing is greater than a preset distance, calculate the inter-frame pose between the current frame and the initialization frame based on the trajectory-estimated pose data of the current frame and the trajectory-estimated pose data of the initialization frame; construct map points in the initial map corresponding to the target site based on the inter-frame pose and the matching number, and select keyframes from the current frame.
[0122] In one embodiment, the construction module is further configured to, when the system is in an uninitialized state, obtain the number of feature points of the current frame from the feature point data of the current frame, and determine that the number of feature points of the current frame is greater than a preset threshold to obtain a first judgment result; determine that the trajectory estimation pose data of the current frame meets a preset reliability condition to obtain a second judgment result; and determine whether the current frame meets the preset initialization condition based on the first judgment result and the second judgment result.
[0123] In one embodiment, the construction module is further configured to, when the system is in an initialized state, associate the map points with the current frame under the guidance of the trajectory estimation pose data, and select key frames from the current frame according to the association relationship; and construct map points in the initial map corresponding to the target site based on the key frame pose of the key frames.
[0124] Other embodiments or specific implementations of the parking map construction device of the present invention can be referred to the above-described method embodiments, and will not be repeated here.
[0125] Furthermore, this embodiment of the invention also proposes a storage medium storing a parking map building program, which, when executed by a processor, implements the parking map building method as described above.
[0126] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0127] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory image (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0129] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A parking map construction method, characterized in that, The parking map construction method includes: Acquire keyframes and map points within a compact sliding window, wherein the window size of the compact sliding window is smaller than the window size of a preset regular sliding window, the keyframes include key images selected from multiple frames, the multiple frames include the most recent multiple frames obtained from the target site at the current time, and the map points include observable map points within the compact sliding window that can be observed by the keyframes, the observable map points include map points obtained by constructing coordinates based on the keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points; The keyframe pose and map point coordinates of the keyframe are optimized based on the constraint factors to obtain the optimized keyframe pose and optimized map point coordinates. The constraint factors include visual constraint factors and trajectory estimation constraint factors. The trajectory estimation constraint factors are constraint factors for DR measurement fusion. DR measurement is the pose output after fusion of the original measurements from the inertial measurement unit and wheel speed odometer. Construct a target parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates; The trajectory estimation constraint factor includes at least one of a first trajectory estimation constraint factor, a second trajectory estimation constraint factor, and a third trajectory estimation constraint factor. The first trajectory estimation constraint factor is the relative pose constraint between adjacent keyframes within the compact sliding window. The second trajectory estimation constraint factor is the relative pose constraint between the first keyframe and the last keyframe within the compact sliding window. The third trajectory estimation constraint factor is the absolute pose constraint between the first keyframe within the compact sliding window and the target keyframe outside the compact sliding window. The distance between the target keyframe and the compact sliding window is less than that between other keyframes outside the compact sliding window. The visual constraint factors include visual factor constraints to be optimized and target visual factor constraints. The visual factor constraints to be optimized are constraints that associate target map points and keyframes within the compact sliding window, and the residual form of the visual factor constraints to be optimized is reprojection error. The target visual factor constraints are visual factor constraints with fixed constraints, including a first target visual factor constraint and a second target visual factor constraint. The first target visual factor constraint is a constraint between map points outside the compact sliding window and keyframes within the compact sliding window, and the second target visual factor constraint is a constraint between keyframes outside the compact sliding window and target map points within the compact sliding window.
2. The parking map construction method as described in claim 1, characterized in that, The step of optimizing the keyframe pose and map point coordinates of the keyframe based on constraint factors to obtain optimized keyframe pose and optimized map point coordinates includes: The total number of times the map point is observed in all keyframes is counted, and target map points are selected from the map points based on the total number of observations. Based on the constraint factor, the keyframe pose of the keyframe and the map point coordinates of the target map point are optimized to obtain the optimized keyframe pose and optimized map point coordinates.
3. The parking map construction method as described in claim 1, characterized in that, The construction of the target parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates includes: Construct the current parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates; Obtain other map points within the compact sliding window besides the target map point, wherein the target map point is a map point obtained by filtering based on the total number of times the map point is observed in all keyframes; Based on the optimized keyframe pose, the coordinates of the other map points are reconstructed to obtain the reconstructed map points. When a new multi-frame image is obtained from the target site, the step of obtaining keyframes and map points within the compact sliding window is returned until no new multi-frame image is obtained, and the current parking map is used as the target parking map for the target site.
4. The parking map construction method as described in claim 1, characterized in that, Before acquiring the keyframes and map points within the compact sliding window, the process also includes: Obtain the current frame of the target site, and obtain the inertial measurement unit data and wheel speed odometer data corresponding to the current frame; Feature extraction is performed on the current frame to obtain feature point data of the current frame, and multi-sensor data fusion is performed on the inertial measurement unit data and the wheel speed odometer data to obtain the trajectory estimation pose data of the current frame. Determine if the system is in an initialized state; When the system is in an uninitialized state, determine whether the current frame meets the preset initialization conditions; When the current frame meets the preset initialization conditions, map points in the initial map corresponding to the target site are constructed based on the feature point data and trajectory estimation pose data of the current frame, and key frames are selected from the current frame.
5. The parking map construction method as described in claim 4, characterized in that, When the current frame satisfies the preset initialization conditions, the process involves constructing map points in the initial map corresponding to the target site based on the feature point data and trajectory-based pose data of the current frame, and selecting keyframes from the current frame, including: When the current frame meets the preset initialization conditions, feature point data of the current frame is matched with feature point data of the initialization frame to obtain the number of matches. The initialization frame is a historical frame that meets the preset initialization conditions. The two-frame spacing between the current frame and the initial frame is calculated based on the trajectory-inferred pose data of the current frame and the trajectory-inferred pose data of the initial frame. When the number of matches is greater than a preset number of matches threshold and the distance between the two frames is greater than a preset distance, the inter-frame pose between the current frame and the initial frame is calculated based on the trajectory-based pose data of the current frame and the trajectory-based pose data of the initial frame. Based on the inter-frame pose and the number of matches, map points in the initial map corresponding to the target site are constructed, and keyframes are selected from the current frame.
6. The parking map construction method as described in claim 4, characterized in that, When the system is in an uninitialized state, determining whether the current frame meets the preset initialization conditions includes... When the system is in an uninitialized state, the number of feature points in the current frame is obtained from the feature point data of the current frame, and it is determined that the number of feature points in the current frame is greater than a preset threshold to obtain a first judgment result. Determine that the trajectory estimation pose data of the current frame meets the preset reliability conditions, and obtain the second determination result; Based on the first judgment result and the second judgment result, determine whether the current frame meets the preset initialization conditions.
7. The parking map construction method as described in claim 4, characterized in that, After determining whether the system is in an initialized state, the method further includes: When the system is in an initialized state, the map points are associated with the current frame under the guidance of the trajectory estimation pose data, and key frames are selected from the current frame according to the association relationship. Map points in the initial map corresponding to the target site are constructed based on the keyframe poses of the keyframes.
8. A parking map construction device, characterized in that, The parking map building device includes: The acquisition module is used to acquire keyframes and map points within a compact sliding window. The window size of the compact sliding window is smaller than the window size of a preset regular sliding window. The keyframes include key images selected from multiple frames, which include the most recent multiple frames obtained from the target site. The map points include observable map points within the compact sliding window that can be observed by the keyframes. The observable map points include map points obtained by constructing coordinates based on the keyframes, and / or map points obtained by constructing historical parking maps and / or reconstructed map points. The optimization module is used to optimize the keyframe pose and map point coordinates of the keyframe based on the constraint factors to obtain the optimized keyframe pose and optimized map point coordinates. The constraint factors include visual constraint factors and trajectory estimation constraint factors. The trajectory estimation constraint factors are constraint factors of DR measurement fusion. DR measurement is the pose output after fusion of the original measurements from the inertial measurement unit and wheel speed odometer. The reconstruction module is used to construct a target parking map of the target site based on the optimized keyframe pose and the optimized map point coordinates; The trajectory estimation constraint factor includes at least one of a first trajectory estimation constraint factor, a second trajectory estimation constraint factor, and a third trajectory estimation constraint factor. The first trajectory estimation constraint factor is the relative pose constraint between adjacent keyframes within the compact sliding window. The second trajectory estimation constraint factor is the relative pose constraint between the first keyframe and the last keyframe within the compact sliding window. The third trajectory estimation constraint factor is the absolute pose constraint between the first keyframe within the compact sliding window and the target keyframe outside the compact sliding window. The distance between the target keyframe and the compact sliding window is less than that between other keyframes outside the compact sliding window. The visual constraint factors include visual factor constraints to be optimized and target visual factor constraints. The visual factor constraints to be optimized are constraints that associate target map points and keyframes within the compact sliding window, and the residual form of the visual factor constraints to be optimized is reprojection error. The target visual factor constraints are visual factor constraints with fixed constraints, including a first target visual factor constraint and a second target visual factor constraint. The first target visual factor constraint is a constraint between map points outside the compact sliding window and keyframes within the compact sliding window, and the second target visual factor constraint is a constraint between keyframes outside the compact sliding window and target map points within the compact sliding window.
9. A parking map building device, characterized in that, The parking map building device includes: a memory, a processor, and a parking map building program stored in the memory and executable on the processor. When the parking map building program is executed by the processor, it implements the parking map building method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores a parking map building program, which, when executed by a processor, implements the parking map building method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
State estimation method and device of visual inertial odometer, and electronic equipment
CN114812601A
Visual SLAM method and device based on key frame optimization
CN115131420A
