Patent Publication Number: US-10762645-B2

Title: Stereo visual odometry method based on image gradient joint optimization

Description:
CROSS REFERENCE OF RELATED APPLICATION 
     This is a U.S. National Stage under 35 U.S.C 371 of the International Application PCT/CN2017/118849, filed Dec. 27, 2017, which claims priority under 35 U.S.C. 119(a-d) to CN 201710685724.8, filed Aug. 11, 2017. 
     BACKGROUND OF THE PRESENT INVENTION 
     Field of Invention 
     The present invention relates to a computer vision field and related technologies of image processing, and more particularly to a visual odometry method based on image gradient joint optimization. 
     Description of Related Arts 
     After years of exploration and development, computer vision has been applied in many fields such as robotics, autonomous driving, digital entertainment, medical health, security monitoring, and military technology. Visual odometry is not only an important part of robotic and unmanned vehicle visual navigation systems, but also an important research branch in the field of computer vision and robotics. The present invention aims to propose a fast and effective stereo visual odometry method. Visual odometry is the research basis and premise of target localization, pose estimation, mapping, scene understanding and other topics. An excellent visual odometry method can provide strong support and guarantee for many research topics. 
     The main task of the visual odometry method is to estimate in real time the relative 6-degree-of-freedom pose of the camera relative to the initial reference state from the input video, including the relative displacement of the three coordinate axes of X-Y-Z, and the three rotations around the coordinate axis. At the same time, the by-product to estimate the camera pose is a sparse or dense reconstruction of the scene. The method based on sparse feature point matching needs to triangulate the matching points of different video frames to obtain 3D sparse reconstruction, and the method based on direct image alignment uses stereo vision to obtain dense 3D reconstruction results, which establishes the foundation for scene reconstruction. Therefore, the visual odometry method not only provides global pose and position information, but also completes preliminary mapping and scene reconstruction. It is the first step of robot and unmanned vehicle autonomous navigation system and plays a vital role. 
     Visual odometry is an important problem in the field of robotics and computer vision. It is the core technology for applications such as augmented reality, autonomous vehicles, and robot navigation. Conventionally, main visual odometry and simultaneous positioning and map reconstruction algorithms usually adopt a solution based on coefficient feature point matching, which cannot fully utilize the information of the entire image, and can only perform sparse reconstruction of the scene. On the other hand, direct image alignment uses the information of the entire image, and can generate a dense point cloud of the scene, which is a technical direction with broad prospects. However, the main drawback of the direct method is the camera small motion hypothesis and tendency of converging to local optimum, making this method performs weaker in KITTI visual milemeter test than the feature point matching based strategy. 
     In conventional visual navigation KITTI evaluation platform, the direct visual navigation method based on dense observation fails to achieve the desired result. The main reasons can be summarized as follows: 1) Image alignment based on Lucas-Kanade framework limits the theoretical convergence domain, and it is unable to cope with the large displacement scene of 10 Hz sampling in the dataset, which needs very good motion estimation method to compensate; 2) The KITTI dataset is derived from the actual driving scene, including different driving environments such as cities, villages and highways; direct use of pixel grayscale values and affine illumination models cannot cope with the effects of complex ambient lighting environments such as road surface reflections, tree shades and architectural shadows; 3) imperfect camera calibration and stereo vision matching algorithm accuracy directly affect the accuracy of visual navigation results, wherein conventional stereoscopic matching evaluates the accuracy of the disparity estimation within the coverage, while the visual navigation requires accurate point-to-point disparity estimation. The algorithm in the forefront of the stereoscopic visual evaluation fails to improve the navigation accuracy. 
     SUMMARY OF THE PRESENT INVENTION 
     For overcoming defects mentioned in the background, an object of the present invention is to provide a stereo visual odometry method based on image gradient joint optimization, which estimates camera pose and position from video sequences 
     Accordingly, in order to accomplish the above object, the present invention provides a stereo visual odometry method based on image gradient joint optimization, comprising steps of: 
     1) pre-processing each frame of images of a stereo video input; 
     2) calculating a stereo image disparity map of a same frame of the stereo video, and obtaining a metric distance; 
     3) scaling each of the images after pre-processing to form scale images with a plurality of scales for forming a pyramid model, and calculating features for each of the scale images in the pyramid model to obtain a series of feature images; 
     4) processing the images with a Kalman filter according to the metric distance, so to predict and estimate a motion process of a camera pose, wherein camera motion models are built in the Kalman filter; 
     wherein the camera pose comprises camera positions and directions; 
     5) accurately calculating a camera pose of a current frame by using a gradient-based stereo visual navigation method for each of the scale images in the pyramid model from larger scales to smaller scales; using outputs of the larger scales as input of the smaller scales; 
     wherein the larger scales are zoom-out images and the smaller scales are original input images; and 
     6) updating the camera motion models in the Kalman filter with the camera pose of the current frame; 
     namely updating camera motion model parameters in the Kalman filter with the camera pose of the current frame. 
     In the step 1), pre-processing comprises Gaussian filtering and image enhancement operations. 
     The image enhancement operations are specifically a process of histogram equalization to increase contrast. 
     In the step 2), a disparity map calculation method is a line search matching method, and the metric distance is a sum of absolute values of pixel differences. 
     In the step 3), the features are image gradients and second derivative gradients thereof, which is used for calculating image matching error in the step 5). 
     In the step 4), the Kalman filter is used to predict the motion process of the camera pose in the current frame, which is used for accurately calculating the camera pose in the step 5). 
     The step 5) estimates the camera pose according to the order from coarse to fine, and solves a large displacement problem of dense visual navigation by the double gradient optimization method, so as to obtain robustness to illumination change by directly using the image gradient as the image feature. At the same time, it also avoids additional computational cost caused by adding affine illumination models to the system, wherein multi-frame information is introduced to optimize system performance and reduce drift. 
     In the step 5), the gradient-based stereo visual navigation method specifically comprises steps of: 
     5.1) constructing a joint direct stereo visual odometry optimization equation for calculating a current frame transform T c : 
     
       
         
           
             
               
                 
                   min 
                   
                     T 
                     c 
                   
                 
                 ⁢ 
                 
                   
                     ∑ 
                     
                       
                         x 
                         i 
                       
                       ∈ 
                       
                         Ω 
                         p 
                       
                     
                   
                   ⁢ 
                   
                     ρ 
                     ⁡ 
                     
                       ( 
                       
                         
                           ∇ 
                           
                             
                               I 
                               p 
                             
                             ⁡ 
                             
                               ( 
                               
                                 x 
                                 i 
                               
                               ) 
                             
                           
                         
                         - 
                         
                           ∇ 
                           
                             
                               I 
                               c 
                             
                             ⁡ 
                             
                               ( 
                               
                                 π 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     
                                       
                                         T 
                                         c 
                                       
                                       ⁡ 
                                       
                                         ( 
                                         θ 
                                         ) 
                                       
                                     
                                     ⁢ 
                                     
                                       T 
                                       p 
                                       
                                         - 
                                         1 
                                       
                                     
                                     ⁢ 
                                     
                                       
                                         π 
                                         
                                           - 
                                           1 
                                         
                                       
                                       ⁡ 
                                       
                                         ( 
                                         
                                           
                                             x 
                                             i 
                                           
                                           , 
                                           
                                             d 
                                             i 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                   ) 
                                 
                               
                               ) 
                             
                           
                         
                       
                       ) 
                     
                   
                 
               
               + 
               
                 
                   ∑ 
                   
                     
                       x 
                       i 
                     
                     ∈ 
                     
                       Ω 
                       k 
                     
                   
                 
                 ⁢ 
                 
                   ρ 
                   ⁡ 
                   
                     ( 
                     
                       
                         ∇ 
                         
                           
                             I 
                             k 
                           
                           ⁡ 
                           
                             ( 
                             
                               x 
                               i 
                             
                             ) 
                           
                         
                       
                       - 
                       
                         ∇ 
                         
                           
                             I 
                             c 
                           
                           ⁡ 
                           
                             ( 
                             
                               π 
                               ⁡ 
                               
                                 ( 
                                 
                                   
                                     
                                       T 
                                       c 
                                     
                                     ⁡ 
                                     
                                       ( 
                                       θ 
                                       ) 
                                     
                                   
                                   ⁢ 
                                   
                                     T 
                                     k 
                                     
                                       - 
                                       1 
                                     
                                   
                                   ⁢ 
                                   
                                     
                                       π 
                                       
                                         - 
                                         1 
                                       
                                     
                                     ⁡ 
                                     
                                       ( 
                                       
                                         
                                           x 
                                           i 
                                         
                                         , 
                                         
                                           d 
                                           i 
                                         
                                       
                                       ) 
                                     
                                   
                                 
                                 ) 
                               
                             
                             ) 
                           
                         
                       
                     
                     ) 
                   
                 
               
             
             , 
           
         
       
     
     wherein ρ( ) is a Tukey&#39;s loss function, π −1  is a function from an image space to a world coordinate system, a is a function from the world coordinate system to the image space, T c  is the current frame transform, and T p  is a previous frame transform, T p   −1  is a previous frame inverse transform, T k  represents a reference frame transform, T k   −1  is a reference frame inverse transform, Ω k  represents a pixel set of a reference image, and Q, represents a pixel set of a previous frame, x i  is an image coordinate position of an i-th pixel, d i  is a depth estimation value of the i-th pixel, θ is a parameter of the current frame transform T c , ∇ is a gradient operator, I p  is a previous frame image, I k  is a reference frame image, I c  is a current frame image; 
     wherein the reference frame refers to the m-th frame before the current frame, and m=12 in an embodiment of the present invention, wherein the reference frame is the first frame in the first 12 frames; for example, for the first frame at an initial time, the first frame pose is set to zero, orientation and position are both set to zero; for the second to m-th frames, the first frame is used as the reference frame; and for the i-th frame, the i-m-th frame is used as the reference frame; 
     the Tukey&#39;s loss function ρ( ) is calculated as: 
     
       
         
           
             
               ρ 
               ⁡ 
               
                 ( 
                 t 
                 ) 
               
             
             = 
             
               { 
               
                 
                   
                     
                       
                         
                           
                             κ 
                             2 
                           
                           6 
                         
                         ⁡ 
                         
                           [ 
                           
                             1 
                             - 
                             
                               
                                 ( 
                                 
                                   1 
                                   - 
                                   
                                     
                                       ( 
                                       
                                         t 
                                         κ 
                                       
                                       ) 
                                     
                                     2 
                                   
                                 
                                 ) 
                               
                               3 
                             
                           
                           ] 
                         
                       
                     
                     
                       
                         
                           for 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                              
                             t 
                              
                           
                         
                         ≤ 
                         κ 
                       
                     
                   
                   
                     
                       
                         
                           κ 
                           2 
                         
                         6 
                       
                     
                     
                       
                         
                           for 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                              
                             t 
                              
                           
                         
                         ≤ 
                         κ 
                       
                     
                   
                 
                 , 
               
             
           
         
       
     
     wherein κ is a parameter of the Tukey&#39;s loss function, which is 4.6851 in the embodiment, and t is an input of the Tukey&#39;s loss function; and 
     5.2) as the above equation is a non-linear optimization problem, iteratively optimizing the joint direct stereo visual mileage optimization equation with a Gauss-Newton method to calculate the current frame transform T c , and then transforming a corresponding pose of the current frame with the current frame transform T c  to obtain an accurate camera pose of the current frame. 
     Thereby, each frame is processed in chronological order in turn, and an accurate camera pose of each frame can be obtained. 
     The depth estimation value d i  of the i-th pixel is estimated by stereo depth estimation. 
     The step 5.2) specifically comprises steps of: 
     5.2.1) obtaining the parameter θ of the current frame transform T c  with a following equation:
 
