Patent Publication Number: US-6707854-B1

Title: Method of global motion estimation between consecutive video pictures

Description:
FIELD OF THE INVENTION 
     The present invention relates to a method and its corresponding device for stimating motion between an incoming frame F(n) of a sequence of frames and a large static image M(n−1), said large static image being constructed from previous frames F( 1 ) . . . F(n−1) of said sequence, said motion estimation method using a motion model based on a two-dimensional perspective transform containing eight motion parameters and comprising an optimization step of a cost function. 
     Such an invention can be useful for applications related to MPEG-4 and, more especially, to MPEG-7 standard, such as sprite generation or mosaicing. 
     BACKGROUND OF THE INVENTION 
     A method of the above kind is known from the patent application WO 98/59497. This patent application describes a method used in video coding for generating a sprite from the video objects in the frame of a video sequence. The method estimates the global motion between a video object in a current frame and a sprite constructed from video objects for previous frames. Specifically, the global motion estimation method computes motion coefficients of a two-dimensional transform that minimizes the intensity errors between pixels in the video object and corresponding pixels in the sprite. The Levenberg-Marquardt method is employed for the minimizing step, which consists in the minimization of an analytical function related to the intensity errors, and allows to select the most representative points and reject the others as outliers. 
     Nevertheless, the previously described global motion estimation method has several drawbacks. The major one is that it is very sensitive to outliers, which are pixels that do not follow the global motion and corresponds to objects having their own motion. It means that the global motion estimation method can sometimes fail with some particular video sequences. Another drawback is also its inability to converge efficiently and fast for certain kind of video sequences. 
     SUMMARY OF THE INVENTION 
     It is therefore an object of the present invention to propose another global motion estimation method that is very robust to outliers but that can also allow an efficient and fast convergence. 
     To this end, the method according to the invention is characterized in that the eight motion parameters are the coordinates of the four vertices of the incoming frame, said vertices being successively moved in two directions to find an estimation of the motion parameters corresponding to an optimum of the cost function. 
     The motion estimation method is based on a geometrical approach that treats successively and iteratively the eight motion parameters by optimizing a numerical function whereas the approach of the background art, based on the Levenberg-Marquardt algorithm, treats the eight motion parameters simultaneously by minimizing an analytical function. As a consequence, the motion estimation method based on the displacement of the four vertices has proved to be more robust to outliers than the one used in the background art. 
     The method according to the invention is also characterized in that the motion estimation method includes a first iterative method that comprises, at each iteration, the optimization step to determine an estimation of the eight motion parameters, followed by a step of calculation of the two directions of motion of each of the four vertices by taking into account the last deformation, said iterative method being performed until a defined criteria is reached. 
     The iterative method is based on the Powell&#39;s algorithm that improves the convergence of said method. 
     The method according to the invention is finally characterized in that the optimization step comprises a second iterative method performing, at each iteration, a parabolic interpolation operation of values of the cost function to estimate successively the motion parameters. 
     The use of a parabolic interpolation operation makes the convergence of the motion estimation method faster, especially in the case of large motion. 
     As a consequence, the present motion estimation method could be advantageously included in a method for generating a large static image, such as a sprite or a mosaic, and implemented in a device for generating such a large static image. 
     These and other aspects of the invention will be apparent from and elucidated with reference to the embodiments described hereinafter. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The present invention will now be described, by way of example, with reference to the accompanying drawings, wherein: 
     FIG. 1 shows a geometrical representation of the optimization step for the first iteration, 
     FIG. 2 is a flowchart for the process used to perform the automatic initialization of the motion parameters for the two first pictures, 
     FIG. 3 is a flowchart for the iterative process used to optimize the motion parameters, 
     FIG. 4 shows a geometrical representation of the optimization step for the iteration (l+1), 
     FIG. 5 shows a scheme of a large static image generation device. 
    
    
     DESCRIPTION OF THE INVENTION 
     The present invention proposes a new global motion estimation method between an incoming frame F(n) of a sequence of frames and a large static image M(n−1), which is constructed from previous frames F( 1 ), F( 2 ), . . . , F(n−1) of the video sequence. 
     The principle of the motion estimation method is depicted in FIG.  1 . Said motion estimation method uses a motion model based on a two-dimensional perspective transform, which is also called the perspective model, in order to characterize the motion between two frames. This model contains eight motion parameters and is preferably chosen because it allows more camera motion possibilities than the other ones, such as, for example, translation, zoom, or rotation. The use of the perspective model is valid in the two following cases: 
     All views share the same optical center. This is more or less the case when a camera is fixed to a rotating tripod: the rotation axis may pass through or very near the optical center of the camera. If the captured objects are very far from the camera, this assumption is always verified. 
     The captured scene corresponds to a flat surface. 
     A perspective projection transforms a rectangle into a quadrilateral. The two-dimensional coordinates of the four vertices of the quadrilateral completely define the eight motion parameters a 0  to a 7  of the perspective projection. Thus, the eight motion parameters are, in the present invention, the two-dimensional coordinates of the four vertices, which are at the beginning of the process A( 0 ) (a 0 ( 0 ), a 1 ( 0 )), B( 0 ) (a 2 ( 0 ), a 3 ( 0 )), C( 0 ) (a 4 ( 0 ), a 5 ( 0 )) and D( 0 ) (a 6 ( 0 ), a 7 ( 0 )). 
     The motion estimation method according to the invention enables any displacement of the four corners of the original rectangular image to fit the next one by optimizing a cost function. Starting from an initial position for these four vertices, corresponding to an initial set of motion parameters, the method tries to optimize the cost function by slight displacements of the four vertices. Each vertex is displaced by a small amount around its initial position in order to find a local optimum for the cost function. For example, A( 0 ) is moved along the direction d 1 ( 0 ), which is in this particular case an horizontal direction, in order to find an optimum of the cost function. Then, the obtained point is moved along the direction d 2 ( 0 ), which is in this particular case a vertical direction, until another optimum is found giving a new vertex A( 1 ) (a 0 ( 1 ), a 1 ( 1 )). This operation is then performed successively for the other vertices and a new quadrilateral image is obtained. 
     In the preferred embodiment the cost function is related to the Displaced Frame Difference (DFD). The DFD measurement is computed on the pixels belonging to the area S overlapping both incoming frame F(n) and current large static image M(n−1) as follows:        DFD   =       ∑   S                     r   p   2                       
     where r p  is a difference between original and predicted values of a pixel p defined as follows: 
     
       
           r   p   =L ( x,y )− L ( x′,y ′) 
       
     
     where: 
     L(x,y) is the luminance value of the video signal corresponding to the pixel p(x,y) of the incoming frame F(n), 
     L(x′,y′) is the luminance value of the video signal corresponding to the pixel p′(x′,y′) of the large static image M(n−1). 
     (x′,y′) are the floating point value of the pixel p′ to be extracted from the large static image. The value of the luminance corresponding to this pixel is calculated with respect to the four closest integer coordinates in the image, which are (x 0 ,y 0 ), (x 1 ,y 1 ), (x 2 ,y 2 ), (x 3 ,y 3 ) with respective luminance values L 0 , L 1 , L 2  and L 3 , using a bilinear interpolation: 
     
       
           L ( x′,y ′)= L   0 +( x′−x   0 )( L   1 − L   0 )+( y′−y   0 )( L   2 − L   0 )+( x′−x   0 )( y′−y   0 )( L   3 − L   2   −L   1 + L   0 ) 
       
     
     The optimization of the cost function is, in this case, a minimization of the displaced frame difference. The DFD is here calculated with the luminance values of the video signals but can also be calculated with the chrominance values of the video signals. 
     In another embodiment, the cost function is related to the Displaced Frame Correlation (DFC). The DFC measurement is computed on the pixels belonging to the area S overlapping both incoming frame F(n) and current large static image M(n−1) as follows:        DFC   =           ∑   S                       L        (     x   ,   y     )            L        (       x   ′     ,     y   ′       )                 ∑   S                         L        (     x   ,   y     )       2            L        (       x   ′     ,     y   ′       )       2             .                     
     The optimization of the cost function is, in this case, a maximization of the displaced frame correlation. The DFD is here calculated with the luminance values of the video signals but can also be calculated with the chrominance values of the video signals. 
     The motion estimation method according to the invention comprises two main steps: 
     A first step is performed to initialize the motion parameters automatically for the two first frames. 
     During a second step, each motion parameter is independently optimized, by minimizing a cost function related to the DFD. This cost function cost( ) is, in the preferred embodiment, a weighted mean square error defined as follows:          cost        (     r   p     )       =       ∑   p            1   2          w   p          r   p   2                         
      where w p  is a weighting coefficient, which is defined as follows:          w   p     =       1     r   p                      r   p              ρ        (     r   p     )                         
      where ρ is a symmetric, positive-definite function with a unique maximum at r p =0. 
     The ρ function is chosen in order to reduce the influence of outliers. In the preferred embodiment, the ρ function is a lorentzian function defined as follows:          ρ        (       r   p     ,   σ     )       =     log        [     1   +       1   2            (       r   p     σ     )     2         ]                       
      where σ is a scale factor. 
     Other ρ functions can be suitable for the present invention such as, for example, the German and McClure function, which is defined as follows:          ρ        (       r   p     ,   σ     )       =         r   p   2       σ   +     r   p   2         .                     
     In a second embodiment, the cost function is another weighted mean square error, taking into account an information on the gradient of a pixel p (grad p ) as follows:          cost        (     r   p     )       =         ∑     p   /     (       grad   p     ≥   T     )                w   p          r   p   2             ∑     p   /     (       grad   p     ≥   T     )              w   p                         
     where T is a threshold close to zero and where the weighting coefficient w p  is defined as follows:          w   p     =     2     2   +       r   p   2       1   +       grad   p   2          σ   2                               
     In this second embodiment, the weighting coefficient w p  of the mean square error is normalized by dividing it by the sum of all the weights at each pixel location to favor small displacements with small errors rather than large displacements with large errors. Moreover, the introduction of a gradient information allows to: 
     give more importance to regions where the gradient is higher than the threshold T, these regions being more appropriate for matching purposes, 
     discard regions where the gradient is below the threshold T, thus enabling to increase the speed of the cost estimation. 
     FIG. 2 is a flowchart showing the method used to perform the automatic initialization of the motion parameters for the two first frames. 
     In the preferred embodiment, a translation transform, which needs only two motion parameters, is used in order to get a first approximation of the displacements between the two first frames of the video sequence, where no prediction is available. 
     The automatic initialization step comprises: 
     an initialization sub-step (INI) of the pixel position xx_min corresponding to the minimum of the cost function in an horizontal direction: xx_min=0, 
     a calculation sub-step (CALC) of the value j of the pixel position corresponding to the minimum of the cost function cost( ) when applying translations on the incoming frame in an horizontal direction, the amplitude i of the translation vector being comprised between −5 and +5 pixels: 
     j=Argmin[cost(xx_min+i)] 
     −5≦i≦5, 
     where Argmin is the function that returns the abscissa corresponding to the minimum of the cost function, giving here the displacement between the two frames for the considered direction, 
     a test (Cj) on the value of j, 
     if the test is not satisfied (j is not equal to zero), a sub-step of re-calculation (INC) of the value xx_min: xx_min=xx_min+j, 
     if the test is satisfied (J=0), the end of the process (RES) giving the final translation xx_min in the horizontal direction. 
     The same algorithm is applied in the vertical direction in order to find the translation yy_min to be performed. 
     FIG. 3 is a flowchart showing the iterative process used to optimize the motion parameters. This method is based on Powell&#39;s convergence method. 
     The set of eight motion parameters, corresponding to the coordinates of the four vertices, is initialized to values given by the prediction of global motion, in a k ( 0 ) with 0≦k≦7. 
     The step of optimization of the motion parameters comprises: 
     an initialization sub-step (INIkl) of k and of a counter l: k=l=0, 
     a test (Ck) on the value of k, 
     if the value of k is strictly lower than 8 (y), a sub-step of calculation (PI) of the value of the motion parameter a k (l+1), which corresponds to a minimum of the cost function cost( ): 
     a k (I+1)=Argmin[cost(a k (I)+i)] 
     iε, 
     followed by a sub-step of incrementation by one of k (INCk), 
     in the contrary case (n), a second test (Ca) on the maximum M, for the different values of k, of the absolute value of the difference between a k (l+1) and a k (l):          M   =       max   k          (              a   k          (     l   +   1     )       -       a   k          (   l   )              )         ,                   
     if the value of M is inferior to a threshold (y), the end of the process (RESa) giving the values of a k (l+1), 
     in the contrary case (n), a sub-step of computation of new directions of minimization (DIR), followed by a sub-step of incrementation by one of l (INCl) and a sub-step of re-initialization of k (INIk). 
     The sub-step of calculation (PI) of the value a k (l+1) is performed using parabolic interpolations. A first parabolic interpolation is performed on the values of the cost function corresponding to three consecutive pixels. Then, a new parabolic interpolation is performed on the three pixels nearest the minimum of the parabola previously found. The process ends when the minimum of the parabola is comprised in the window defined by the three investigated pixels. Such a calculation method increases the convergence of the optimization step. When a parabolic interpolation operation is not possible (that is when the parabola has a maximum instead of a minimum), the calculation of the value of a k (l+1) is performed using a gradient descent, which consists in successive comparisons of values of the cost function of consecutive pixels until a minimum of said cost function is reached. 
     When l=0, the directions followed by the eight parameters for minimizing the cost function are horizontal for abscissa or vertical for ordinates, as described in FIG.  1 . When l≧1, the directions followed for optimization are reviewed given the last deformation, as described in FIG.  4 . The optimization direction are defined as the direction d 1 ( 1 ) going from the vertex A( 1 −1) to the vertex A( 1 ) and its perpendicular d 2 ( 1 ) and so on for the three other vertices. 
     This motion estimation method can be used in a method and its corresponding device for generating a large static image M(n), such as a sprite or a mosaic. Such a method is described in FIG.  5 . 
     Three main steps may compose a large static image M(n) generation. First, the global motion estimation step (ME) according to the invention has to be performed in order to merge the incoming frame F(n) with the large static image M(n−1) already composed of the previous frames F( 1 ), F( 2 ), . . . , F(n−1). Said global motion estimation step (ME) gives the motion parameters a k . The current frame is then compensated using the motion parameters; this second step is also called warping (WAR). The warped current frame F(n) is finally blended (BLE) with the large static image M(n−1) in order to form a new accreted large static image M(n) giving a panoramic view of the scene, which is stored in a memory (MEM) in order to be merged with the next incoming frame F(n+1), and so on.