An Error Matching Elimination Method for Accelerating Visual SLAM
The confidence is filtered and recorded through the GMS algorithm, and the RANSAC input samples are optimized after grouping, solving the problem of time-consuming feature matching in visual SLAM, real-time and accuracy balance of visual SLAM is achieved.
Patent Information
- Application Number
- CN202310352870.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2043-04-04
AI Technical Summary
The feature matching process in visual SLAM consumes a lot of time and affects the real-time nature of the system. The existing GMS-RANSAC method is difficult to meet the real-time requirements under large data volumes.
The GMS algorithm is used to filter the matching pairs and record the confidence. After sorting the groups, only high-confidence groups are used as the input sample of RANSAC to further eliminate outliers and optimize the matching process.
While maintaining accuracy, significantly reduce the number of iterations, and improve the real-time and matching speed of visual SLAM.
Smart Images

Figure CN116543027B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for eliminating wrong matching for speeding up visual SLAM, and belongs to the field of computer vision. Background Art
[0002] Real-time performance is the core feature of Simultaneous Localization and Mapping (SLAM), and it has attracted more attention in visual SLAM. Feature point extraction and matching are the most critical and time-consuming steps in visual SLAM, which refers to establishing a reliable feature correspondence between two images of the same scene taken at different times, different perspectives or different sensors, so as to obtain a description of the relationship between images, or between images and maps, and provide effective support for subsequent camera pose estimation, optimization operations, and the completion of various tasks in SLAM. In addition, due to the locality of image features, mismatching is common. Although the error rate has been reduced to a certain extent through a series of additional process strategies such as iterative optimization, the incorrectly added matching and additional processes will bring additional time overhead, which aggravates the improvement of the real-time performance of visual SLAM and has become one of the bottlenecks in the development of SLAM.
[0003] In recent years, in visual SLAM, it has been more inclined to use the Random Sample Consensus (RANSAC) technique to solve the problem of eliminating incorrect matches, and it is a generally recognized common method. However, when the amount of data is large, in order to meet the corresponding accuracy requirements, the number of iterations must be increased, and its matching time will increase rapidly, which is intolerable for SLAM that must maintain real-time performance. However, if the number of matches is reduced, the accuracy of the system will surely be sacrificed, thereby reducing the adaptation range of SLAM. Generally, SLAM often faces large amounts of data in large scenes, and it is difficult to ensure both short matching time and high accuracy at the same time. For this reason, Zhang et al. recently proposed the GMS-RANSAC method and applied it to the SLAM system to balance the solution of this problem, that is, first screening once through the GMS (Grid-based Motion Statistics) algorithm, and then further eliminating incorrect matches using RANSAC (Fischler M A, Bolles R C. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography[J]. Communications of the ACM, 1981, 24(6): 381-395.). Although GMS-RANSAC is currently the method with the highest accuracy in visual SLAM in complex environments, it still cannot meet the real-time requirements in many cases. Summary of the Invention
[0004] To solve the problem that feature matching in current visual SLAM consumes a large amount of time to obtain accuracy, the present invention provides a method for eliminating incorrect matches for accelerating visual SLAM, including:
[0005] Step 1: Obtain two images to be matched, extract the feature points of the two images respectively, and then perform brute-force matching on the ORB features;
[0006] Step 2: Roughly screen the matching results obtained in Step 1 using the GMS algorithm to eliminate incorrect matches;
[0007] Step 3: Record the credibility of the feature points calculated by the GMS algorithm during the solution process in Step 2;
[0008] Step 4: Sort the credibility of the feature points recorded in Step 3, and divide the results into two groups according to the level of credibility;
[0009] Step 5: Only use the group with high credibility in Step 4 as the input samples for RANSAC to solve the optimal model, and further remove outliers from all the results according to the obtained optimal model.
[0010] Optionally, in Step 1, the ORB algorithm is used to extract feature points from the image.
[0011] Optionally, in Step 3, the number of matching pairs within the neighborhood range of the feature points is calculated as the credibility of the feature points.
[0012] Optionally, in Step 4, the results of Step 3 are divided into two groups according to a ratio of 1 / 2.
[0013] The second object of the present invention is to provide an image matching method for accelerating visual SLAM. First, the error matching elimination method described in any one of the above is used to eliminate error matches, and then image matching is performed according to the matching features after elimination.
[0014] The third object of the present invention is to provide an error matching elimination device for accelerating visual SLAM, including a processor and a memory. Instructions executed by the processor are stored on the memory. When the instructions are executed by the processor, the error matching elimination device implements the error matching elimination method described in any one of the above.
[0015] The fourth object of the present invention is to provide a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the error matching elimination method described in any one of the above is implemented.
[0016] The beneficial effects of the present invention are:
[0017] The present invention proposes to use the credibility obtained by the GMS algorithm as a pre-judgment condition for the RANSAC algorithm. The matching pairs are sorted and grouped according to the credibility of the matching pairs. The RANSAC algorithm randomly selects and will preferentially select from the matching pairs with higher credibility, and the optimal model can be obtained faster. In this way, on the premise of maintaining accuracy, the number of iterations can be greatly reduced, the convergence speed of the function can be accelerated, and the real-time requirements of visual SLAM can be ensured. Description of the Drawings
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1It is a flow structure diagram of an error matching elimination method for accelerating visual SLAM in the present invention.
[0020] Figure 2 It is an example diagram of the brute-force matching result of the images to be matched in the embodiment of the present invention, where (a) is the image to be matched, (b) is the schematic diagram of the feature extraction effect, and (c) is the schematic diagram of the brute-force matching effect.
[0021] Figure 3 It is a matching result diagram of the feature points extracted from the images to be matched based on the improved GMS-RANSAC method in the embodiment of the present invention, where (a) is the result diagram screened by GMS and (b) is the result diagram screened by RANSAC.
[0022] Figure 4 It is the matching result diagram (a) and the time result diagram (b) of the images to be matched based on the improved GMS-RANSAC with different preset numbers of ORB feature points in the embodiment of the present invention. Detailed implementation manners
[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will further describe the embodiments of the present invention in detail with reference to the accompanying drawings.
[0024] Embodiment 1:
[0025] This embodiment provides an error matching elimination method for accelerating visual SLAM. Refer to Figure 1 , including the following steps:
[0026] Step 1: Obtain two pictures to be matched, extract the feature points of the two images respectively through the ORB algorithm, and then perform brute-force matching on the ORB features;
[0027] Step 2: Coarsely screen the matching results obtained in Step 1 with the GMS algorithm to eliminate the error matches;
[0028] Step 3: Record the number of matching pairs within the neighborhood range of the feature points calculated by the GMS algorithm during the solution process in Step 2 as the credibility of the feature points;
[0029] Step 4: Sort the credibility of the feature points recorded in Step 3, and divide the results into two groups according to the high and low credibility at a ratio of 1 / 2;
[0030] Step 5: Only use the group with high credibility in Step 4 as the input sample for the RANSAC to solve the optimal model, and further remove the outliers from all the results according to the obtained optimal model.
[0031] Based on the above specific implementation manners, the effects of the present invention are verified below through specific experiments:
[0032] In the algorithm process, after extracting the same number of ORB feature points from the two input images, brute-force matching is performed on the feature points of the two images. The example results are as Figure 2 shown. Then, the GMS algorithm is used for screening to eliminate incorrect matches and reduce the number of samples input to RANSAC with errors. The results of GMS screening are as Figure 3 (a) shown. Then, RANSAC screening is performed on the obtained results to further eliminate incorrect matches, and the results of the method of the present invention are obtained, as Figure 3 (b) shown
[0033] The improved GMS-RANSAC algorithm is compared under different preset target numbers of ORB feature points. As the preset number of feature points increases, the number of matches and the time after eliminating incorrect matches increase sequentially, Figure 4 more intuitively showing the experimental results. Among them, the time in the range of 2000 - 3000 has a relatively significant increase, but the increase in the number of matches is relatively small. From 3000 to 9000, the time cost changes little and tends to be stable. After the preset value exceeds 9000, the change trend of the time cost increases and then is in a steady increasing state; in addition, the matching results are rising and have been relatively stable. The number of feature points that can be extracted from the image is limited. A large number of matching pairs have been found before the preset value of 2000. As the preset value increases, it is necessary to further find reliable matching pairs among the extracted feature point pairs, increasing the computational amount. Therefore, the time increases but the increase in the number of matches is not significant. Between the preset values of 3000 - 9000, the few remaining matching pairs are further extracted. The increase in the number of matching pairs in this range is small, and the main increase is the search time, with less increase in the computational time. After that, as the preset value further increases, the number of matching pairs that can be found in the image becomes fewer and fewer, and the main increase is the search time. Therefore, the time increases steadily after the preset value of 9000. It can be seen that the improved GMS-RANSAC algorithm can effectively extract ORB feature points and achieve matching.
[0034] This embodiment is completed using VS2019 and OpenCV under the Linux operating system. The hardware environment is a laptop with an i7 processor of 3.20 GHz and 8 GB of running memory, and the experimental process is relatively stable.
[0035] Some steps in the embodiments of the present invention can be implemented using software, and the corresponding software program can be stored in a readable storage medium, such as an optical disc or a hard disk, etc.
[0036] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. An error matching elimination method for accelerating visual SLAM, characterized in that, The method includes: Step 1: Obtain two pictures to be matched, respectively extract the feature points of the two images, and then perform brute-force matching on the extracted features; Step 2: Use the GMS algorithm to screen the matching results obtained in Step 1 and eliminate incorrect matches; Step 3: Record the credibility of the feature points calculated during the solution process of the GMS algorithm in Step 2; Step 4: Sort the credibility of the feature points recorded in Step 3, and divide the results into two groups according to the high and low credibility; Step 5: Only use the group with high credibility in Step 4 as the input sample for the RANSAC to solve the optimal model, and further remove outliers from all results according to the obtained optimal model.
2. The method for eliminating false matches for accelerating visual SLAM according to claim 1, wherein, In Step 1, the ORB algorithm is used to extract feature points from the images.
3. The method for eliminating false matches for accelerating visual SLAM according to claim 1, wherein In Step 3, the number of matching pairs within the neighborhood range of the feature points is calculated as the credibility of the feature points.
4. The method for eliminating false matches for accelerating visual SLAM according to claim 1, wherein In Step 4, the results of Step 3 are divided into two groups in a ratio of 1 / 2.
5. An image matching method for accelerating visual SLAM, characterized in that, The image matching method first uses the incorrect match elimination method described in any one of claims 1-4 to eliminate incorrect matches, and then performs image matching according to the matching features after elimination.
6. An incorrect match elimination device for accelerating visual SLAM, including a processor and a memory. Instructions executed by the processor are stored on the memory. When the instructions are executed by the processor, the incorrect match elimination device realizes the incorrect match elimination method described in any one of claims 1-4.
7. A computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the incorrect match elimination method described in any one of claims 1-4 is realized.