θ=−( J   T   WJ ) −1   J   T   Wr.  
 
     wherein J is a Jacobian matrix, J T  is a transpose of the Jacobian matrix, and r is a residual, r=[∇I p (x i )−∇I c (π(T c (θ)T p   −1  π −1 (x i ,d i ))); ∇I k (x i )−∇I c (π(T c (θ)T k   −1 π −1 ((x i ,d i )))], W is a diagonal matrix, and each diagonal position in the diagonal matrix W contains a derivative of the Tukey&#39;s loss function p; 
     5.2.2) according to Lie algebra definition, calculating a temporary transform T(θ) with a following equation: 
     
       
         
           
             
               T 
               ⁡ 
               
                 ( 
                 θ 
                 ) 
               
             
             = 
             
               exp 
               ⁡ 
               
                 ( 
                 
                   [ 
                   
                     
                       
                         
                           
                             [ 
                             ω 
                             ] 
                           
                           × 
                         
                       
                       
                         v 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                     
                   
                   ] 
                 
                 ) 
               
             
           
         
       
     
     wherein ν represents displacement, [ω] x  is a skew-symmetric matrix, [ω] x =ω 1 G 1 +ω 2 G 2  ω 3 G 3 , ω1, ω2 and ω3 respectively represent three rotation angles under three-axis coordinates, and G1, G2 and G3 are bases of the skew-symmetric matrix, which are respectively presented as: 
     
       
         
           
             
               
                 G 
                 1 
               
               = 
               
                 ( 
                 
                   
                     
                       0 
                     
                     
                       0 
                     
                     
                       0 
                     
                   
                   
                     
                       0 
                     
                     
                       0 
                     
                     
                       
                         - 
                         1 
                       
                     
                   
                   
                     
                       0 
                     
                     
                       1 
                     
                     
                       0 
                     
                   
                 
                 ) 
               
             
             , 
             
               
                 G 
                 2 
               
               = 
               
                 ( 
                 
                   
                     
                       0 
                     
                     
                       0 
                     
                     
                       1 
                     
                   
                   
                     
                       0 
                     
                     
                       0 
                     
                     
                       0 
                     
                   
                   
                     
                       
                         - 
                         1 
                       
                     
                     
                       0 
                     
                     
                       0 
                     
                   
                 
                 ) 
               
             
             , 
             
               
                 
                   G 
                   3 
                 
                 = 
                 
                   ( 
                   
                     
                       
                         0 
                       
                       
                         
                           - 
                           1 
                         
                       
                       
                         0 
                       
                     
                     
                       
                         1 
                       
                       
                         0 
                       
                       
                         0 
                       
                     
                     
                       
                         0 
                       
                       
                         0 
                       
                       
                         0 
                       
                     
                   
                   ) 
                 
               
               ; 
             
           
         
       
     
     wherein the Lie algebra definition refers to a mathematical algebraic structure, which is mainly used to study geometric objects such as Lie group and differential manifold; 
     5.2.3) according to the Lie algebra definition, calculating a transform with the temporary transform T(θ), and assigning a value thereof to the current frame transform T c :
 
 T   c   ←T   c   T (θ)
 
     wherein T(θ) is the temporary transform, and 
     5.2.4) then reconstructing the Jacobian matrix with the current frame transform T c , and repeating the above steps to perform iterative calculation with the pyramid model; wherein a predicted output of the Kalman filter is used as an input of an initial first layer, and an output of a previous layer is used as an input of a next layer, until a stop condition of the iterative calculation is satisfied, wherein the stop condition is |θ|&lt;0.001 or reach a maximum number of iterations (25×(l+1)), where l is a layer number of the pyramid model. 
     For the initial frame calculation, the initial frame transform T c  and the pose are 0, and the Jacobian matrix corresponding to the initial frame transform T c  is constructed. 
     The Jacobian matrix is designed for each frame of the images, and a the Jacobian matrix size is identical to an image size. 
     In the step 5.2.1), the Jacobian matrix is constructed as follows: 
     for each layer except a last layer, calculating an element value of each pixel in the Jacobian matrix with a following equation, so as to obtained the Jacobian matrix in the step 5.2.1): 
     
       
         
           
             
               
                 
                   
                     
                       J 
                       i 
                     
                     ⁡ 
                     
                       ( 
                       θ 
                       ) 
                     
                   
                   = 
                   
                     
                       ∇ 
                       
                         
                           I 
                           esm 
                         
                         ⁡ 
                         
                           ( 
                           
                             x 
                             i 
                           
                           ) 
                         
                       
                     
                     · 
                     
                       [ 
                       
                         
                           
                             
                               
                                 f 
                                 u 
                               
                               
                                 z 
                                 i 
                               
                             
                           
                           
                             0 
                           
                           
                             
                               - 
                               
                                 
                                   
                                     f 
                                     u 
                                   
                                   ⁢ 
                                   
                                     x 
                                     i 
                                   
                                 
                                 
                                   z 
                                   i 
                                   2 
                                 
                               
                             
                           
                           
                             
                               
                                 - 
                                 
                                   f 
                                   u 
                                 
                               
                               ⁢ 
                               
                                 
                                   
                                     x 
                                     i 
                                   
                                   ⁢ 
                                   
                                     y 
                                     i 
                                   
                                 
                                 
                                   z 
                                   i 
                                   2 
                                 
                               
                             
                           
                           
                             
                               
                                 f 
                                 u 
                               
                               ⁢ 
                               
                                 
                                   
                                     x 
                                     i 
                                     2 
                                   
                                   ⁢ 
                                   
                                     z 
                                     i 
                                     2 
                                   
                                 
                                 
                                   z 
                                   i 
                                   2 
                                 
                               
                             
                           
                           
                             
                               - 
                               
                                 
                                   
                                     f 
                                     u 
                                   
                                   ⁢ 
                                   
                                     y 
                                     i 
                                   
                                 
                                 
                                   z 
                                   i 
                                 
                               
                             
                           
                         
                         
                           
                             0 
                           
                           
                             
                               
                                 f 
                                 v 
                               
                               
                                 z 
                                 i 
                               
                             
                           
                           
                             
                               - 
                               
                                 
                                   
                                     f 
                                     v 
                                   
                                   ⁢ 
                                   
                                     y 
                                     i 
                                   
                                 
                                 
                                   z 
                                   i 
                                   2 
                                 
                               
                             
                           
                           
                             
                               
                                 - 
                                 
                                   f 
                                   v 
                                 
                               
                               ⁢ 
                               
                                 
                                   
                                     y 
                                     i 
                                     2 
                                   
                                   + 
                                   
                                     z 
                                     i 
                                     2 
                                   
                                 
                                 
                                   z 
                                   i 
                                   2 
                                 
                               
                             
                           
                           
                             
                               
                                 f 
                                 v 
                               
                               ⁢ 
                               
                                 
                                   
                                     x 
                                     i 
                                   
                                   ⁢ 
                                   
                                     y 
                                     i 
                                   
                                 
                                 
                                   z 
                                   i 
                                   2 
                                 
                               
                             
                           
                           
                             
                               
                                 
                                   f 
                                   v 
                                 
                                 ⁢ 
                                 
                                   x 
                                   i 
                                 
                               
                               
                                 z 
                                 i 
                               
                             
                           
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
           
         
       
     
     wherein x i , y i  and z i  are coordinate values of the i-th pixel in a three-dimensional world, f u  and f v  are camera focal length parameters, J i (θ) indicates the element value in the Jacobian matrix corresponding to the i-th pixel of the image, i is a sequence number of the pixel, I esm (x i ) represents an efficient second order minimization of the current frame; 
     for the last layer, calculating element value of each pixel in the Jacobian matrix with a following equation, so as to obtained the Jacobian matrix in the step 5.2.1): 
     
       
         
           
             
               
                 
                   J 
                   ~ 
                 
                 i 
               
               ⁡ 
               
                 ( 
                 θ 
                 ) 
               
             
             = 
             
               
                 ∇ 
                 
                   
                     I 
                     esm 
                   
                   ⁡ 
                   
                     ( 
                     
                       x 
                       i 
                     
                     ) 
                   
                 
               
               · 
               
                 [ 
                 
                   
                     
                       
                         
                           f 
                           u 
                         
                         
                           z 
                           i 
                         
                       
                     
                     
                       0 
                     
                     
                       
                         - 
                         
                           
                             
                               u 
                               ~ 
                             
                             i 
                           
                           
                             z 
                             i 
                           
                         
                       
                     
                     
                       
                         - 
                         
                           
                             
                               
                                 u 
                                 ~ 
                               
                               i 
                             
                             ⁢ 
                             
                               
                                 v 
                                 ~ 
                               
                               i 
                             
                           
                           
                             f 
                             u 
                           
                         
                       
                     
                     
                       
                         
                           
                             f 
                             u 
                             2 
                           
                           + 
                           
                             
                               u 
                               ~ 
                             
                             i 
                             2 
                           
                         
                         
                           f 
                           u 
                         
                       
                     
                     
                       
                         - 
                         
                           
                             v 
                             ^ 
                           
                           i 
                         
                       
                     
                   
                   
                     
                       0 
                     
                     
                       
                         
                           f 
                           v 
                         
                         
                           z 
                           i 
                         
                       
                     
                     
                       
                         - 
                         
                           
                             
                               v 
                               ~ 
                             
                             i 
                           
                           
                             z 
                             i 
                           
                         
                       
                     
                     
                       
                         - 
                         
                           
                             
                               f 
                               v 
                               2 
                             
                             + 
                             
                               
                                 v 
                                 ~ 
                               
                               i 
                               2 
                             
                           
                           
                             f 
                             v 
                           
                         
                       
                     
                     
                       
                         
                           
                             
                               u 
                               ~ 
                             
                             i 
                           
                           ⁢ 
                           
                             
                               v 
                               ~ 
                             
                             i 
                           
                         
                         
                           f 
                           v 
                         
                       
                     
                     
                       
                         
                           u 
                           ~ 
                         
                         i 
                       
                     
                   
                 
                 ] 
               
             
           
         
       
     
     wherein (ũ i , {tilde over (v)} i ) is a principal point image coordinate value of a relative image, ũ i =u i −c u , {tilde over (v)} i =v i −c v  and (u i , v i ) is an image coordinate value of the i-th pixel, (c u , c v ) is a camera principal point; and 
     calculating the efficient second order minimization I esm (x i ) of the current frame with: 
     
       
         
           
             
               ∇ 
               
                 
                   I 
                   esm 
                 
                 ⁡ 
                 
                   ( 
                   
                     x 
                     i 
                   
                   ) 
                 
               
             
             = 
             
               
                 1 
                 2 
               
               ⁢ 
               
                 
                   ( 
                   
                     
                       ∇ 
                       
                         
                           I 
                           c 
                         
                         ⁡ 
                         
                           ( 
                           
                             x 
                             i 
                           
                           ) 
                         
                       
                     
                     + 
                     
                       ∇ 
                       
                         I 
                         ⁡ 
                         
                           ( 
                           
                             x 
                             i 
                           
                           ) 
                         
                       
                     
                   
                   ) 
                 
                 . 
               
             
           
         
       
     
     wherein I c  is the current frame image and I k  is the reference frame image. 
     The coordinate values x i , y i  and z i  of the i-th pixel in the three-dimensional world are obtained as: 
     a projection equation of a pinhole camera is defined as π( ), a calculated depth d is estimated by stereo depth estimation, and a three-dimensional point coordinate X=(x i , y i , z i ) is obtained by the depth d through an inverse projection equation: 
     
       
         
           
             
               
                 
                   π 
                   
                     - 
                     1 
                   
                 
                 ⁡ 
                 
                   ( 
                   
                     
                       x 
                       i 
                     
                     , 
                     
                       d 
                       i 
                     
                   
                   ) 
                 
               
               = 
               
                 ( 
                 
                   
                     
                       
                         x 
                         i 
                       
                     
                   
                   
                     
                       
                         y 
                         i 
                       
                     
                   
                   
                     
                       
                         z 
                         i 
                       
                     
                   
                 
                 ) 
               
             
             ; 
           
         
       
     
     wherein π −1  is the function from the image space to the world coordinate system, x i  is the image coordinate position of the i-th pixel, and d i  is the depth estimation value obtained by the stereo depth estimation. 
     The rigid transform function T (including T c , T p , and T k ) defined in the present invention transforms in SE(3), wherein SE(3) represents a three-dimensional Lie group, such that a target of visual navigation is the transform function T=(R, m)∈SE(3) which estimates the frame image from image observation, wherein R is a camera direction matrix, R∈SO(3), and SO(3) represents a group with all rotations around an origin of a three-dimensional Euclidean space; m is a position vector, m∈R3. 
     According to the embodiment, the method of the present invention employs a system comprising following three modules: 
     1) an input module, for receiving a collected stereo video sequence; 
     2) a visual milemeter module for analyzing images and estimating a current camera pose and position information; and 
     3) an output module for drawing the camera pose and 3D reconstruction results. 
     Conventional dense visual navigation algorithm is based on accurate intra-camera parameter calibration and depth observation assumptions, and it is difficult to cope with camera calibration errors in actual systems and parallax estimation with a large amount of noise. According to Taylor&#39;s expansion theory, the gradient estimation near the target value is relatively accurate, and the Taylor expansion at different positions will have different gradient estimates. 
     The algorithm proposed by the present invention adopts a Gauss-Newton iteration with a large convergence angle and low precision gradient at the larger scales, and uses a small precision gradient with a convergence domain at the smaller scales. For pyramid low-precision image, the above J is used for calculation, while for the final layer with high precision, ingenious calculation {tilde over (J)} is used. Thus, the present invention can obtain a more stable gradient relationship, thereby more stably calculating the result of the optimization problem. 
     Beneficial effects of the present invention are: 
     The present invention realizes the real-time stereo navigation and solves a large displacement problem of dense visual navigation by the double gradient optimization method, so as to obtain robustness to illumination change by directly using the image gradient as the image feature. At the same time, it also avoids additional computational cost caused by adding affine illumination models to the system, wherein multi-frame information is introduced to optimize system performance and reduce drift. 
     The present invention proposes an optimization algorithm combining two gradient expansions, and the image gradient is used as a feature to effectively avoid the influence of outdoor illumination changes, and the camera pose is optimized with reference to a plurality of key frames, so as to obtain a real-time stereo visual odometry method with good performance and simultaneous dense 3D reconstruction. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is an overall structural view of a method according to the present invention. 
         FIG. 2  is a flow chart of the present invention. 
         FIG. 3  illustrates camera trajectory results in a KITTI training set according to an embodiment of the present invention. 
         FIG. 4  illustrates 3D point cloud and camera tracking trajectory estimated in the embodiment. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The technical solutions of the present invention will be clearly and completely described below in conjunction with the drawings. All other embodiments obtained by those skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention. 
     In order to make the objects, technical solutions and advantages of the present invention more comprehensible, the embodiments of the present invention will be described in detail with reference to the accompanying drawings. 
     Referring to  FIG. 1 , specific system modules according to an embodiment of the present invention comprise: 
     an input module for receiving a stereo video sequence provided by a user, and then sending to a visual milemeter module to perform camera pose estimation; 
     the visual odometry module for pre-processing video frames received, then constructing an image feature pyramid, estimating with a stereo visual odometry method, and the like, so as to estimate camera position and pose information from video, and send into an output module; and 
     the output module for displaying a camera trajectory and a three-dimensional reconstruction result, and presenting the camera trajectory and pose at corresponding positions in three-dimensional reconstruction. 
     In order to verify the present invention, experiments were carried out on the challenging on-vehicle visual navigation data set KITTI disclosed in the art, and the method of the present invention was compared with a series of published algorithms. Experimental results were compared with high-precision inertial navigator annotations of the test set, wherein the camera trajectory and statistical relative displacement as well as rotation error are plotted as a standard for measuring algorithm performance. 
     Referring to  FIG. 3 , the method of the present invention can accurately restore the camera trajectory. It can be seen that the camera trajectory recovered by the present invention is very close to the measured value of an ultra-high precision inertial measurement unit. 
     Referring to  FIG. 4 , the present invention can densely reconstruct a three-dimensional scene. It can be seen that the present invention not only restores dense three-dimensional reconstruction, but also accurately marks a 6-degree-of-freedom camera pose in a three-dimensional scene. 
     The KITTI visual navigation test platform test set includes 11 segments of different driving scenes and high-precision inertial navigation annotations, wherein the annotation information is unpublished, and test results must be fed back by the tester. The method of the present invention obtains a lower displacement and rotation error than the disclosed related methods, which is even better than a laser radar solution, as shown in Table 1. 
     
       
         
           
               
             
               
                 TABLE 1 
               
             
            
               
                   
               
               
                 Comparison of various methods in KITTI evaluation (March 2017) 
               
            
           
           
               
               
               
               
               
            
               
                   
                   
                   
                 Relative 
                 Relative 
               
               
                   
                   
                   
                 displacement 
                 rotation 
               
               
                 Rank 
                 Method 
                 Type 
                 % 
                 % 
               
               
                   
               
            
           
           
               
               
               
               
               
            
               
                 1 
                 V-LOAM [Zhang and 
                 Laser 
                 0.68 
                 0.16 
               
               
                   
                 Singh, 2015] 
               
               
                 4 
                 GDVO (disclosed method) 
                 Direct 
                 0.86 
                 0.31 
               
               
                 6 
                 SOFT [Cvisic and 
                 Feature 
                 0.88 
                 0.22 
               
               
                   
                 Petrovic, 2015] 
               
               
                 13 
                 DEMO [Zhang et al., 2014] 
                 Laser 
                 1.14 
                 0.49 
               
               
                 14 
                 ORB-SLAM2 [Mur-Artal 
                 Feature 
                 1.15 
                 0.27 
               
               
                   
                 et al., 2015] 
               
               
                 18 
                 S-LSD-SLAM [Engel 
                 Direct 
                 1.20 
                 0.33 
               
               
                   
                 et al., 2015] 
               
               
                 33 
                 D6DVO [Comport et al., 2010] 
                 Direct 
                 2.04 
                 0.51 
               
               
                   
               
            
           
         
       
     
     Accordingly, the results of the present invention not only outperform the conventional methods in the public test, but also restore the dense three-dimensional structure of the scene. 
     It can be seen that the method of the present invention achieves better experimental results than algorithms commonly used in the field of visual navigation. 
     Last but not least, the embodiments have been shown and described for the purposes of illustrating the functional and structural principles of the present invention and is subject to change without departure from such principles. One skilled in the art will understand that the embodiment of the present invention as shown in the drawings and described above is exemplary only and not intended to be limiting. Therefore, this invention includes all modifications encompassed within the spirit and scope of the following claims.