A 3D scene loop detection method based on incremental bag-of-words model
Through the three-dimensional scene loop detection method based on the incremental bag-of-words model, the key points and local descriptors of the point cloud are used to perform loop detection combined with time consistency, which solves the problem of insufficient robustness of the existing method and achieves better The detection performance and generalization ability are suitable for a variety of data sets.
Patent Information
- Application Number
- CN202311453857.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing 3D scene loop detection methods are insufficiently robust in visual SLAM and are easily affected by lighting and environmental changes. Moreover, methods based on 2D images fail to fully utilize 3D structural information, and local descriptor extraction methods also lack generalization.
The three-dimensional scene loop detection method based on the incremental bag-of-words model is used to extract key points and local descriptors from the point cloud, build a dictionary database and vocabulary distribution database, conduct rough screening and geometric verification, and combine time consistency to perform point cloud grouping. Collection classification and loop closure detection, adapting to arbitrary key points and local descriptor extraction methods.
It improves the performance and generalization ability of loop closure detection, can effectively detect loop closures on data sets of different qualities, provides new indicators to identify real loop closures, makes up for the omissions of traditional methods, and enhances the robustness of the SLAM system.
Smart Images

Figure CN117496346B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional SLAM, and in particular to a three-dimensional scene loop detection method based on an incremental bag-of-words model. Background Art
[0002] Loop detection, that is, the ability to detect revisits to the same location, plays an important role in SLAM systems. On the one hand, due to the accumulation of odometer drift, the accuracy of long-term estimation results in SLAM will be reduced, and loop detection provides a solution for this; on the other hand, loop detection can also be used in relocalization. Therefore, loop detection has become an indispensable part of modern SLAM systems.
[0003] In the loop detection of visual SLAM, the bag-of-words model is a commonly used method, which can achieve efficient image retrieval and determine whether a loop exists. However, image-based visual loop detection is less robust and is easily affected by changes in lighting, short-term (such as moving objects) and long-term (such as seasonal changes).
[0004] In recent years, in order to overcome the above problems, the three-dimensional scene point cloud data captured by LiDAR has attracted attention due to its strong robustness to the above changes. Some works focus on extracting highly descriptive global descriptors and using this descriptor to achieve loop detection; some works also introduce the bag-of-words model into the loop detection of three-dimensional scenes, but these methods either convert the three-dimensional point cloud into a two-dimensional image and then apply the offline bag-of-words model on the image, or rely on a specific local descriptor extraction method to build a bag-of-words model. The former does not fully utilize the information of the three-dimensional structure, while the latter is limited by the specific descriptor extraction method and lacks generalization. Summary of the invention
[0005] The present invention aims to address the deficiencies in the prior art and propose a three-dimensional scene loop detection method based on an incremental bag-of-words model.
[0006] The object of the present invention is to achieve the following technical solution: a three-dimensional scene loop detection method based on an incremental bag-of-words model, the method comprising the following steps:
[0007] S1, for the first N d Extract key points and local descriptors from point clouds, and build dictionary database and vocabulary distribution database;
[0008] S2, extract key points and local descriptors from the subsequent input point cloud, classify the local descriptors corresponding to the key points according to the dictionary database, and perform weighted processing on the classification results using TF-IDF calculation to obtain a vocabulary distribution histogram;
[0009] S3. Perform a rough screening based on the vocabulary distribution and the vocabulary distribution database, and calculate the similarity between the vocabulary distribution of the rough screening results and the current vocabulary distribution. At the same time, classify the rough screening results according to the time consistency to obtain a series of point cloud group sets. Select the top N most similar points from the two point cloud group sets with the largest number of point clouds and the highest average similarity. s point clouds, and remove duplicates as candidate point clouds;
[0010] S4, loop detection: perform geometric verification on each candidate point cloud, select the best candidate that passes the geometric verification and forms a loop with the current input, and update the historical loop information; if no candidate passes the geometric verification or the candidate point cloud set is empty, no point cloud forms a loop with the current input point cloud, and the local descriptor and vocabulary distribution corresponding to the input point cloud are added to the database;
[0011] S5. If the number of times new data is added reaches N u , the dictionary is recalculated and the corresponding IDF value and vocabulary distribution are updated.
[0012] Furthermore, the construction of the dictionary database and the vocabulary distribution database in step S1 is specifically as follows:
[0013] First, for the first N d Each point cloud is sampled by voxels to extract key points and local descriptors; the local descriptors corresponding to the key points are used as key local descriptors; a key feature database and a full feature database are constructed; secondly, the data in the key feature database are clustered by k-medians using the seeds of k-means++ to obtain N w The words are clustered as the result, and the dictionary database of the bag-of-words model is obtained; finally, the IDF value corresponding to each word is calculated according to the dictionary database and the top N words are clustered. d The key local descriptors of each point cloud are classified to obtain the vocabulary classification result corresponding to each key local descriptor, and the corresponding TF-IDF value is further calculated to obtain the vocabulary distribution histogram. The TF-IDF value corresponding to this vocabulary in the relevant point cloud is stored in the histogram, and the vocabulary distribution constitutes a vocabulary distribution database.
[0014] Furthermore, the extraction of key points and local descriptors in step S2 is specifically as follows:
[0015] The current input point cloud is voxel sampled and extracted using key point and local descriptor extraction methods.
[0016] Furthermore, the coarse screening in step S3 is specifically as follows:
[0017] In the vocabulary distribution histogram, if the value stored in a cell is 0, the current point cloud does not have the vocabulary corresponding to this cell, so the vocabulary set of the current point cloud is determined, which is recorded as The number of elements in is denoted as n w ;
[0018] According to the vocabulary distribution database, determine the vocabulary of each historical point cloud. The number of words in , denoted by The historical point cloud here excludes the N points that are closest in time to the current input point cloud. g Point cloud,
[0019] If satisfied:
[0020]
[0021] Then the jth point cloud passes the coarse screening, where λ w is the threshold used for judgment.
[0022] The similarity between the vocabulary distribution of the rough screening result and the current vocabulary distribution is calculated in step S3 as follows:
[0023] The vocabulary distribution similarity is calculated for each point cloud that passes the coarse screening. The similarity is measured by the Euclidean distance between two vocabulary distribution histograms. The smaller the distance, the higher the similarity.
[0024] Furthermore, in step S3, the rough screening results are classified according to the time consistency as follows:
[0025] All point clouds that pass the rough screening are sorted in descending order according to similarity; then point clouds with similar time are grouped together according to time consistency. Specifically, for each point cloud that passes the rough screening, the ID value of this point cloud is j As the center, select other ID values in [ID j -n gap ,ID j +n gap ] other point clouds within the range, together with this point cloud, form a point cloud group set; thereby obtaining a series of point cloud group combinations.
[0026] Furthermore, in step S3, the top N most similar points are selected from the two point cloud groups with the largest number of point clouds and the highest average similarity. s point clouds; if historical loop information exists, the point cloud group set selected for similarity additionally includes the point cloud group set where this historical loop is located;
[0027] Furthermore, the geometric verification of each candidate point cloud in step S4 is specifically as follows:
[0028] S401: Perform a point cloud distribution matching check, and determine the maximum and minimum values in the x and y directions for the current input point cloud and each candidate point cloud, respectively, which are recorded as: If satisfied:
[0029]
[0030] Then this candidate point cloud passes the point cloud distribution matching check, where and are two thresholds used to judge the degree of distribution similarity;
[0031] S402: The candidate point cloud checked by the point cloud distribution matching is further aligned with the current input point cloud; first, point pair matching is performed between the point clouds according to the local descriptors of the two point clouds: for each point in the input point cloud, the point corresponding to the descriptor closest to the point descriptor in the candidate point cloud is found as its pairing point; based on the result of the point pair matching, the RANSAC method is used to achieve point cloud alignment, and two measurement indicators, fitness and root mean square error, are obtained; therefore, if the matching degree is higher than the threshold λ f And the RMSE is lower than the threshold λ r , then the current candidate point cloud is considered to have passed the registration check.
[0032] Furthermore, the selection of the best candidate that passes the geometric verification in S4 is specifically as follows: among all the candidate point clouds that pass the two checks, the best candidate point cloud is selected as the result of forming the loop; the best method for judging the best is selected from the following two methods: one is to select the candidate with the highest matching degree, and the other is to select the candidate with the lowest RMSE;
[0033] If there is no candidate point cloud that passes the two checks, it is considered that there is no point cloud that forms a loop with the current input.
[0034] Furthermore, the step S5 is specifically as follows:
[0035] If the number of times new data is added reaches N u , the data in the key feature database are clustered again using the seeds of k-means++; due to the increase in the amount of data to be clustered, in order to maintain the descriptiveness of each word, the number of clusters will increase by Δ on the basis of the previous one w , the number of new clusters is still recorded as N w ; After clustering, we get N w A new clustering result is obtained to obtain a new dictionary, and the IDF value and the vocabulary distribution of each point cloud are updated according to the new dictionary.
[0036] Furthermore, in step S4, verification of supplementary indicators is also performed, and the indicators include:
[0037] Between two point clouds, If satisfied:
[0038]
[0039]
[0040] It is also believed that a loop occurs between the two point clouds, where represents the transformation matrix result obtained by registration, and d1 is the preset judgment threshold.
[0041] Beneficial effects of the present invention: The loop detection method of the present invention achieves better detection performance on data sets of different qualities. This loop detection method is not restricted by specific key points and local descriptor extraction methods, can be adapted to any method, and has better generalization performance. In addition to traditional indicators, the present invention also proposes a new indicator to identify real loops to make up for the omission problem of traditional indicators. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flow chart of the algorithm used in the specific embodiment of the present invention;
[0043] Figure 2 This is a graph showing the comparison of the results of applying three different local descriptor extraction methods in a specific embodiment of the present invention;
[0044] Figure 3 It is a comparison diagram of Precision-Recall (PR) curves of loop closure detection results of the method of the present invention and other two methods on the KITTI dataset in a specific embodiment of the present invention;
[0045] Figure 4 It is a comparison diagram of Precision-Recall (PR) curves of loop closure detection results of the method of the present invention and other two methods on the NCLT dataset in a specific embodiment of the present invention;
[0046] Figure 5 It is a comparison diagram of Precision-Recall (PR) curves of loop closure detection results of the method of the present invention and other two methods on the Complex Urban dataset in a specific embodiment of the present invention;
[0047] Figure 6 The following are examples of loop results in different directions detected in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0048] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0049] The algorithm flow chart used in the specific embodiment of the present invention is as follows: Figure 1 Before proceeding with this algorithm, we should first use the first N d Point cloud, initialize the dictionary and vocabulary distribution databases, the specific method is:
[0050] First, for the first N d Each point cloud is voxel sampled to extract key points and local descriptors. d =400. Using the first N d The key local descriptors of a point cloud (local descriptors corresponding to key points) and local descriptors constitute two databases: the key feature database and the full feature database.
[0051] Secondly, the data in the key feature database are clustered using k-medians using the seeds of k-means++ to obtain N w Clustering results, each cluster represents a vocabulary, and a dictionary database of the bag-of-words model is obtained. In this specific embodiment, initially, N w =50.
[0052] Again, according to the dictionary, calculate the IDF value corresponding to each word.
[0053] Finally, according to the dictionary, calculate the top N d Vocabulary distribution of point clouds: First, classify the key local descriptors corresponding to each point cloud, obtain the number of descriptors for each word (each category), and then calculate the term frequency-inverse document frequency (TF-IDF) of the results. The calculated TF-IDF value eventually constitutes the vocabulary distribution histogram corresponding to the current point cloud. The value stored in the i-th cell of the histogram is the TF-IDF value of the i-th word under the current point cloud. These vocabulary distributions constitute the vocabulary distribution database.
[0054] After initializing the dictionary and vocabulary distribution databases, the input point cloud is processed as follows: Figure 1 The process shown in the figure is processed, which specifically includes three parts: loop candidate point cloud screening, geometric verification, and dictionary and vocabulary distribution update.
[0055] The specific process of loop candidate point cloud screening is as follows:
[0056] First, after voxel sampling of the current input point cloud, the key point and local descriptor extraction method is used to extract the key points and local descriptors.
[0057] Secondly, following the same method as above, the vocabulary distribution histogram of the current input point cloud is obtained.
[0058] Thirdly, according to the vocabulary distribution, combined with the vocabulary distribution database, a rough screening of the loop candidate point cloud is performed. In the vocabulary distribution histogram, if the value stored in a cell is 0, the current point cloud does not have the vocabulary corresponding to this cell. Therefore, the vocabulary set of the current point cloud can be determined, which is recorded as The number of elements in is denoted as n w According to the vocabulary distribution database, it can be determined that each historical point cloud has The number of words in , denoted by n w , All change with the current input point cloud. It should be noted that in the specific implementation, the historical point cloud does not include the N points closest in time to the current input point cloud. g point clouds, because we assume that these point clouds are too close to the current input to cause loop closure. In this specific embodiment, N g =250. For the j-th historical point cloud, if:
[0059]
[0060] It is considered that the jth point cloud passes the coarse screening, where λ w is the threshold used for judgment.
[0061] Finally, all the point clouds that pass the coarse screening are finely screened. Specifically, the vocabulary distribution similarity of each point cloud that passes the coarse screening is calculated. The similarity is measured by the Euclidean distance between two vocabulary distribution histograms. The smaller the distance, the higher the similarity. Furthermore, all the point clouds that pass the coarse screening are sorted in descending order according to the similarity; then, according to the time consistency, the point clouds with similar time are grouped together: For each point cloud that passes the coarse screening, the ID value ID of this point cloud is j As the center, select other ID values in [ID j -n gap ,ID j +n gap ], together with this point cloud, form a point cloud group set; thus, a series of point cloud group sets can be obtained. Calculate the number of elements and the average similarity (average distance) in each point cloud group set, and select the two point cloud group sets with the largest number of point clouds and the highest average similarity; in addition, if historical loop information exists, select the point cloud group set where this historical loop is located at the same time. Select the top N most similar points in the selected point cloud groups. s point clouds, after deleting the duplicated identical point clouds, constitute the final set of loop candidate point clouds. s =5.
[0062] Furthermore, the geometric verification of the loop candidate point cloud is performed. The specific process is as follows:
[0063] First, check the point cloud distribution matching. For the current input point cloud and each candidate point cloud, determine the maximum and minimum values in the x and y directions respectively, which are recorded as: If satisfied:
[0064]
[0065] Then this candidate point cloud passes the point cloud distribution matching check, where and are two thresholds for determining the degree of distribution similarity. In this specific embodiment, and Varies with the data set.
[0066] Then, the candidate point cloud that has passed the point cloud distribution matching check is registered with the current input point cloud. The registration method is the RANSAC method based on point pair matching. The method for obtaining the point pair matching result is: for point i in the current input point cloud, obtain its corresponding local descriptor In the local descriptor of the candidate point cloud (this local descriptor is obtained from the entire feature database), the KD tree is used to find the descriptor that is closest to it. Descriptor The corresponding point j is considered to be the matching point of point i. After obtaining all the point pair matching results, RANSAC is applied on this result to achieve point cloud registration. At the same time, two measurement indicators, fitness and root mean square error (RMSE), can be obtained. The higher the fitness and the lower the RMSE, the more likely the two point clouds are from the same location. Therefore, if:
[0067] fitness>λ f
[0068] RMSE<λ r
[0069] The corresponding candidate point cloud is considered to have passed the registration check, where λ f and λ r There are two judgment thresholds, which adjust the strictness of the inspection. In a specific embodiment, the strictness of the inspection can be adjusted by changing these two thresholds.
[0070] Finally, for all candidate point clouds that pass the two geometric checks, the best candidate point cloud is selected as the result of forming a loop, and the historical loop point cloud information is updated accordingly. The best way to determine the best is to choose from the following two options: (1) select the candidate with the highest matching degree, (2) select the candidate with the lowest RMSE. If there is no candidate point cloud that passes the two checks, it is considered that the current input point cloud does not form a loop with the historical point cloud, and its vocabulary distribution is added to the vocabulary distribution database, and its key local descriptor and local descriptor are added to the key feature database and the entire feature database respectively.
[0071] Under the traditional judgment index, if the actual distance d between two point clouds gt satisfy:
[0072] d gt <d0
[0073] This indicates that a loop occurs between the two point clouds, where d0 is the judgment threshold; however, this traditional indicator has the possibility of omission. gt When it is slightly larger than d0, a loop still occurs between the two point clouds, but the traditional judgment criteria will miss this situation.
[0074] To solve this omission problem, the present invention provides a supplementary indicator for judging the occurrence of a real loop. If satisfied:
[0075]
[0076]
[0077] It is also believed that a loop occurs between the two point clouds, where represents the transformation matrix result obtained by registration, and d1 is the judgment threshold;
[0078] Since the main goal of loop closure detection is to achieve revisit detection without the help of odometer, in the above indicators, the pose relationship between two point clouds is only determined by registration based on matching point pairs, so it is also helpful for the back-end optimization of SLAM.
[0079] If the number of newly added data in the database reaches a certain number N u , then the dictionary and vocabulary distribution need to be updated as follows:
[0080] In this specific embodiment, N u =200. To achieve the update, the data in the key feature database is re-clustered using the k-means++ seed. At this time, in order to ensure the descriptive performance of each category (vocabulary), the number of clusters will increase by Δ based on the previous result. w, the number of new clusters is still recorded as N w In this specific embodiment, Δ w = 10. The newly obtained N w The clustering results constitute a new dictionary, and the IDF value and the vocabulary distribution of each point cloud will also be updated based on the new dictionary.
[0081] In order to select the key point and local descriptor extraction method, in this specific embodiment, three different extraction methods (FPFH, FCGF, D3Feat) are used to conduct experiments on the 00 sequence of the KITTI dataset. The PR (Precision-Recall) curve results of the experiment are shown in Figure 2. Figure 2 As shown. In a specific embodiment, unlike D3Feat which can extract key points and local descriptors at the same time, FPFH and FCGF can only extract local descriptors. Therefore, when applying these two methods, the point cloud is firstly subjected to normal space downsampling (NSS), and then the key points are extracted by the Intrinsic Shape Signatures (ISS) method.
[0082] from Figure 2 From the experimental results, the best results can be obtained by matching D3Feat with the algorithm proposed in the present invention, and D3Feat can extract key points and local descriptors at the same time, which is more suitable for the algorithm of the present invention than other methods. It is worth noting that although the D3Feat method is used in this specific embodiment, the present invention can be adapted to any key point and local descriptor extraction method.
[0083] Comparison of PR curve detection results between the method of the present invention and the other two methods on three different data sets Figure 3 Figure 4 and Figure 5 As shown. In this specific embodiment, the detection results corresponding to the two optimal candidate point cloud selection methods are reported at the same time. Compared with the other two methods, the present invention can obtain better performance on all three data sets of different quality (KITTI, NCLT, ComplexUrban), and achieve a higher recall rate (Recall) without significantly affecting the precision (Precision). This shows that the method of the present invention has better generalization ability. At the same time, regardless of whether the direction of the loop is the same (same) or opposite (reverse), the method of the present invention can achieve detection.
[0084] Figure 6The following figure shows an example of the detection results of the method of the present invention. The upper figure is from the 00 sequence of the KITTI dataset, and the loop direction is the same; the lower figure is from the 08 sequence of the KITTI dataset, and the loop direction is opposite. It can be seen that the method of the present invention can detect different loop directions.
[0085] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0086] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve the desired results.
[0087] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
Claims
1. A three-dimensional scene loop detection method based on an incremental bag-of-words model, characterized in that: The method comprises the following steps: S1, for the first N d Extract key points and local descriptors from point clouds, and build dictionary database and vocabulary distribution database; The specific construction of the dictionary database and vocabulary distribution database in step S1 is as follows: First, for the first N d Each point cloud is sampled by voxels to extract key points and local descriptors; the local descriptors corresponding to the key points are used as key local descriptors; a key feature database and a full feature database are constructed; secondly, the data in the key feature database are clustered by k-medians using the seeds of k-means++ to obtain N w The words are clustered as the result, and the dictionary database of the bag-of-words model is obtained; finally, the IDF value corresponding to each word is calculated according to the dictionary database and the top N words are clustered. d Classify the key local descriptors of each point cloud, obtain the vocabulary classification result corresponding to each key local descriptor, further calculate the corresponding TF-IDF value, obtain the vocabulary distribution histogram, store the TF-IDF value corresponding to this vocabulary in the relevant point cloud in the histogram, and the vocabulary distribution constitutes a vocabulary distribution database; S2, extract key points and local descriptors from the subsequent input point cloud, and classify the local descriptors corresponding to the key points according to the dictionary database, and perform weighted processing on the classification results using TF-IDF calculation to obtain a vocabulary distribution histogram; S3. Perform a rough screening based on the vocabulary distribution and the vocabulary distribution database, and calculate the similarity between the vocabulary distribution of the rough screening result and the current vocabulary distribution. At the same time, classify the rough screening result according to the time consistency to obtain a series of point cloud group sets. Select the top N most similar points from the two point cloud group sets with the largest number of point clouds and the highest average similarity. s point clouds are deleted and used as candidate point clouds; the coarse screening in step S3 is specifically as follows: In the vocabulary distribution histogram, if the value stored in a cell is 0, the current point cloud does not have the vocabulary corresponding to this cell, so the vocabulary set of the current point cloud is determined, which is recorded as The number of elements in is denoted as n w ; According to the vocabulary distribution database, determine the vocabulary of each historical point cloud. The number of words in , denoted by The historical point cloud here excludes the N points that are closest in time to the current input point cloud. g Point cloud, If satisfied: Then the jth point cloud passes the coarse screening, where λ w is the threshold used for judgment; The similarity between the vocabulary distribution of the rough screening result and the current vocabulary distribution is calculated in step S3 as follows: The vocabulary distribution similarity is calculated for each point cloud that passes the rough screening. The similarity is measured by the Euclidean distance between two vocabulary distribution histograms. The smaller the distance, the higher the similarity. In step S3, the rough screening results are classified according to the time consistency as follows: All point clouds that pass the rough screening are sorted in descending order according to similarity; then point clouds with similar time are grouped together according to time consistency. Specifically, for each point cloud that passes the rough screening, the ID value of this point cloud is j As the center, select other ID values in [ID j -n gap ,ID j +n gap ] other point clouds within the range, together with this point cloud, form a point cloud group set; thereby obtaining a series of point cloud group combinations; S4, loop detection: perform geometric verification on each candidate point cloud, select the best candidate that passes the geometric verification and forms a loop with the current input, and update the historical loop information; if no candidate passes the geometric verification or the candidate point cloud set is empty, no point cloud forms a loop with the current input point cloud, and the local descriptor and vocabulary distribution corresponding to the input point cloud are added to the database; the geometric verification of each candidate point cloud in step S4 is specifically as follows: S401: Perform a point cloud distribution matching check, and determine the maximum and minimum values in the x and y directions for the current input point cloud and each candidate point cloud, respectively, which are recorded as: If satisfied: Then this candidate point cloud passes the point cloud distribution matching check, where and are two thresholds used to judge the degree of distribution similarity; S402: The candidate point cloud checked by the point cloud distribution matching is further aligned with the current input point cloud; the local descriptors of the candidate point cloud are obtained from the entire feature database, and firstly, point pair matching is performed between the point clouds according to the local descriptors of the two point clouds: for each point in the input point cloud, the point corresponding to the descriptor closest to the point descriptor in the candidate point cloud is found as its pairing point; according to the result of the point pair matching, the RANSAC method is used to realize point cloud alignment, and two measurement indicators, matching degree and root mean square error, are obtained; therefore, if the matching degree is higher than the threshold λ f And the RMSE is lower than the threshold λ r , then the current candidate point cloud is considered to have passed the registration check; S5, if the number of times new data is added reaches N u , the dictionary is recalculated and the corresponding IDF value and vocabulary distribution are updated.
2. A three-dimensional scene loop detection method based on an incremental bag-of-words model according to claim 1, characterized in that: The extraction of key points and local descriptors in step S2 is specifically as follows: The current input point cloud is voxel sampled and extracted using key point and local descriptor extraction methods.
3. A three-dimensional scene loop detection method based on an incremental bag-of-words model according to claim 1, characterized in that: In step S3, the top N most similar points are selected from the two point cloud groups with the largest number of point clouds and the highest average similarity. s point clouds; if historical loop information exists, the point cloud group set selected for similarity additionally includes the point cloud group set where this historical loop is located.
4. A three-dimensional scene loop detection method based on an incremental bag-of-words model according to claim 1, characterized in that: The step of selecting the best candidate that passes the geometric verification in S4 is as follows: among all the candidate point clouds that pass the two checks, the best candidate point cloud is selected as the result of forming the loop; the best method for judging the best point cloud is selected from the following two methods: one is to select the candidate with the highest matching degree, and the other is to select the candidate with the lowest RMSE; If there is no candidate point cloud that passes the two checks, it is considered that there is no point cloud that forms a loop with the current input.
5. The three-dimensional scene loop detection method based on the incremental bag-of-words model according to claim 1, characterized in that: The step S5 is specifically as follows: If the number of times new data is added reaches N u , the data in the key feature database are clustered again using the seeds of k-means++; due to the increase in the amount of data to be clustered, in order to maintain the descriptiveness of each word, the number of clusters will increase by Δ on the basis of the previous one w , the number of new clusters is still recorded as N w ; After clustering, we get N w A new clustering result is obtained to obtain a new dictionary, and the IDF value and the vocabulary distribution of each point cloud are updated according to the new dictionary.
6. A three-dimensional scene loop detection method based on an incremental bag-of-words model according to claim 1, characterized in that: In step S4, verification of supplementary indicators is also performed, and the indicators include: Between two point clouds, the distance If satisfied: It is also believed that a loop occurs between the two point clouds, where represents the transformation matrix result obtained by registration, and d1 is the preset judgment threshold.
