Patent Publication Number: US-11645846-B2

Title: Closed-loop detecting method using inverted index-based key frame selection strategy, storage medium and device

Description:
CROSS REFERENCE TO RELATED APPLICATION(S) 
     This application claims priority to Chinese Patent Application No. 202110643771.2, filed with the Chinese Patent Office on Jun. 9, 2021, and entitled “CLOSED-LOOP DETECTING METHOD USING INVERTED INDEX-BASED KEY FRAME SELECTION STRATEGY, STORAGE MEDIUM AND DEVICE”. The aforementioned application is incorporated herein by reference in its entirety. 
     TECHNICAL FIELD 
     The present disclosure relates to a closed-loop detecting method using inverted index-based key frame selection strategy, storage medium and device. 
     BACKGROUND ART 
     Since Simultaneous Localization and Mapping (SLAM) algorithm is an effective method for localizing and mapping in prior art. Key frame selection plays an important role in the localization accuracy and mapping efficiency of the SLAM algorithm, and especially back-end optimization and closed-loop detection are performed based on the selected key frames. However, in the existing SLAM algorithm, the traditional key frame selection method is prone to the problem of missing key frames near inflection points of a curve motion trajectory, which makes the overall algorithm suffer from large accumulative errors in the process of mapping and closed-loop detecting, difficulties in accurate positioning and incomplete ability to correct the closed-loop errors. In addition, in order to ensure that enough image features are used to obtain the camera pose of the robot and the results are reliable, the current SLAM algorithms usually extract point features and line features both and combine them to calculate the poses. This method may cause redundant features and unnecessary computation in densely textured scenes, due to the fact that both point and line features are used for pose estimation. When line features need to be extracted and matched, the LSD algorithm is often used in the prior art. LSD, as an excellent local linear feature extraction algorithm, has the advantage of yielding line feature detection results with accuracy of sub-pixel level in linear time, and however, has some obvious disadvantages, such as further increased calculation time. 
     SUMMARY 
     The purpose of the present disclosure is to provide a closed-loop detecting method using inverted index-based key frame selection strategy, to solve the technical problems that the existing SLAM algorithm has a tendency to miss key frames near inflection points of a curve motion trajectory during mapping and closed-loop detecting and has a large computational effort. 
     The closed-loop detecting method using inverted index-based key frame selection strategy includes the following steps. 
     Step I: acquiring image information at a current position for being processed, extracting corresponding image features from the processed image information and solving a camera pose. 
     Step II: capturing image frames successively during movement of a robot, as consecutive image frames, performing, on the consecutive image frames, an indexing, in which the inverted index-based key frame selection strategy is introduced into a key frame selection strategy to supplement key frames which are prone to be missed in a conventional forward indexing during a curvilinear movement of the robot. 
     Step III: performing closed-loop detection and correction of accumulative errors based on image features carried by key frames. 
     Preferably, the key frame selection strategy includes: performing the indexing in indexing modes composed of a forward indexing with an indexing order identical with image acquisition order, and an inverted indexing, with an indexing order opposite to the image acquisition order, where in the forward indexing, the indexing is performed forwardly with a latest key frame as a starting point until a next key frame is searched or a last frame in the consecutive image frames is indexed; when a new key frame is determined based on an angle threshold of forward indexing, the inverted indexing start to be performed, and in the inverted indexing, the indexing is performed invertedly with the new key frame being a current key frame as a starting point until a previous key frame is searched; and in the forward indexing, a current consecutive image frame is selected as a key frame based on whether a displacement variation or a forward rotation variation between the current consecutive image frame and the current key frame reaches the corresponding threshold; and in the inverted indexing, an inverted rotation variation between the current key frame and each of normal frames located between the current key frame and the previous key frame is estimated, and when the inverted rotation variation is greater than the inverted angle threshold, corresponding normal frame is determined to be a missing key frame and added to a key frame library. 
     Preferably, a mathematical expression of the key frame selection strategy is:
 
 kf   j   ={f   i |([Δ p   ji &gt;τ]∪[Δθ ji &gt;γ 1 ]∪[Δθ ci &gt;γ 2 ])},
 
     where kf j  denotes a key frame, when the key frame selection strategy is satisfied, a new key frame is inserted and j is incremented, j=j+1, and when the inserted new key frame kf j  satisfies Δθ ji &gt;γ 1 , the new key frame kf j  is set as a starting point of the inverted indexing, which also is a current key frame kf c , c being a marker of a current frame, during supplementing key frame in the inverted indexing, the new key frame is set as a new starting point for subsequent inverted indexing without resetting the current key frame kf c , f i  denotes a i-th consecutive image frame; in forward indexing, Δp ji  denotes a displacement variation from a current i-th consecutive image frame f i  to a previous key frame kf j  which is a j-th key frame, and Δθ ji  denotes a forward rotation variation from the current i-th consecutive image frame f i  to the previous key frame kf j ; during inverted indexing the strategy, a rotation variation Δθ ci  between kf c  and the normal frame f i     c     −r , (i c−1 &lt;i c −r&lt;i c ) located between kf c  and kf c−1  is calculated, and then i=i c −r; Δθ ci  denotes the inverted rotation variation between the current key frame kf c  and the i-th consecutive image frame located between the current key frame kf c  and the previous key frame kf c−1  during the inverted indexing, τ denotes a displacement threshold, γ 1  denotes a forward angle threshold, τ and γ 1  are main basis for selecting key frames in the forward indexing, γ 2  denotes an inverted angle threshold, which is a basis for selecting key frames in the inverted indexing. 
     Preferably, a pose tracking decision under guidance of information entropy is provided, and includes: firstly extracting point features in the image, calculating an amount of information contained in the point features by information entropy H X , and calling line features in the image to assist in pose estimation when the information entropy H X  is below a set threshold, otherwise, performing the pose estimation by point features only. 
     Preferably, calling line features to assist in pose estimation includes: 
     step 1: acquiring the image information at the current position during environment exploration of the robot in an experimental scene, calculating an image pixel gradient, obtaining a line support region in a formed pixel gradient field by using a region growth algorithm, and performing rectangular estimation on the line support region to obtain alternative line features; 
     step 2: updating the rectangular line support region based on a number of false alarms, outputting LSD line features meeting criteria, so as to get an initial line feature set L n   i . 
     step 3: storing line features in the initial line feature set L n   i  in descending order of length value, and performing screening and merging on them according to certain requirements to obtain a new line feature set H n   i . 
     step 4: performing effective linear matching by using appearance and geometric constraint of the linear features after eliminating redundant line features, so as to solve the camera pose. 
     Preferably, the step 3 includes: 
     step 3.1: calculating a number of line features with upper line segment lengths greater than a length threshold λ in the current image frame, and storing these line features into a set N λ ; 
     step 3.2: reserving first δ line features in set H n   i , when a number of line features in set N λ  is greater than δ, δ being a threshold value adapted to overall sparsity of scene texture, and removing other redundant line features in set H n   i  to obtain a new set N λ . 
     step 3.3: splicing over-segmented long line features by splicing broken line features when the number of line features in set N λ  is less than δ, and updating H n   i  and N λ  simultaneously; stopping step 3.3 and returning to step 3.2 when the number of line features in set N λ  is greater than or equal to δ; and otherwise, reserving and outputting all line features in the initial line feature set L n   i , in case that scene texture in the current image frame is sparse. 
     Preferably, step III includes: searching, after selecting a new key frame, all other key frames with same vocabulary as that of the selected key frame in the map by using a bag-of-words vector in a bag-of-words model, and determining whether a moving trajectory forms a closed loop by calculating a similarity score between features of the selected key frames and the new key frame. 
     The present disclosure also provides a computer readable storage medium having a computer program stored thereon, the computer program when executed by a processor implements the steps of a closed-loop detecting method using inverted index-based key frame selection strategy as described above. 
     The present disclosure also provides a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, said computer program when executed by the processor implements the steps of a closed-loop detecting method using inverted index-based key frame selection strategy as described above can be implemented. 
     The present disclosure has the following advantages. 
     (1) To address the problem of feature computation redundancy due to the fact that Simultaneous Localization and Mapping (PL-SLAM) algorithm uses both point and line features (for pose tracking) in dense scenes, an information entropy-based guided pose tracking strategy is proposed, The priority extracted feature points are evaluated by utilizing the information entropy. A fusion of point and line features is determined based on evaluation results. The method avoids the problem of data redundancy caused by the simultaneous use of point and line features in scenes with dense textures, and improves the real-time performance of the algorithm. 
     (2) To address the problem that long line features are over-segmented into short line features when LSD line features are extracted, resulting in more short line features and causing false matching interference for subsequent feature matching. Selection under conditions and a splicing method for broken line features are performed on the short line features extracted by the LSD algorithm to eliminate redundant short line features, thereby improving the accuracy of feature matching. 
     (3) To address the problem that key frames missed during curvilinear motion by utilizing the conventional key frame selection method, an inverted index-based key frame selection strategy is proposed in the present disclosure. In the strategy, the inverted index-based key frame selection strategy is enabled when a new key frame is determined based on the rotation variation, to calculate the inverted rotation variation between the current key frame and all normal frames between the current key frame and the previous key frame. When the inverted rotation variation exceeds the set threshold, the corresponding normal frames are added as key frames. In this way, the problem that the key frame missed during curvilinear motion can be solved by introducing the inverted index-based key frame selection strategy, and the closed-loop accuracy and positioning precision of the algorithm can be improved. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG.  1    shows a framework diagram of a closed-loop detecting method using inverted index-based key frame selection strategy according to the present disclosure. 
         FIG.  2    shows a flow chart of screening line features by condition according to the present disclosure. 
         FIG.  3    shows a comparison diagram of effects of line feature extraction according to the present disclosure. 
         FIG.  4    shows a framework diagram of an information entropy-based guided pose tracking decision according to the present disclosure. 
         FIG.  5    shows a schematic diagram of an inverted index-based key frame selection strategy according to the present disclosure. 
         FIG.  6    shows a schematic diagram of epipolar geometry constraint for point features and the triangulation algorithm for line features in the present disclosure. 
         FIG.  7    shows a comparison among feature extractions by utilizing three algorithms in scenes with different densities according to experiment I in the present disclosure. 
         FIG.  8    shows a diagram of trajectories under KITTI dataset sequences by utilizing the three algorithms in experiment II according to the present disclosure. 
         FIG.  9    shows a diagram of trajectories under TUM dataset sequences by utilizing the three algorithms in experiment III according to the present disclosure. 
         FIG.  10    shows a comparison diagram of accuracy versus recall under TUM dataset by utilizing the three algorithms in experiment III according to the present disclosure. 
         FIG.  11    shows comparison diagram of running time under the TUM dataset by utilizing the three algorithms in experiment III according to the present disclosure. 
     
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
     In order to help those skilled in the art to have a more complete, accurate and in-depth understanding of the conception, technical solutions of the present disclosure, the following specific embodiments of the present disclosure are described in further detail against the accompanying drawings. 
     Considering that the existing PL-SLAM algorithm uses both point and line features for pose tracking in dense scenes and easily causes redundancy during feature computing, a new IFPL-SLAM algorithm, also called improved fast PL-SLAM algorithm, is proposed by further improving the PL-SLAM algorithm. A closed-loop detecting method using inverted index-based key frame selection strategy is implemented by using the IFPL-SLAM algorithm. Specific examples are described as follows. 
     Example I 
     As shown in  FIGS.  1 - 11   , a closed-loop detecting method using inverted index-based key frame selection strategy is provided, which includes the following steps. 
     In step I, information of an image at a current position is acquired, and processed to extract corresponding image feature for calculating a camera pose. 
     To avoid feature redundancy caused by extracting point and line features both for pose estimation in dense image texture scenes, a pose tracking decision under guidance of information entropy is proposed in the present disclosure. According to the tracking decision, after the robot acquires the visual scene image sequence, firstly point features in the image are extracted, and the information amount of the point features are calculated by utilizing information entropy. Then, line features in the image are called for auxiliary pose estimation when the information amount of the point features is insufficient; otherwise, the pose estimation is performed only by utilizing the point features. The framework diagram of the pose tracking decision under guidance of information entropy is shown in  FIG.  4   . 
     Information entropy is a quantitative measurement of random discrete information, and can directly represent the amount of information contained in an image. In view of uncertain distribution of feature points extracted from the image, the present disclosure calculates the amount of information contained in a preferentially extracted point feature i by utilizing the information entropy. The calculation rule is shown in following equation (1): 
     
       
         
           
             
               
                 
                   
                     H 
                     X 
                   
                   = 
                   
                     - 
                     
                       
                         ∑ 
                         
                           i 
                           = 
                           1 
                         
                         n 
                       
                       
                         
                           P 
                           ⁡ 
                           ( 
                           
                             
                               x 
                               i 
                             
                             , 
                             
                               y 
                               i 
                             
                           
                           ) 
                         
                         ⁢ 
                         
                           
                             
                               log 
                               2 
                             
                             ( 
                             
                               P 
                               ⁡ 
                               ( 
                               
                                 
                                   x 
                                   i 
                                 
                                 , 
                                 
                                   y 
                                   i 
                                 
                               
                               ) 
                             
                             ) 
                           
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
           
         
       
     
     Where P(x i ,y i ) denotes a probability that an i-th feature point appears at a position (x i ,y i ) in the image; n represents a number of feature points in the image; H X  represents an information entropy of the feature points in the image. The larger a value of the information entropy is, the more information carried by the extracted feature points in the image is; otherwise, the smaller the value of the information entropy is, the less information carried by the extracted feature points in the image is. 
     When the information entropy H X  of the point features is higher than the set threshold ξ (ξ is an empirical value and estimated from multiple experiments), it indicates that the point features on this image are enough for the algorithm to perform pose estimating and tracking, that is, the line features in the environment need not be called at this time. When the scene texture features in the image become sparse, the difficulty of extracting point features increases, the number of point features decreases or distribution is uneven, and further the information entropy H X  is lower than the set threshold ξ at this time. In order to ensure that there is enough environmental information to participate in the pose estimation, the line features in the image are called to assist in the pose estimation, to avoid the loss of pose tracking. In addition, compared with conventional point-line fusion visual odometry, through optionally involving the line features in the pose estimation, the method fundamentally avoids the redundant extraction and computation of image features, thereby alleviating the problems such as tight computational resources and lack of real-time due to a large amount of computation. The decision algorithm under guidance of information entropy for pose tracking is shown as follows. 
     
       
         
           
               
             
               
                   
               
               
                 Algorithm 1  
               
               
                 Information entropy-based guided pose tracking decision algorithm 
               
               
                   
               
             
            
               
                   
               
            
           
           
               
            
               
                 Input: Continuous image frame f i   
               
               
                 Output: Current robot’s pose estimation 
               
               
                 Parameters: Information entropy threshold of point features ξ 
               
               
                 FOR new f i  available THEN 
               
               
                  Point features of a image are extracted by utilizing ORB algorithm 
               
               
                   
               
               
                  
                  Calculating   ⁢         information   ⁢         entropy   ⁢         score   ⁢         of   ⁢         point   ⁢         features   :                 H   X     =     -       ∑     i   =   1     n         P   ⁡   (       x   i     ,     y   i       )     ⁢       log   2     (     P   ⁡   (       x   i     ,     y   i       )     )                       
 
               
               
                   
               
               
                  IF H X  &gt; ξ THEN 
               
               
                    Matching point features in the image to estimate the current pose  
               
               
                    of the robot 
               
               
                  ELSE 
               
               
                   Calling line features in the image, extracting line features by using  
               
               
                   LSD algorithm, and filtering and splicing broken line features by  
               
               
                   condition 
               
               
                   Feature matching based on a fusion of point and line features to  
               
               
                   estimate the current position of the robot 
               
               
                  END IF 
               
               
                 END FOR 
               
               
                   
               
            
           
         
       
     
     LSD algorithm in the prior art is usually adopted to extract and match line features. As an excellent local linear feature extraction algorithm, LSD algorithm has the advantage of obtaining line feature detection results with sub-pixel accuracy in linear time. However, LSD algorithm has obvious disadvantages, such as time-consuming computation. Therefore, in the present method, the line features extracted by the LSD algorithm is screened by condition, including splicing over-segmented line features and removing the redundant short line features, to reduce the computation time consuming in redundant matching, as well as improve the accuracy of line feature matching. Step I is the specific process of the improved line feature-assisted pose estimation method. 
     In step 1, the image information at the current position is acquired during environment exploration of a robot in the experimental scene, and calculates image pixel gradient, including a direction L θ  and an amplitude G(x,y), as shown in equations (2)-(4). 
     
       
         
           
             
               
                 
                   { 
                   
                     
                       
                         
                           
                             
                               g 
                               x 
                             
                             ( 
                             
                               x 
                               , 
                               y 
                             
                             ) 
                           
                           = 
                           
                             
                               
                                 i 
                                 ⁡ 
                                 ( 
                                 
                                   
                                     x 
                                     + 
                                     1 
                                   
                                   , 
                                   y 
                                 
                                 ) 
                               
                               + 
                               
                                 i 
                                 ⁡ 
                                 ( 
                                 
                                   
                                     x 
                                     + 
                                     1 
                                   
                                   , 
                                   
                                     y 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                               - 
                               
                                 i 
                                 ⁡ 
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                               - 
                               
                                 i 
                                 ⁡ 
                                 ( 
                                 
                                   x 
                                   , 
                                   
                                     y 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                             
                             2 
                           
                         
                       
                     
                     
                       
                         
                           
                             
                               g 
                               y 
                             
                             ( 
                             
                               x 
                               , 
                               y 
                             
                             ) 
                           
                           = 
                           
                             
                               
                                 i 
                                 ⁡ 
                                 ( 
                                 
                                   x 
                                   , 
                                   
                                     y 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                               + 
                               
                                 i 
                                 ⁡ 
                                 ( 
                                 
                                   
                                     x 
                                     + 
                                     1 
                                   
                                   , 
                                   
                                     y 
                                     + 
                                     1 
                                   
                                 
                                 ) 
                               
                               - 
                               
                                 i 
                                 ⁡ 
                                 ( 
                                 
                                   x 
                                   , 
                                   y 
                                 
                                 ) 
                               
                               - 
                               
                                 i 
                                 ⁡ 
                                 ( 
                                 
                                   
                                     x 
                                     + 
                                     1 
                                   
                                   , 
                                   y 
                                 
                                 ) 
                               
                             
                             2 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
       
         
           
             
               
                 
                   
                     L 
                     θ 
                   
                   = 
                   
                     arc 
                     ⁢ 
                     
                       tan 
                       [ 
                       
                         
                           - 
                           
                             
                               g 
                               x 
                             
                             ( 
                             
                               x 
                               , 
                               y 
                             
                             ) 
                           
                         
                         / 
                         
                           
                             g 
                             y 
                           
                           ( 
                           
                             x 
                             , 
                             y 
                           
                           ) 
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   3 
                   ) 
                 
               
             
           
         
       
       
         
           
             
               
                 
                   
                     G 
                     ⁡ 
                     ( 
                     
                       x 
                       , 
                       y 
                     
                     ) 
                   
                   = 
                   
                     
                       
                         
                           
                             
                               g 
                               x 
                             
                             ( 
                             
                               x 
                               , 
                               y 
                             
                             ) 
                           
                           2 
                         
                         + 
                         
                           
                             
                               g 
                               y 
                             
                             ( 
                             
                               x 
                               , 
                               y 
                             
                             ) 
                           
                           2 
                         
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
           
         
       
     
     Where g x (x,y), g y (x,y) represent gradients of pixel points in x-axis and y-axis directions, and i(x,y) denotes a grayscale value of a pixel point at position (x,y) in the image. A line support region is obtained in the formed pixel gradient field by using a region growing algorithm, and subsequently a rectangular estimation is performed on this support region to obtain alternative line features. 
     In step 2, the rectangular line support region is updated based on a number of false alarms (NFA), and the LSD line features that meet criteria are output. The specific expression is expressed in equation (5). 
     
       
         
           
             
               
                 
                   { 
                   
                     
                       
                         
                           
                             
                               Output 
                               ⁢ 
                                   
                               line 
                               ⁢ 
                                   
                               support 
                               ⁢ 
                                   
                               region 
                               ⁢ 
                                   
                               R 
                               ⁢ 
                                   
                               is 
                               ⁢ 
                                   
                               the 
                               ⁢ 
                                   
                               line 
                               ⁢ 
                                   
                               feature 
                             
                             , 
                             
                               NFA 
                               &lt; 
                               ε 
                             
                             , 
                           
                         
                       
                       
                         
                           
                             
                               Update 
                               ⁢ 
                                   
                               the 
                               ⁢ 
                                   
                               line 
                               ⁢ 
                                   
                               support 
                               ⁢ 
                                   
                               region 
                               ⁢ 
                                   
                               R 
                             
                             , 
                             
                               NFA 
                               ≥ 
                               
                                 ε 
                                 . 
                               
                             
                           
                         
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
     Where threshold ε represents an evaluation of a density of pixel points in a rectangle. The output line features are described by using LBD description operator. The extracted line features are stored in a set L n   i =(l 1   i , l 2   i , l 3   i , . . . l n   i ). The set L n   i  indicates that there are a total of n line features in an i-th frame image, and l n   i  denotes an n-th line feature in the i-th frame image, and the set L n   i  is an initial set of line features. 
     In step 3, the line features in the set L n   i  are sorted in descending order of length value, and are screened and merged according to certain requirements to obtain a new line feature set H n   i ={h 1   i , h 2   i  . . . h n   i }. Where a number of elements in the set H n   i  and the line feature information carried by the elements themselves remain unchanged from L n   i . This step includes the following sub-steps. 
     In step 3.1, a number N λ  of line features with upper line segment lengths greater than a length threshold λ in the current image frame f c  is calculated and expressed as N λ ={H|h n   i &gt;λ,i=c}. 
     In step 3.2, when a number of line features in the set N λ  is greater than δ, which is a threshold value adapted to the overall sparsity of the scene texture, first δ line features are reserved and other redundant line features in set H n   i  are removed to update set H n   i . 
     In step 3.3, if the number of line features in the set N λ  is less than δ, the over-segmented long line features are spliced by means of the a splicing method for broken line features and simultaneously H n   i  and N λ  are updated, When the number of line features in the set N λ  is greater than or equal to δ, the step is stopped and returned to step 3.2. Otherwise, it means that the scene texture in the current frame f c  is sparse, that is, the camera may be in an area of sparse texture or a camera shake may occur and cause poor image quality. In this case, all line features in the initial line feature set L n   i , are reserved and output. The flow chart of the above steps is shown in  FIG.  2   . 
     In step 4, after eliminating the redundant line features, an effective linear matching is performed by utilizing the appearance and geometric constraints of the linear features, to obtain poses of the camera. 
       FIGS.  3 ( a ) and  3 ( c )  show diagrams of the effects of line feature extraction by utilizing LSD. In these FIGS., there are more short line features and a few long line features that are over-segmented due to reasons such as light and characteristics of the object itself in the image.  FIGS.  3 ( b ) and  3 ( d )  show diagrams of the effects of line feature extraction by means of conditional screening. It can be seen from the figures that the redundant short line features and partial line features extracted repeatedly are eliminated from the image by utilizing the conditional screening method according to the present disclosure, such that the distribution of the extracted line features is clearer in the image, which provides a good foundation for the subsequent line feature matching. 
     In step II, a first image frame is determined as a first key frame, and image frames are acquired successively during the robot movement as consecutive image frames (also called as normal frames). The consecutive image frames are indexed, and new key frames are selected from them based on the key frame selection strategy, to be interpolated into the key frame library. 
     Now, the key frame selection strategy is described. The adopted indexing mode includes a forward indexing mode in which the indexing order is the same as the image acquisition order, and an inverted indexing mode in which the indexing order is opposite to the image acquisition order. In the forward indexing, indexing is performed forwardly from the latest key frame as a starting point, until the next key frame is picked or the last image frame in the consecutive image frames is indexed. When a new key frame is determined based on the angle threshold of forward indexing, by means of the inverted key frame indexing strategy, indexing is performed invertedly from the new key frame as a starting point, until a previous key frame is searched. In the forward indexing, a consecutive image frame is determined as a key frame based on whether the displacement variation or the forward rotation variation from the current consecutive image frame and the current key frame satisfy respective thresholds. In the inverted indexing, inverted rotation variations between the current key frame and all normal frames between the current key frame and the previous key frame is estimated, and a normal frame is determined as a missed key frame and added in the key frame library based on whether the respective inverted rotation variation is greater than an inverted angle threshold. Both the forward rotation variation and the inverted rotation variation are rotation variations. The inverted indexing and forward indexing can be performed simultaneously, i.e., a bi-directional indexing can be performed simultaneously. 
     The mathematical expression of the key frame selection strategy is expressed as follows:
 
 kf   j   ={f   i |([Δ p   ji &gt;τ]∪[Δθ ji &gt;γ 1 ]∪[Δθ ci &gt;γ 2 ])}  (6).
 
     Where kf j  denotes a key frame. When the key frame selection strategy is satisfied, a new key frame kf j  is inserted and j is incremented, namely j=j+1. When the newly inserted key frame kf j  satisfies Δθ ji &gt;γ 1 , the key frame is set as a starting point for the inverted indexing, i.e., the current key frame kf c , c being a marker of the current frame. When the key frame is added during the inverted indexing, the new key frame is set as a new starting point for successive inverted indexing, without resetting the current key frame kf c . f i  represents a continuous image frame; in the forward indexing, Δp ji  represents a displacement variation from an current i-th frame f i  to the previous key frame kf j  (i.e., a j-th key frame); and Δθ ji  represents a forward rotation variation from the current i-th frame f i  to the previous key frame kf j  (i.e., the j-th key frame). An rotation variation Δθ ci  between kf c  and the ordinary frame f i     c     −r , (i c−1 &lt;i c −r&lt;i c ) located between kf c  and kf c−1  when inverted indexing is performed according to the strategy, and in the case, i=i c −r and Δθ ci  denotes the inverted rotation variation between the current key frame kf c  and the i-th consecutive image frame located between the current key frame kf c  and the previous key frame kf c−1  during the inverted indexing. τ denotes a displacement threshold. γ 1  denotes the a forward angle threshold, τ and γ 1  are main basis for selecting key frames in the forward indexing. γ 2  denotes an inverted angle threshold, which is the basis for selecting key frames in the inverted indexing. 
     The process of indexing and selecting key frames is specified below based on the attached drawings. A robot travels in an indicated direction and acquires data about consecutive image frames. A first frame of the consecutive image frames is determined as a first key frame, and its position is set as a starting point of a world coordinate system. A pose change between frames is estimated by an Epipolar Geometry method and a matrix characterizing the pose change between frames is expressed as Equation (7) by utilizing the Epipolar Geometry method. After the point and line features in the image are extracted and matched, Epipolar Geometry Constraint of the point features and the triangulation algorithm for the line features, as shown in  FIG.  6   . Taking a point feature as an example, projections of a point P=[X,Y,Z] T  in space in two frames are expressed as p 1  and p 2  respectively, and pixel positions of pixel points p 1  and p 2  can be obtained by utilizing a pinhole camera model, and are expressed as follows. 
     
       
         
           
             
               
                 
                   { 
                   
                     
                       
                         
                           
                             
                               
                                 
                                   s 
                                   1 
                                 
                                 ⁢ 
                                 
                                   p 
                                   1 
                                 
                               
                               = 
                               KP 
                             
                             , 
                           
                         
                       
                       
                         
                           
                             
                               
                                 s 
                                 2 
                               
                               ⁢ 
                               
                                 p 
                                 2 
                               
                             
                             = 
                             
                               
                                 K 
                                 ⁡ 
                                 ( 
                                 
                                   
                                     
                                       R 
                                       21 
                                     
                                     ⁢ 
                                     P 
                                   
                                   + 
                                   
                                     t 
                                     21 
                                   
                                 
                                 ) 
                               
                               . 
                             
                           
                         
                       
                     
                     . 
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
           
         
       
     
     Where s 1  and s 2  are scale factors, K represents an intrinsic matrix of the camera, and R 21  and t 21  represent the rotation and translation matrices of I 2  with respect to I 1 , respectively, which can be obtained by using a fundamental matrix or an essential matrix to recover motion of the camera. After the rotation and translation matrices are derived, three-dimensional (3D) vectors are projected onto a 2D plane, and then a translation variation Δp and a rotation variation Δθ between any two frames required by this algorithm can be obtained. A change of the rotation variation Δθ is small during rectilinear motion of the robot, and the change is mainly reflected in the translation variation Δp. Therefore, a key frame is obtained by utilizing a displacement threshold τ during the rectilinear motion of the robot, that is, the key frame is selected when Δp exceeds the displacement threshold τ, which corresponds to the forward indexing in  FIG.  5   . 
     In a specific embodiment of the present solution, when the robot exercises a curvilinear motion, especially when the robot turns a corner, the robot can undergo large driving angle changes in a short time and short distance range. In this case, if the image frame at a key position is not set as a key frame, resulting in missing key frames at the key position, the subsequent closed-loop detection and accumulative error correction will be directly affected, and in turn a construction of the global consistent trajectory map will be affected. Therefore, when the robot exercises a curvilinear motion, it is necessary to combine a forward angular threshold and an inverted angular threshold for key frame selection. The specific process of key frame selection is as follows. Δp jc  and Δθ jc  represent the displacement and angle variations of the current frame f c  relative to the previous key frame kf j  respectively, and the rotation variation Δθ jc  between the current frame f c  and the previous key frame kf j  is calculated, where c is a marker of the current frame and j represents a serial number of the key frame. When Δθ jc  is greater than the forward angle threshold γ 1 , the current key frame is set as a new key frame and is denoted as the current key frame kf c . Moreover, bi-directional indexing is performed from the current key frame as the starting point. The bi-directional indexing includes forward indexing and inverted indexing. In the inverted indexing, inverted rotation variations Δθ ci  between kf c  and all normal frames between kf c  and kf c−1  are estimated, and when Δθ ci  is greater than the inverted angle threshold γ 2 , corresponding consecutive image frame f i  is selected as a key frame and inserted into the key frame library.  FIG.  5    shows a schematic diagram of the inverted indexing-based key frame selection strategy. The above process does not interrupt the forward indexing for key frames, that is inter-frame pose estimation is performed at the same time and new key frames are further selected based on the translation threshold τ and the angle threshold γ 1 . In practice, γ 1  and γ 2  are influenced by the sparsity of environmental textures, and are generally set to be γ 1 &gt;γ 2  to avoid redundancy of key frames. The algorithm of the inverted index-based key frame selection strategy is shown below. 
     
       
         
           
               
             
               
                   
               
               
                 Algorithm 2 Inverted indexing-based key frame selection strategy 
               
               
                   
               
             
            
               
                   
               
            
           
           
               
            
               
                 Input: Continuous image frame f i   
               
               
                 Output: Key frame kf j   
               
               
                 Parameters: displacement threshold τ, forward angle threshold γ 1 , 
               
               
                 inverted angle threshold γ 2   
               
               
                 kf 1  ← f 1   
               
               
                 FOR new f i  available THEN 
               
               
                  Calculating the displacement variation Δp ji , rotation variation Δθ ji   
               
               
                  between f i  and the previous key frame kf j   
               
               
                  IF Δp ji  &gt; τ THEN 
               
               
                   Insert a new key frame, kf j  ← f i , j = j + 1 
               
               
                  ELSEIF 
               
               
                    Δθ ji  &gt; γ 1  THEN 
               
               
                   Insert a new key frame, kf j  ← f i , j = j + 1 
               
               
                    The current key frame kf c  is set as the starting point for inverted 
               
               
                    indexing to calculate the rotation variation Δθ ci  between kf c  and the 
               
               
                    normal frame f i     c     −r ,(i c−1  &lt; i c  − r  &lt; i c ) between kf c  and kf c−1  . 
               
               
                      IF Δθ ci  &gt; γ 2  THEN 
               
               
                     Insert a new key frame, kf j  ← f i , j = j + 1 
               
               
                      ELSE 
               
               
                      RETURN NULL 
               
               
                      END IF 
               
               
                  END IF 
               
               
                 END FOR 
               
               
                   
               
            
           
         
       
     
     If all key frames inserted are periodically rearranged to facilitate performing closed-loop detection in step III for searching for the key frame, the key frame acquired by utilizing the inverted indexing can be set as kf c     j     −s , which represents a s-th new key frame obtained by utilizing the inverted indexing with the j-th key frame as a starting point before the rearrangement. The obtained key frame kf c     j     −s  is inserted between kf c−1  and kf c  or between kf c−1  and the previous key frame kf c     j     −s . A key frame kf c     j     −s  obtained by combining the inverted indexing is rearranged from f 1 . When the rearrangement is performed to the key frame kf c     j     −s  obtained by the inverted indexing, where the value of s is the maximum value s j , and the key frame after rearrangement is denoted as kf j . Further, the next key frame kf c     j     −s  subject to rearrangement is denoted as kf j , and j=j−s+s j , where s represents the s-th new keyframe obtained by the inverted indexing, s j  represents the maximum value of s in kf c     j     −s . In the subsequent rearrangements involved m different key frames kf c     j     −s  with different j, j=k 1 , k 2 , . . . k m , for each key frame kf c     j     −s , a maximum value s km  of s is incremented during rearrangement. Thus, the serial number in rearrangement can be expressed as j=j−s+s k1 +s k2 + . . . +s km , where k1, k2, . . . km represent the 1st, 2nd, . . . mth values of j in all key frames kf c     j     −s  before the current key frame kf j  is rearranged. A new key frame sequence obtained after rearrangement is used in step 3. 
     In step III, closed-loop detection is performed based on the acquired image features and the accumulative errors are corrected. 
     The step is specifically described below. After selecting key frame, all other key frames with the same vocabulary as that of the selected key frame are searched in the map by using the bag-of-words vectors in the bag-of-words model, and a similarity score between the features of the selected key frame and the new key frame is calculated to determine whether the motion trajectory forms a closed loop. In calculating the similarity score, based on proportions of the points and lines in the closed-loop candidate frames, the point and line features are weighted.
 
 S   ij =ω ij   p   S   ij   p +ω ij   l   S   ij   l   (8).
 
     Where ω ij   p  and ω ij   l  represent weights of the point feature and line feature in the current closed-loop candidate frame respectively, which are determined by the respective numbers of correctly matched point and line features on the corresponding frame, and both changed in the same interval [0, 1]. S ij   p  and S ij   l  represent the similarity scores of the point and line features respectively. 
     Now, in combination with specific experiments, the closed-loop detecting method using inverted index-based key frame selection strategy is illustrated. 
     The method proposed in this patent was experimentally verified on a computer with hardware and software configuration of CPU which adopts i5 processor, main frequency of 2.9 GHz, RAM with 8G memory capacity, and Operating System which adopts Ubuntu 18.04. The datasets used are the publicly available KITTI dataset and TUM dataset. 
     Experiment I. Point and Line Feature Extraction Experiment 
     A comparison of the feature extraction results obtained by the 3 algorithms, ORB-SLAM2, PL-SLAM and IFPL-SLAM, on the TUM dataset is shown in  FIG.  7   . The comparison results of feature extraction time and matching accuracy for the 3 algorithms are shown in Table 1. The scenes shown in  FIGS.  7 ( a ) to  7 ( f )  are rich in texture information and dense in point and line features. From the comparison among the feature extraction results of the six figures, it can be seen that rich feature information can be extracted in the dense scene by utilizing the above three algorithms. Further, in comparison with the PL-SLAM algorithm, the IFPL-SLAM algorithm adopts the pose tracking decision under guidance of information entropy, in which the point features, which are extracted from the image by calculating the information entropy of the point features, can already satisfy the camera pose solution. Therefore, in the present disclosure, line feature extraction is not performed on the image frame, thereby saving the time cost for processing line features. Compared with the PL-SLAM algorithm, the processing time per frame of the present disclosure is reduced by 16.0%. The scenes shown in  FIGS.  7 ( h ) to  7 ( i )  is sparsely textured, in which the ORB-SLAM2 algorithm, which extracts only point features, has a low matching accuracy due to the lack of a sufficient number of uniformly distributed point features for feature matching. IFPL-SLAM algorithm overcomes the disadvantage of insufficient point features in sparse scenes, and in the case of insufficient point features in sparse scenes, the algorithm can timely calls the line features in the environment, which then be conditionally screened to remove redundant line features, thereby improving the accuracy of feature matching on the whole. Compared with ORB-SLAM2, the accuracy of feature matching for the method according to the present disclosure is improved by 7.8%. 
     
       
         
           
               
             
               
                 TABLE 1 
               
             
            
               
                   
               
               
                 Comparison of feature matching accuracy and feature 
               
               
                 processing time for 3 algorithms under TUM dataset 
               
            
           
           
               
               
               
            
               
                   
                 Feature Matching 
                 Feature extraction 
               
               
                   
                 Accuracy (%) 
                 time (ms) 
               
            
           
           
               
               
               
               
               
               
               
            
               
                 TUM 
                 ORB- 
                 PL- 
                 IFPL- 
                 ORB- 
                 PL- 
                 IFPL- 
               
               
                 Sequence 
                 SLAM2 
                 SLAM 
                 SLAM 
                 SLAM2 
                 SLAM 
                 SLAM 
               
               
                   
               
            
           
           
               
               
               
               
               
               
               
            
               
                 fr2/360- 
                 84.5 
                 87.5 
                 90.8 
                 38.5 
                 54.2 
                 45.6 
               
               
                 hemisphere 
               
               
                 fr3/large/ 
                 76.5 
                 85.7 
                 89.4 
                 40.6 
                 57.3 
                 50.1 
               
               
                 cabinet 
               
               
                 fr1/plant 
                 85.6 
                 83.6 
                 88.9 
                 42.3 
                 57.8 
                 47.2 
               
               
                 fr2/xyz 
                 86.7 
                 88.1 
                 90.1 
                 40.5 
                 60.1 
                 49.7 
               
               
                 Average 
                 83.3 
                 86.9 
                 89.8 
                 40.5 
                 57.4 
                 48.2 
               
               
                   
               
            
           
         
       
     
     Experiment II. Evaluation Based on KITTI Dataset 
     The test results of the method proposed in present disclosure on the KITTI dataset are shown below.  FIGS.  8 ( a ) to  8 ( d )  show the comparison results of the trajectory maps obtained by utilizing the 3 algorithms of ORB-SLAM2, PL-SLAM and IFPL-SLAM, under 4 sequences of KITTI dataset, respectively. Table 2 shows the comparison data obtained by utilizing the 3 algorithms on the 4 dataset sequences. Sequence 01 and Sequence 10 are simpler, and three algorithms achieve tracking with different accuracies, in which the trajectory of IFPL-SLAM algorithm is closer to the real trajectory.  FIG.  8 ( c )  shows the trajectory maps obtained by utilizing the three algorithms on Sequence 08, which has sparse scene texture information when the real trajectory coordinate is near a position (375, 400). In the ORB-SLAM2 algorithm, tracking loss occurs due to fewer point features extracted in the sparse scene. However, in the IFPL-SLAM and PL-SLAM algorithms, mapping of the entire environment is completed by the virtue of the complementary tracking of line features. The Sequence 02 shown in  FIG.  8 ( d )  is a closed loop-based image sequence, and all the three algorithms correct the accumulative error by closed-loop detection. As can be seen from partial enlarged views in  FIGS.  8 ( c ) and  8 ( d ) , during cornering and curvilinear motion, the positioning accuracy of algorithm is improved due to the fact that more key frames at key locations are supplemented by utilizing the inverted index-based key frame selection strategy in the IFPL-SLAM algorithm, which cause the absolute trajectory error of IFPL-SLAM to be reduced by 23.4% compared with PL-SLAM algorithm and 43.0% compared with ORB-SLAM2. Evidently, the present disclosure has a major advantage over ORB-SLAM2 and PL-SLAM algorithms in terms of positioning accuracy. 
     
       
         
           
               
             
               
                 TABLE 2 
               
             
            
               
                   
               
               
                 Comparison of the results of the 3 algorithms on 4 sequences of the KITTI dataset 
               
            
           
           
               
               
               
               
            
               
                   
                 Number of 
                 Image processing 
                 RMSE of 
               
               
                   
                 keyframes (frames) 
                 time (frame/ms) 
                 trajectory(m) 
               
            
           
           
               
               
               
               
               
               
               
               
               
               
            
               
                 KITTI 
                 ORB- 
                 PL- 
                 IFPL- 
                 ORB- 
                 PL- 
                 IFPL- 
                 ORB- 
                 PL- 
                 IFPL- 
               
               
                 Sequence 
                 SLAM2 
                 SLAM 
                 SLAM 
                 SLAM2 
                 SLAM 
                 SLAM 
                 SLAM2 
                 SLAM 
                 SLAM 
               
               
                   
               
            
           
           
               
               
               
               
               
               
               
               
               
               
            
               
                 01 
                 373 
                 385 
                 394 
                 125 
                 172 
                 135 
                 12.73 
                 9.78 
                 7.96 
               
               
                 10 
                 495 
                 487 
                 547 
                 114 
                 155 
                 121 
                 11.35 
                 8.52 
                 6.08 
               
               
                 08 
                 — 
                 1784 
                 1927 
                 — 
                 164 
                 124 
                 — 
                 6.85 
                 4.96 
               
               
                 02 
                 2097 
                 2182 
                 2285 
                 134 
                 181 
                 156 
                  9.27 
                 7.89 
                 6.31 
               
               
                 Average 
                 988.33 
                 1207.25 
                 1288.25 
                   124.33 
                 168 
                 134 
                 11.12 
                 8.26 
                 6.33 
               
               
                   
               
            
           
         
       
     
     Experiment III. Evaluation Based on TUM Dataset 
     The algorithm is further evaluated by using the TUM dataset, which mainly originates from indoor environments. The fr3/large/cabinet sequence with sparser texture, the fr2/360-hemisphere sequence with larger rotation, and the fr1/plant and fr2/xyz sequences with closed-loop scenes are selected for the experiments to validate the algorithm according to the present disclosure. The trajectory maps constructed by utilizing the three algorithms of ORB-SLAM2, PL-SLAM and IFPL-SLAM, under different sequences are shown in  FIG.  9   , respectively. As shown in  FIG.  9 ( a ) , the tracking effect of ORB-SLAM2 algorithm is poor due to the fact that the scene is sparse environment, and in executing the algorithm, the extracted point features cannot meet the matching requirements, resulting the tracking loss. However, the IFPL-SLAM and PL-SLAM algorithms are able to accomplish mapping in a global consistent manner, by combining point and line features for tracking. It can be seen from  FIG.  9 ( b )  that the robot makes several sharp turns in blue rectangular region, and thus ORB-SLAM2 and PL-SLAM algorithms eventually occur tracking loss near (1.344, 0), while the key frames missed in the corner are supplemented by utilizing the inverted index-based key frame selection strategy in the IFPL-SLAM algorithm, so the IFPL-SLAM algorithm can better track the bend trajectory, and improve the mapping effect of the whole environment.  FIGS.  9 ( c ) and  9 ( d )  show a comparison of the tracking effects of the three algorithms for the closed-loop scene trajectory. All the three algorithms implement the construction of the global map for the two scenes through the closed-loop detection link. Since IFPL-SLAM algorithm conditionally screens the extracted line features and introduces the inverted index-based key frame selection strategy, the trajectory map obtained by the IFPL-SLAM algorithm according to the present disclosure is closer to the real trajectory. 
     Table 3 shows a comparison of translation error and rotation error of the three algorithms under different dataset sequences. From the data in the table, it can be observed that the translation error of the IFPL-SLAM algorithm is reduced by 21.3% compared to PL-SLAM and 43.1% compared to ORB-SLAM2. Moreover, the rotation error of IFPL-SLAM algorithm is reduced by 17.2% compared to PL-SLAM and 39.3% compared to ORB-SLAM2. 
     
       
         
           
               
             
               
                 TABLE 3 
               
             
            
               
                   
               
               
                 Comparison of translation error and rotation error of the 3 algorithms under TUM dataset 
               
            
           
           
               
               
               
               
            
               
                   
                 ORB-SLAM2 
                 PL-SLAM 
                 IFPL-SLAM 
               
            
           
           
               
               
               
               
               
               
               
            
               
                 TUM 
                 Translation 
                 Rotation 
                 Translation 
                 Rotation 
                 Translation 
                 Rotation 
               
               
                 Sequence 
                 error (m) 
                 error (°) 
                 error (m) 
                 error (°) 
                 error (m) 
                 error (°) 
               
               
                   
               
            
           
           
               
               
               
               
               
               
               
            
               
                 fr3/large/cabinet 
                 — 
                 — 
                 0.059 
                 2.48 
                 0.032 
                 1.98 
               
               
                 fr2/360hemisphere 
                 — 
                 — 
                 — 
                 — 
                 0.043 
                 2.04 
               
               
                 fr1/plant 
                 0.092 
                 4.52 
                 0.054 
                 3.12 
                 0.048 
                 2.95 
               
               
                 fr2/xyz 
                 0.038 
                 2.24 
                 0.029 
                 1.83 
                 0.023 
                 1.24 
               
               
                 Average 
                 0.065 
                 3.38 
                 0.047 
                 2.48 
                 0.037 
                 2.053 
               
               
                   
               
            
           
         
       
     
     A comparison of the accuracy-recall curves of the three algorithms under TUM-fr1/plant and TUM-fr2/xyz sequences is shown in  FIG.  10   . As shown in  FIG.  10   , when an accuracy of IFPL-SLAM algorithm is maintained at 100%, maximums of recall for both sequences are 87.5% and 89.1% respectively, this result is improved by 12.4% compared to PL-SLAM and 19.2% compared to ORB-SLAM2. 
       FIG.  11    shows a comparison of running time of the three algorithms under the TUM dataset. As shown in the figure, the running time of the present disclosure is reduced by 22.1% compared to PL-SLAM. Compared with the ORB-SLAM2 algorithm, the running time of the present disclosure has increased, due to the time cost expended in recognition of the texture density of the scene, extraction and screening of line features in the present disclosure. However, the present different can still meet the real-time demand. 
     Experiment I demonstrates that the pose tracking strategy proposed by the present disclosure can identify the scene texture densities by utilizing the information entropy of feature points and can decide how to use the fusion of point and line features. In experiments II and III, the algorithm according to the present disclosure is test on the publicly available KITTI dataset and TUM dataset, and the test results show that the present disclosure introduces the positional tracking decision under guidance of information entropy the point features extracted in the scene of dense environment texture can already implement solution of the camera pose, without calling the line features in the image, which improves the real-time performance of the algorithm and allows the running time of the present algorithm to be reduced by 16.0% compared with the PL-SLAM algorithm. 
     The present disclosure was verified by experiments with the improved camera pose solving method. As shown in  FIG.  3   , the test results show that the conventional LSD algorithm extracts more short line features and a few long line features that are over-segmented, due to the characteristics of the objects in the image itself and the light, etc. The redundant short line features and some repeatedly extracted line features in the image are eliminated by conditional screening and broken line splicing, which makes distribution of the extracted line features in the image clearer, and provides a good basis for subsequent line feature matching and improves the accuracy of feature matching. 
     In experiments II and III, the key frames missed at the corners are supplemented by utilizing the inverted index-based key frame selection strategy according to the present disclosure, so the present disclosure can better implement the tracking of the curve trajectory, improve the effect of mapping the whole environment, and overcome the disadvantages of large accumulative errors caused during curve motion of the robot, difficulties in accurate positioning, and incomplete closed-loop error correction, thereby improving the positioning accuracy of the algorithm and the closed-loop accuracy. The absolute trajectory error of IFPL-SLAM is reduced by 23.4% compared to the PL-SLAM algorithm and 43.0% compared to ORB-SLAM2. In closed-loop detection, under 100% accuracy, IFPL-SLAM improves by about 12.4% compared to PL-SLAM and about 19.2% compared to ORB-SLAM2, and exhibits good mapping capability. 
     Example II 
     Corresponding to Example I of the present disclosure, Example II of the present disclosure provides a computer readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the following steps in accordance with the method of Example I. 
     In step 1, image information at a current position is acquired for being processed, and corresponding image features are extracted from the processed image information for solving a camera pose. 
     In step 2, image frames are captured successively during movement of a robot, as consecutive image frames. Indexing is performed on the consecutive image frames. And an inverted index-based key frame selection strategy is introduced in the key frame selection strategy to supplement the key frames that may be missed in the conventional forward indexing during the bending movement of the robot. 
     In step 3, closed-loop detection and correction of accumulative errors are performed based on the image features carried by key frames. 
     The above storage medium include: USB flash disk (UFD), mobile hard disk, Read-Only Memory (ROM), Random Access Memory (RAM), Compact Disc Read-Only Memory (CD-ROM), and various other mediums that can store program codes. 
     Specific limitations on the steps implemented after execution of the program in the computer readable storage medium can be found in Example I and will not be described in detail herein. 
     Example III 
     Corresponding to Example I of the present disclosure, Example III of the present disclosure provides a computer device including a memory, a processor and a computer program stored in the memory and executable on the processor. The processor executes said program to achieve the following steps in accordance with the method of Example I. 
     In step 1, image information at a current position is acquired for being processed, and corresponding image features are extracted from the processed image information, for solving a camera pose. 
     In step 2, image frames are captured successively during a movement of a robot, as consecutive image frames. An indexing is performed on the consecutive image frames. And an inverted index-based key frame selection strategy is introduced in a key frame selection strategy to supplement key frames that may be missed in conventional forward indexing during the bending movement of the robot. 
     In step 3, closed-loop detection and correction of accumulative errors are performed based on image features carried by key frames. 
     Specific limitations on the implementation steps of computer device can be found in Example I and will not be described in detail herein. 
     It is noted that each of the blocks in the block diagram and/or flowchart in the accompanying drawings of the specification of the present disclosure, and the combination of the blocks in the block diagram and/or flowchart, may be implemented by utilizing a dedicated hardware-based system that performs the specified function or action, or can be implemented by utilizing a combination of dedicated hardware and acquired machine instructions. 
     The present disclosure is exemplarily described above in connection with the accompanying figures. It is clear that the specific implementation of the present disclosure is not limited by the above-mentioned manner, and that various non-substantial improvements made with the inventive idea and technical solution of the present disclosure, or direct application of the inventive idea and technical solution to other occasions without improvement, are all within the scope of protection of the present disclosure.