Mapping Loop Correction Method, Device and Medium
By utilizing the environmental geometric rule characteristics, pose conversion matrix is calculated and image correction is performed, the problems of large amount of loopback detection and accumulation of accuracy errors in visual SLAM are solved, and positioning accuracy and stability are improved.
Patent Information
- Application Number
- CN202111583636.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-22
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2041-12-22
AI Technical Summary
In visual SLAM, loopback detection leads to problems such as large calculation amount and slow matching speed, especially in the absence of initial values, the number of matches required is very huge, resulting in the accumulation of graph construction accuracy errors.
Using the geometrical rules of the environment, by obtaining the coordinates and direction angles of the starting point and the preset end point, pose conversion matrix is calculated, pose correction of the image in the loop, and image correction is performed using beam adjustment method.
Effectively reduce the accuracy error of map construction, improve the positioning accuracy and stability of the navigation link, and improve the efficiency and accuracy of loop detection.
Smart Images

Figure CN114373010B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of positioning technology, and particularly to a mapping loop correction method, device and storage medium. Background Art
[0002] In the visual SLAM problem, the estimation of pose is often a recursive process, that is, the pose of the current frame is solved from the pose of the previous frame. Therefore, the error therein is transmitted frame by frame like this, that is, the cumulative error. An effective way to eliminate the error is to perform loop detection. Loop detection determines whether the robot has returned to a previously passed position. If a loop is detected, it will transmit the information to the backend for optimization processing. A loop is a more compact and accurate constraint than the backend. This constraint condition can form a topologically consistent trajectory map. If a closed loop can be detected and optimized, the result can be made more accurate.
[0003] However, when detecting a loop, if all previous frames are taken to match with the current frame, and those with good enough matching are loops, this will lead to too large a computational amount, too slow matching speed, and a very large number of matches need to be made without a good initial value. Summary of the Invention
[0004] The embodiments of the present application provide a mapping loop correction method, device and medium, which can utilize the characteristics of the geometric rules of the environment to complete loop correction, effectively reduce the mapping accuracy error, and effectively improve the positioning accuracy and stability in the navigation link.
[0005] In a first aspect, the embodiments of the present application provide a mapping loop correction method, and the method includes:
[0006] Obtain the initial point coordinates and initial direction angle of the starting point, and the initial end point coordinates of the preset end point;
[0007] According to the initial point coordinates of the starting point and the initial end point coordinates of the preset end point, obtain the physical distance corresponding to the starting point and the preset end point in the real space coordinate system;
[0008] According to the conversion relationship between the real space coordinate system and the image coordinate system, obtain the image distance corresponding to the starting point and the preset end point in the image coordinate system;
[0009] Obtain the images within the loop, and according to the preset positioning strategy and the initial point coordinates and initial direction angle of the starting point, obtain the key point coordinates and key point direction angles of the images within the loop;
[0010] According to the key point coordinates, key point direction angles and the initial end point coordinates of the preset end point, obtain the pose transformation matrix;
[0011] Perform pose correction on the image within the loop according to the pose transformation matrix to obtain a loop-corrected image.
[0012] In a second aspect, an embodiment of the present application further provides a mapping loop correction device, which includes an acquisition unit and a processing unit;
[0013] The acquisition unit is configured to acquire the initial point coordinates and the initial direction angle of the starting point, and the initial end point coordinates of the preset end point;
[0014] The acquisition unit is further configured to acquire the physical distance corresponding to the starting point and the preset end point in the real space coordinate system according to the initial point coordinates of the starting point and the initial end point coordinates of the preset end point;
[0015] The processing unit is configured to acquire the image distance corresponding to the starting point and the preset end point in the image coordinate system according to the conversion relationship between the real space coordinate system and the image coordinate system;
[0016] The processing unit is further configured to acquire the image within the loop, and acquire the key point coordinates and the key point direction angle of the image within the loop according to the preset positioning strategy and the initial point coordinates and the initial direction angle of the starting point;
[0017] The processing unit is further configured to acquire a pose transformation matrix according to the key point coordinates, the key point direction angle, and the initial end point coordinates of the preset end point;
[0018] The processing unit is further configured to perform pose correction on the image within the loop according to the pose transformation matrix to obtain a loop-corrected image.
[0019] In a third aspect, an embodiment of the present application further provides a processing device, including a processor and a memory. A computer program is stored in the memory. When the processor calls the computer program in the memory, it executes the steps in any one of the mapping loop correction methods provided by the embodiments of the present application.
[0020] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores multiple instructions. The instructions are suitable for being loaded by a processor to execute the steps in any one of the mapping loop correction methods provided by the embodiments of the present application.
[0021] It can be concluded from the above content that the present application can utilize the characteristics of the geometric rules of the environment to complete loop correction, effectively reduce the mapping accuracy error, and effectively improve the positioning accuracy and stability in the navigation link. Description of the Drawings
[0022] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0023] Figure 1 It is a schematic flowchart of a mapping loop correction method in the present application;
[0024] Figure 2a It is in the mapping loop correction method of the present application Figure 1 of the schematic diagram;
[0025] Figure 2b It is a schematic diagram of Map 2 in the mapping loop correction method of the present application;
[0026] Figure 2c It is in the mapping loop correction method of the present application Figure 3 of the schematic diagram;
[0027] Figure 2d It is in the mapping loop correction method of the present application Figure 4 of the schematic diagram;
[0028] Figure 3 A schematic structural diagram of the mapping loop correction device in the present application;
[0029] Figure 4 It is a schematic structural diagram of a processing device in the present application. Specific embodiments
[0030] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0031] In the following description, specific embodiments of the present application will be described with reference to steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be referred to several times as being performed by a computer. The computer execution referred to in the embodiments of the present application includes the operation of a computer processing unit that represents data in a structured form by an electronic signal. This operation transforms the data or maintains it at a position in the computer's memory system, which can be reconfigured or otherwise changed in a manner well known to those skilled in the art to change the operation of the computer. The data structure in which the data is maintained is a physical location in the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the above text, which does not represent a limitation. Those skilled in the art will understand that the various steps and operations described below can also be implemented in hardware.
[0032] The principles of the present application operate using many other general-purpose or specific-purpose computing, communication environments, or configurations. Examples of well-known computing systems, environments, and configurations suitable for the present application may include (but are not limited to) mobile phones, personal computers, servers, multi-processor systems, microcomputer-based systems, mainframe computers, and distributed computing environments, including any of the above systems or devices.
[0033] The terms "first", "second", "third", etc. in the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion.
[0034] Next, a mapping loop correction method provided by the present application will be introduced.
[0035] Refer to Figure 1 , Figure 1 which shows a schematic flow diagram of a mapping loop correction method of the present application. The method is applied to navigation of robots (such as cloud robots), autonomous driving terminals (such as autonomous driving intelligent vehicles), etc. The method provided by the present application may specifically include the following steps:
[0036] 101. Obtain the initial point coordinates and initial direction angle of the starting point, and the initial end point coordinates of the preset end point.
[0037] In the embodiments of the present application, for example, taking the method applied to a robot as an example, when the robot starts walking in a certain space, it can initially detect and obtain the initial point coordinates and initial direction angle of the starting point. For example, assume that point A in Figures 2a - 2d is recorded as the starting point, and the initial point coordinates and initial direction angle of A are recorded as x, y, and yaw (direction angle). Then, under the navigation control of being manipulated or exploring by itself, the robot walks forward and always heads towards the preset end point (such as Figures 2a - 2dtravel towards the target point B
[0038] Since the robot's own sensors (single-line or multi-line) laser sensors, robot chassis odometer, IMU (i.e., inertial sensor), and 3D depth camera (binocular / TOF / structured light) respectively obtain information such as 2D / 3D laser point cloud, 3D pose, and visual image of the perceived environment, the robot performs the fusion mapping of this information. Figures 2a - 2d Four actual environments (the building has geometric symmetry and similarity) for the robot's mapping and the mapping situation are given. Taking the Figure 2a ground in Figure 1 as an example, a technical implementation description is given. Maps 2, the Figure 3 ground, and the Figure 4 ground all have different environmental geometric shapes, including but not limited to rectangles, pentagrams, circles, and ellipses, but there are no connected paths on the map roads.
[0039] Since the effective distance of the robot's lidar or depth vision camera is in the tens of meters, it may not completely cover a long channel in one go. It is necessary to continuously scan in combination with the continuous data of sensors such as the robot chassis odometer and IMU to obtain a relatively accurate environmental geometry. However, when the robot walks a certain distance, due to the cumulative error generated by the odometer and IMU according to the moving distance, when the robot actually scans, it will form Figures 2a - 2b from A' to B' in Figure 1 / Map 2, the Figure 3 ground, and the Figure 4 ground are similar situations. The robot actually reaches point B', rather than the exact B point in the actual environment.
[0040] 102. According to the initial point coordinates of the starting point and the initial end point coordinates of the preset end point, obtain the physical distance corresponding to the starting point and the preset end point in the real space coordinate system.
[0041] In the embodiment of the present application, the physical distance D1 corresponding to the starting point and the preset end point in the real space coordinate system can be obtained by manually measuring the distance between point A and B in the real environment.
[0042] 103. According to the conversion relationship between the real space coordinate system and the image coordinate system, obtain the image distance corresponding to the starting point and the preset end point in the image coordinate system.
[0043] In the embodiment of the present application, the physical distance D1 can be adjusted according to the above ratio by using the obtained physical distance D1 and the ratio of the image coordinate system to obtain the image distance corresponding to the starting point and the preset end point in the image coordinate system.
[0044] 104. Obtain the image within the loop, and based on the preset positioning strategy and the initial point coordinates and initial direction angle of the starting point, obtain the key point coordinates and key point direction angle of the image within the loop.
[0045] In the embodiments of the present application, in order to achieve loop correction, it is necessary to obtain the corresponding image within the loop during the process of the robot moving from the starting point (such as Figure 2a point A in Figure 2a ) to the actual end point (such as
[0046] point B' in
[0047] ). Then, based on the initial point coordinates and initial direction angle of the starting point that have been obtained and the locally preset positioning strategy, calculate the key point coordinates and key point direction angle of the key point B'. It can be seen that the key point coordinates and key point direction angle corresponding to the actual end point can be quickly determined through the obtained image within the loop.
[0048] In one embodiment, step 104 includes:
[0049] Obtain the ordinate of the initial point coordinates as the ordinate of the key point coordinates of the image within the loop;
[0050] Obtain the abscissa of the initial point coordinates, subtract the image distance from it to obtain the difference result, and use the difference result as the abscissa of the key point coordinates of the image within the loop;
[0051] Obtain the initial direction angle of the starting point as the key point direction angle of the image within the loop.
[0052] In the embodiments of the present application, after knowing the key point coordinates, key point direction angle, and the initial point coordinates of the preset end point, the pose transformation matrix can be calculated according to the conversion relationship between coordinate systems for subsequent loop correction.
[0053] In one embodiment, step 105 includes:
[0054] Obtain the first coordinates corresponding to the initial and terminal coordinates, and the second coordinates corresponding to the key point coordinates. According to the conversion strategy that multiplying the second coordinates by the pose conversion matrix equals the first coordinates, calculate and obtain the pose conversion matrix.
[0055] In the embodiment of the present application, if the position conversion matrix is denoted as T, the first coordinates are denoted as P1, and the second coordinates are denoted as P2. Since P1 = TP2, according to the conversion strategy that multiplying the second coordinates by the pose conversion matrix equals the first coordinates, the pose conversion matrix can be quickly obtained, thereby realizing the conversion from the real space coordinate system to the image coordinate system.
[0056] 106. Perform pose correction on the images within the loop according to the pose conversion matrix to obtain loop-corrected images.
[0057] In the embodiment of the present application, when the pose conversion matrix for converting from the real space coordinate system to the image coordinate system is known, the pose of each frame of the images within the loop can be corrected to obtain loop-corrected images. It can be seen that by utilizing the regular geometric characteristics of the environment (local symmetry or similarity, and the geometric rules can accurately measure or calculate the closed points), virtual connection calibration of closing is performed based on the symmetry and similarity of the geometric features of the starting point and the ending point on the scanned non-closed map, thereby specifying the closed points of the current map scanning, and then performing loop correction on the scanned map (such as the SALM map constructed based on the SLAM technology).
[0058] In one embodiment, step 106 includes:
[0059] Perform pose correction based on bundle adjustment on the images within the loop according to the pose conversion matrix to obtain loop-corrected images.
[0060] In the embodiments of the present application, when correcting the image within the loop, the bundle adjustment method is adopted. The bundle adjustment method means that for any three-dimensional point P in the scene, the light rays emitted from the optical centers of the cameras corresponding to each view and passing through the pixels corresponding to P in the image will intersect at point P. For all three-dimensional points, a considerable number of light beams (bundles) are formed; in the actual process, due to the existence of noise, etc., it is almost impossible for each light ray to converge at one point. Therefore, during the solution process, it is necessary to continuously adjust the information to be solved to make the final light rays intersect at point P. For specific application scenarios, the bundle adjustment method has different convergence methods. Currently, commonly used methods include the gradient descent method, the Newton method, the Gauss-Newton method, etc. Based on the pose transformation matrix, all-frame pose correction is performed on the image within the loop. Specifically, Bundle Adjustment (BA) is used to correct all poses of the image within the loop, and a loop-corrected image with better correction effect can be obtained. For multiple similar non-closed environments that appear in the same environment, this method can be iteratively used for loop correction, that is, first close the small loop and then close the large loop.
[0061] In one embodiment, after step 106, it further includes:
[0062] Obtain the target area corresponding to the loop-corrected image in the original map data, and replace the target map data of the target area with the loop-corrected image to update the original map data.
[0063] In the embodiments of the present application, after the robot scans a closed environment, it can scale appropriately according to the environmental building blueprint (which can be a CAD drawing or a BIM model) and the grid map established by the scan, and at the same time perform corresponding correction on the mapping data based on the building drawings. Specifically, first obtain the target area corresponding to the loop-corrected image in the original map data, and then replace the target map data of the target area with the loop-corrected image, thereby realizing the update of the original map data.
[0064] To facilitate better implementation of the method of the present application, the embodiments of the present application also provide a mapping loop correction device.
[0065] Please refer to Figure 3 , Figure 3 which is a schematic structural diagram of a mapping loop correction device 20 of the present application. The mapping loop correction device 20 may specifically include the following structures: an acquisition unit 201 and a processing unit 202.
[0066] Among them, the acquisition unit 201 is used to acquire the initial point coordinates and the initial direction angle of the starting point, and the initial end point coordinates of the preset end point.
[0067] In an embodiment of the present application, for example, taking the mapping and loop correction device 20 applied to a robot as an example, when the robot starts to move in a certain space, it can initially detect and obtain the initial point coordinates and the initial direction angle of the starting point. For example, it is assumed that the robot is at point A in Figures 2a - 2d denoted as the starting point, and the initial point coordinates and the initial direction angle of A are denoted as x, y, and yaw (direction angle). After that, under the navigation control of being manipulated or exploring by itself, the robot moves forward and always travels towards a preset end point (such as Figures 2a - 2d the target point B).
[0068] Since the robot's own sensors (single-line or multi-line) laser sensors, robot chassis odometer, IMU (i.e., inertial sensor), and 3D depth camera (binocular / TOF / structured light) respectively obtain information such as 2D / 3D laser point clouds, 3D poses, and visual images of the perceived environment, the robot performs the fusion mapping of this information. Figures 2a - 2d Four actual environments (the building has geometric symmetry and similarity) of the robot mapping and the mapping situation are given. Taking Figure 2a the ground in Figure 1 as an example, a technical implementation description is carried out. Maps 2, the ground Figure 3 and the ground Figure 4 all have different environmental geometric shapes, including but not limited to rectangles, pentagrams, circles, and ellipses, but there are no connected paths on the map roads.
[0069] Since the effective distance of the robot's lidar or depth vision camera is in the range of more than ten meters or dozens of meters, it may not completely cover a relatively long passage at one time. It is necessary to continuously scan in combination with the continuous data of sensors such as the robot chassis odometer and IMU to obtain a relatively accurate environmental geometry. However, when the robot moves a certain distance, due to the cumulative error generated by the odometer and IMU according to the moving distance, when the robot actually scans, it will form Figures 2a - 2b the situation from A' to B' in Figure 1 / Map 2, the ground Figure 3 and the ground Figure 4 is similar). The robot actually reaches point B', rather than the exact B point in the actual environment.
[0070] The obtaining unit 201 is further configured to obtain the physical distance corresponding to the starting point and the preset end point in the real space coordinate system according to the initial point coordinates of the starting point and the initial end point coordinates of the preset end point.
[0071] In an embodiment of the present application, the physical distance D1 corresponding to the starting point and the preset end point in the real space coordinate system can be obtained by manually measuring the distance between point A and B in the real environment.
[0072] The obtaining unit 201 is further configured to obtain the image distance corresponding to the starting point and the preset ending point in the image coordinate system according to the conversion relationship between the real space coordinate system and the image coordinate system.
[0073] In an embodiment of the present application, the physical distance D1 and the ratio of the image coordinate system can be used to adjust the physical distance D1 according to the above ratio to obtain the image distance corresponding to the starting point and the preset ending point in the image coordinate system.
[0074] The processing unit 202 is configured to obtain the image within the loop, and obtain the key point coordinates and key point direction angles of the image within the loop according to a preset positioning strategy and the initial point coordinates and initial direction angle of the starting point.
[0075] In an embodiment of the present application, in order to implement loop correction, it is necessary to obtain the corresponding image within the loop during the process of the robot moving from the starting point (such as Figure 2a point A) to the actual ending point (such as Figure 2a point B' in), and then based on the initial point coordinates and initial direction angle of the starting point that have been obtained and the locally preset positioning strategy, calculate the key point coordinates and key point direction angles of the key point B'. It can be seen that the key point coordinates and key point direction angles corresponding to the actual ending point can be quickly determined through the obtained image within the loop.
[0076] In one embodiment, the processing unit 202 is specifically configured to:
[0077] Obtain the ordinate of the initial point coordinates as the ordinate of the key point coordinates of the image within the loop;
[0078] Obtain the abscissa of the initial point coordinates and subtract the image distance to obtain a difference result, and use the difference result as the abscissa of the key point coordinates of the image within the loop;
[0079] Obtain the initial direction angle of the starting point as the key point direction angle of the image within the loop.
[0080] In an embodiment of the present application, set the Y coordinate of the key frame (3 - 5 frames, at least one frame) near point B' to the Y coordinate value of the starting point A, set the X coordinate of the key frame (at least one frame or multiple frames) near point B' to A's X coordinate + (-D1'); the Yaw direction angle of point B' is set the same as that of the initial point A, so that the key point coordinates and key point direction angles of the key point B' can be obtained based on the above - adjusted positioning strategy.
[0081] The processing unit 202 is further configured to obtain a pose conversion matrix according to the key point coordinates, key point direction angles, and the initial starting point coordinates of the preset ending point.
[0082] In an embodiment of the present application, after the coordinates of the key points, the direction angles of the key points, and the initial and end coordinates of the preset end point are known, the pose transformation matrix can be deduced according to the conversion relationship between coordinate systems for subsequent loop correction.
[0083] In one embodiment, the processing unit 202 is further specifically configured to:
[0084] Obtain the first coordinate corresponding to the initial and end coordinates, and the second coordinate corresponding to the coordinates of the key points, and calculate and obtain the pose transformation matrix according to the conversion strategy that the product of the second coordinate and the pose transformation matrix is equal to the first coordinate.
[0085] In an embodiment of the present application, if the position transformation matrix is denoted as T, the first coordinate is denoted as P1, and the second coordinate is denoted as P2, since P1 = TP2, the pose transformation matrix can be quickly obtained according to the conversion strategy that the product of the second coordinate and the pose transformation matrix is equal to the first coordinate, so as to realize the conversion from the real space coordinate system to the image coordinate system.
[0086] The processing unit 202 is further configured to perform pose correction on the images within the loop according to the pose transformation matrix to obtain loop-corrected images.
[0087] In an embodiment of the present application, after the pose transformation matrix for the conversion from the real space coordinate system to the image coordinate system is known, the pose of each frame of the images within the loop can be corrected to obtain loop-corrected images. It can be seen that by using the regular geometric characteristics of the environment (local symmetry or similarity, and the geometric rules can accurately measure or calculate the closed points), virtual connection calibration for closing is performed based on the symmetry and similarity of the geometric characteristics of the starting point and the ending point on the scanned non-closed map, thereby specifying the closed points of the current map scanning, and then performing loop correction on the scanned SLAM map.
[0088] In one embodiment, the processing unit 202 is further specifically configured to:
[0089] Perform pose correction based on bundle adjustment on the images within the loop according to the pose transformation matrix to obtain loop-corrected images.
[0090] In the embodiments of the present application, when correcting the image within the loop, the bundle adjustment method is adopted. The bundle adjustment method means that for any three-dimensional point P in the scene, the light rays emitted from the optical centers of the cameras corresponding to each view and passing through the pixels corresponding to P in the image will intersect at point P. For all three-dimensional points, a considerable number of light bundles are formed. In the actual process, due to the existence of noise, etc., it is almost impossible for each light ray to converge at a single point. Therefore, during the solution process, it is necessary to continuously adjust the information to be solved to make the final light rays intersect at point P. For specific application scenarios, the bundle adjustment method has different convergence methods. Currently, common methods include the gradient descent method, the Newton method, the Gauss-Newton method, etc. Based on the pose transformation matrix, all-frame pose correction is performed on the image within the loop. Specifically, the bundle adjustment (BA) is used to correct all poses of the image within the loop, and a loop-corrected image with better correction effect can be obtained. For multiple similar non-closed environments in the same environment, this method can be iteratively used for loop correction, that is, first close the small loop and then close the large loop.
[0091] In one embodiment, the processing unit 201 is further configured to:
[0092] Obtain the target area corresponding to the loop-corrected image in the original map data, and replace the target map data in the target area with the loop-corrected image to update the original map data.
[0093] In the embodiments of the present application, after the robot scans a closed environment, it can perform appropriate scaling according to the environmental building blueprint (which can be a CAD drawing or a BIM model) and the grid map established by the scan, and at the same time perform corresponding correction on the mapping data based on the building drawings. Specifically, first obtain the target area corresponding to the loop-corrected image in the original map data, and then replace the target map data in the target area with the loop-corrected image, thereby realizing the update of the original map data.
[0094] The present application also provides a processing device. Refer to Figure 4 , Figure 4 shows a schematic structural diagram of the processing device of the present application. Specifically, the processing device provided by the present application includes a processor, and when the processor executes the computer program stored in the memory, it realizes the steps in the corresponding embodiments as Figure 1 ; or, when the processor executes the computer program stored in the memory, it realizes the functions of the respective modules in the corresponding embodiments as Figure 3 in the corresponding embodiments.
[0095] Exemplarily, a computer program can be divided into one or more modules / units. One or more modules / units are stored in a memory and executed by a processor to implement the present application. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in a computer device.
[0096] The processing device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the illustration is only an example of the processing device and does not constitute a limitation on the processing device. It may include more or fewer components than shown in the illustration, or combine certain components, or different components. For example, the processing device may also include input / output devices, network access devices, a bus, etc. The processor, memory, input / output devices, and network access devices, etc. are connected through the bus.
[0097] The processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the processing device and connects various parts of the entire processing device through various interfaces and lines.
[0098] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the processing device (such as audio data, video data, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0099] The display screen is used to display characters of at least one character type output by the input / output unit.
[0100] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described device, processing equipment, and their corresponding modules can be referred to in Figure 1 the descriptions in the corresponding embodiments, and will not be elaborated herein specifically.
[0101] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0102] Therefore, an embodiment of the present application provides a computer-readable storage medium, in which multiple instructions are stored, and these instructions can be loaded by a processor to execute the steps in the corresponding embodiments of the present application as Figure 1 described. The specific operations can be referred to in Figure 1 the descriptions in the corresponding embodiments, and will not be elaborated herein.
[0103] Among them, the computer-readable storage medium can include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
[0104] Since the instructions stored in the computer-readable storage medium can execute the steps in the corresponding embodiments of the present application as Figure 1 described, the beneficial effects that can be achieved in the corresponding embodiments of the present application can be realized. For details, please refer to the previous descriptions and will not be elaborated herein. Figure 1
[0105] The above has introduced in detail a mapping loop correction method, device, and storage medium provided by the present application. Specific examples are applied in the embodiments of the present application to elaborate the principle and implementation manner of the present application. The descriptions of the above embodiments are only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A mapping loop closure correction method, characterized in that, The method includes: Obtaining the initial point coordinates and the initial direction angle of the starting point, and the initial end point coordinates of the preset end point; Obtaining the physical distance corresponding to the starting point and the preset end point in the real space coordinate system according to the initial point coordinates of the starting point and the initial end point coordinates of the preset end point; Obtaining the image distance corresponding to the starting point and the preset end point in the image coordinate system according to the conversion relationship between the real space coordinate system and the image coordinate system; Obtaining the image within the loop, and obtaining the key point coordinates and key point direction angles of the image within the loop according to the preset positioning strategy, the initial point coordinates of the starting point, and the initial direction angle; Obtaining the pose transformation matrix according to the key point coordinates, the key point direction angles, and the initial end point coordinates of the preset end point; Performing pose correction on the image within the loop according to the pose transformation matrix to obtain a loop-corrected image; Among them, the obtaining of the key point coordinates and key point direction angles of the image within the loop according to the preset positioning strategy, the initial point coordinates of the starting point, and the initial direction angle includes: Obtaining the ordinate of the initial point coordinates as the ordinate of the key point coordinates of the image within the loop; Obtaining the abscissa of the initial point coordinates, subtracting it from the image distance to obtain a difference result, and using the difference result as the abscissa of the key point coordinates of the image within the loop; Obtaining the initial direction angle of the starting point as the key point direction angle of the image within the loop.
2. The method according to claim 1, wherein The obtaining of the pose transformation matrix according to the key point coordinates, the key point direction angles, and the initial end point coordinates of the preset end point includes: Obtaining the first coordinates corresponding to the initial end point coordinates, and the second coordinates corresponding to the key point coordinates, and calculating and obtaining the pose transformation matrix according to the transformation strategy that the product of the second coordinates and the pose transformation matrix is equal to the first coordinates.
3. The method according to claim 1, characterized in that, The performing of pose correction on the image within the loop according to the pose transformation matrix to obtain a loop-corrected image includes: Performing pose correction based on bundle adjustment on the image within the loop according to the pose transformation matrix to obtain a loop-corrected image.
4. The method according to claim 1, characterized in that, After performing pose correction on the image within the loop according to the pose transformation matrix to obtain a loop-corrected image, it further includes: Obtaining the target area corresponding to the loop-corrected image in the original map data, and replacing the target map data of the target area with the loop-corrected image to update the original map data.
5. A mapping loop correction device, characterized in that, The mapping loop correction device includes: an acquisition unit and a processing unit; The acquisition unit is used to obtain the initial point coordinates and the initial direction angle of the starting point, and the initial end point coordinates of the preset end point; The acquisition unit is further used to obtain the physical distance corresponding to the starting point and the preset end point in the real space coordinate system according to the initial point coordinates of the starting point and the initial end point coordinates of the preset end point; The processing unit is used to obtain the image distance corresponding to the starting point and the preset end point in the image coordinate system according to the conversion relationship between the real space coordinate system and the image coordinate system; The processing unit is further configured to obtain the image within the loop, and obtain the key point coordinates and key point direction angles of the image within the loop according to a preset positioning strategy and the initial point coordinates and initial direction angle of the starting point; The processing unit is further configured to obtain a pose transformation matrix according to the key point coordinates, key point direction angles, and the initial coordinates of the preset end point; The processing unit is further configured to perform pose correction on the image within the loop according to the pose transformation matrix to obtain a loop-corrected image; Among them, when the processing unit is used to obtain the image within the loop and obtain the key point coordinates and key point direction angles of the image within the loop according to a preset positioning strategy and the initial point coordinates and initial direction angle of the starting point, it is specifically configured to: Obtain the ordinate of the initial point coordinates as the ordinate of the key point coordinates of the image within the loop; Obtain the abscissa of the initial point coordinates, subtract the image distance from the abscissa to obtain a difference result, and use the difference result as the abscissa of the key point coordinates of the image within the loop; Obtain the initial direction angle of the starting point as the key point direction angle of the image within the loop.
6. The device according to claim 5, characterized in that, The processing unit is specifically configured to: Obtain the ordinate of the initial point coordinates as the ordinate of the key point coordinates of the image within the loop; Obtain the abscissa of the initial point coordinates, subtract the image distance from the abscissa to obtain a difference result, and use the difference result as the abscissa of the key point coordinates of the image within the loop; Obtain the initial direction angle of the starting point as the key point direction angle of the image within the loop.
7. The device according to claim 5, wherein, The processing unit is further specifically configured to: Obtain the first coordinate corresponding to the initial end point coordinates and the second coordinate corresponding to the key point coordinates, and calculate and obtain the pose transformation matrix according to the transformation strategy that multiplying the second coordinate by the pose transformation matrix is equal to the first coordinate.
8. A processing device, characterized in that, It includes a processor and a memory. A computer program is stored in the memory. When the processor calls the computer program in the memory, it executes the method according to any one of claims 1 to 4.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Scene map generation method, device and equipment based on depth camera
CN109816769A
Pose calibration data set generation method, device and system, electronic equipment and medium
CN113628284A