# Patent

## Title
Method and apparatus for motion compensated temporal interpolation of video sequences

## Abstract

A method and device for processing video signals is provided, comprising the steps of: selecting a motion vector having the least mean square error from an M×N block, applying a vector filter to the motion vector, and if filter output MSE is below a present threshold select the filtered motion vector as output filter, and if above the threshold, select input vector as output filter. Perform a P×Q nearest neighbor motion vector substitution on the output motion vector field, where P is less than M and Q is less than N. Perform an S×T nearest neighbor substitution on the output motion vector field, where S is less than P and T is less than Q.

## Background
This application claims the benefit under 35 U.S.C. § 365 of International Application PCT/US01/26514 filed Aug. 27, 2001, which claims the benefit of U.S. Provisional Application No. 60/228,362, filed Aug. 28, 2000.


BACKGROUND OF THE INVENTION
1. Technical Field
The invention relates generally to the processing of video signals; and more particularly to the interpolation of temporally consecutive video frames.
2. Description of the Prior Art
Block-based minimum mean-squared error (MSE) motion estimation techniques used to interpolate motion between two temporally-consecutive frames of a video sequence, provide the best match for each block, but do not necessarily provide motion vectors which represent true motion. Previously proposed motion compensated temporal interpolation (MCTI) algorithms have used modified motion estimation methods for estimating motion to ultimately display a reasonable reconstructed version of the image transmitted. When extraction of the motion is not precise, the image reconstructed will not be smooth and will include discontinuities. Therefore, there exists a need for an improved scheme for motion compensated interpolation of video sequences between temporally-related video frames.
SUMMARY OF THE INVENTION
The instant invention is a method for motion compensated temporal interpolation of video frames using filter motion-vector fields. The method encompasses fitering the motion-vector field produced by a standard block-based minimal mean-squared error (MSE) motion estimator. Upon filtering, MPEG-encoded motion vectors can be used for interpolation and use of a specialized motion compensated temporal interpolation (MCTI) estimator is not necessary.
In one exemplary embodiment of the invention, filtering of received motion vector fields is accomplished by first processing the motion vector field at block size 32×32. For each 32×32 block, compute the MSE for each of the received motion vectors on the block (or a subset thereof) and select a motion vector which minimizes the MSE for the 32×32 block. Second, process the motion vector field at block size 16×16, apply a nonlinear vector filter to the motion vector field, and then perform 16×16 nearest-neighbor motion vector substitution. Third, process the motion vector field at block size 8×8 and apply 8×8 nearest-neighbor motion vector substitution.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 shows a flow diagram of the filtering method according to a preferred embodiment of the present invention.
FIG. 2 shows a plot of the motion vector field of the video data as received prior to processing according to the present invention;
FIG. 3 shows a plot of the motion vector field after processing according to the present invention.



DETAILED DESCRIPTION
The invention is directed to a process for increasing the frame rate of a video sequence by interpolating new frames between temporally-consecutive frames of the original sequence. The temporal interpolation is performed along motion trajectories using motion vectors between each pair of temporally-consecutive original frames.
One exemplary embodiment of the process according to the principles of the present invention is implementable with a computer having a Pentium IV or equivalent class processor, RAM and ROM memory for storing codes executable by the processor to perform the process according to the invention.
Referring to FIG. 1, image data coded into blocks is received, the blocks having motion vectors (step 100). The motion vector field at 32×32 pixel block size is processed. For each 32×32 block, compute the mean-squared error (MSE) using each of the received motion vectors within that 32×32 block (step 110). The motion vector having the least MSE is selected (step 120), and it is tested against a predetermined threshold (step 130). If the minimum MSE is greater than the present threshold value, there is no match and the block is marked as having no match (step 140). Otherwise, the motion vector minimizing the MSE is selected as the motion vector for the 32×32 block.
The chosen motion vector is then further localized in succeedingly smaller blocks. A vector filter is applied to the chosen motion vector. The filter is preferably nonlinear, such as the RE filter described in (step 150) “Ranking in RP and its use in multivariable image estimation”, Hardie and Arce, IEEE Transaction on Circuits and Systems for Video Technology, Vol. 1, No. 2, pp. 197–209, June 1991. Application of the nonlinear filter removes the more noisy components of the motion vector data. After the filter has been applied, the filtered motion vector is tested against for each 16×16 block to determine whether the filtered output motion vector can be either accepted or replaced by the input motion vector to the filter for that block. This is because the filter is applied to the motion vector field without any consideration of the pixel data of the frames being interpolated. For a given 16×16 block let the MSE obtained using the input to the filter be MSEin and let the MSE obtained using the output of the filter be MSEout. Then if MSEout<16×MSEin then the filtered output motion vector is selected for the block. Otherwise the input motion vector is retained for the block (step 160). Then, 16×16 nearest neighbor substitution is performed. For each 16×16 block, the current motion vector for that block is tested against the motion vectors of the four nearest neighboring 16×16 blocks. The motion vector which minimizes the MSE for the 16×16 block is selected as the output of the block group (step 170). As at the 32×32 level, if the minimum MSE is above a threshold value, the block is marked as having no match.
The nearest-neighbor substitution process is then applied to 8×8 blocks. For each 8×8 block the current motion vector for that block is tested against the motion vectors of the four nearest neighboring 8×8 blocks. The motion vector which minimizes the MSE for the 8×8 block is selected as the output for that block group (step 180). Again, the block is marked as having no match if the minimum MSE is above a threshold value.
According to this embodiment of the invention, the output of the 8×8 nearest neighbor substitution process is the motion vector field which is used to interpolate between the two input frames (step 190).
Generally, the method encompassed in the principles of the present invention may be summarized as comprising the following generalized steps: selecting a motion vector having the least mean square error from an M×N block, applying a vector filter to the motion vector, and if filter output MSE is below a preset threshold select the filtered motion vector as output filter, and if above the threshold, select input vector as output filter. Perform a P×Q nearest neighbor motion vector substitution on the output motion vector field, where P is less than M and Q is less than N. Perform an S×T nearest neighbor substitution on the output motion vector field, where S is less than P and T is less than Q.
FIG. 2 shows the motion vector field prior to processing, in accordance with the principles of the present invention.
FIG. 3 shows the motion vector field after processing, in accordance with the principles of the present invention. It can be seen that the motion vectors appear in random directions prior to processing and are in a substantially common direction after the processing. Advantageously, the processing of the video data according to the present invention extracts the motion vectors having true motion. Interpolation of the true motion vectors results in a smooth reconstructed image.
A representative listing including coding instructions for an interpolation process is shown as follows:
For a received bit stream having progressive material, M=1, regular GOP structure, and spatial resolution J×K, the received bitstream having frame structure P1, P3, P5, P7, interpolation is performed half way between two frames to insert a frame between each frame pair. As an example, interpolation of the P3 and P1 frames to form interpolated frame B2:

    
    
        P3 picture having J/16×K/16 field of motion vectors. M3 (x,y)
    
    


Filter M3 (x,y) using the process described above to obtain new motion vector field m3 (x,y). Use m3 (x,y) to compute frame B2.
For χ=0, . . . , J/16−1; y=0, . . . K/16−1


    
    
        χ′=16χ+dχ/4,y′=16y+dy/4 where
        (dχ, dy)=m3(x,y)

For i=0, . . . 15; j=0, . . . 15

        Compute B2 (χ′+i, y′+j)
    
    






  
    
      
        
          
            B
            2
          
          ⁡
          
            (
            
              
                χ
                +
                j
              
              ,
              
                
                  y
                  ′
                
                +
                j
              
            
            )
          
        
        =
        
        ⁢
        
          [
          
            
              
                a
                1
              
              ⁢
              
                
                  P
                  1
                
                ⁡
                
                  (
                  
                    
                      
                        χ
                        ′
                      
                      +
                      j
                      +
                      
                        dx
                        /
                        4
                      
                    
                    ,
                    
                      
                        y
                        ′
                      
                      +
                      i
                      +
                      
                        dy
                        /
                        4
                      
                    
                  
                  )
                
              
            
            +
          
        
      
    
  
  
    
      
        
        ⁢
        
          
            
              b
              1
            
            ⁢
            
              
                P
                1
              
              ⁡
              
                (
                
                  
                    
                      χ
                      ′
                    
                    +
                    j
                    +
                    
                      d
                      ⁢
                      
                        
                      
                      ⁢
                      
                        χ
                        /
                        4
                      
                    
                    +
                    1
                  
                  ,
                  
                    
                      y
                      ′
                    
                    +
                    i
                    +
                    
                      dy
                      /
                      4
                    
                  
                
                )
              
            
          
          +
        
      
    
  
  
    
      
        
        ⁢
        
          
            
              c
              1
            
            ⁢
            
              
                P
                1
              
              ⁡
              
                (
                
                  
                    
                      χ
                      ′
                    
                    +
                    j
                    +
                    
                      dx
                      /
                      4
                    
                  
                  ,
                  
                    
                      y
                      ′
                    
                    +
                    i
                    +
                    
                      dy
                      /
                      4
                    
                    +
                    1
                  
                
                )
              
            
          
          +
        
      
    
  
  
    
      
        
        ⁢
        
          
            
              d
              1
            
            ⁢
            
              
                P
                1
              
              ⁡
              
                (
                
                  
                    
                      χ
                      ′
                    
                    +
                    j
                    +
                    
                      dx
                      /
                      4
                    
                    +
                    1
                  
                  ,
                  
                    
                      y
                      ′
                    
                    +
                    i
                    +
                    
                      dy
                      /
                      4
                    
                    +
                    1
                  
                
                )
              
            
          
          +
        
      
    
  
  
    
      
        
        ⁢
        
          
            
              a
              3
            
            ⁢
            
              
                P
                3
              
              ⁡
              
                (
                
                  
                    
                      χ
                      ′
                    
                    +
                    j
                    -
                    
                      dx
                      /
                      4
                    
                    -
                    1
                  
                  ,
                  
                    
                      y
                      ′
                    
                    +
                    i
                    -
                    
                      dy
                      /
                      4
                    
                    -
                    1
                  
                
                )
              
            
          
          +
        
      
    
  
  
    
      
        
        ⁢
        
          
            
              b
              3
            
            ⁢
            
              
                P
                3
              
              ⁡
              
                (
                
                  
                    
                      χ
                      ′
                    
                    +
                    j
                    -
                    
                      dx
                      /
                      4
                    
                  
                  ,
                  
                    
                      y
                      ′
                    
                    +
                    i
                    -
                    
                      dy
                      /
                      4
                    
                    -
                    1
                  
                
                )
              
            
          
          +
        
      
    
  
  
    
      
        
        ⁢
        
          
            
              c
              3
            
            ⁢
            
              
                P
                3
              
              ⁡
              
                (
                
                  
                    
                      χ
                      ′
                    
                    +
                    j
                    -
                    
                      dx
                      /
                      4
                    
                    -
                    1
                  
                  ,
                  
                    
                      y
                      ′
                    
                    +
                    1
                    -
                    
                      dy
                      /
                      4
                    
                  
                
                )
              
            
          
          +
        
      
    
  
  
    
      
        
          
          ⁢
          
            
              a
              3
            
            ⁢
            
              
                P
                3
              
              ⁡
              
                (
                
                  
                    
                      χ
                      ′
                    
                    +
                    j
                    -
                    
                      dx
                      /
                      4
                    
                  
                  ,
                  
                    
                      y
                      ′
                    
                    +
                    i
                  
                  ,
                  
                    dy
                    /
                    4
                  
                
                )
              
            
          
          ]
        
        /
        16
      
    
  




    a1=(4−dx % 4)*(4−dy % 4)
    b1=(dx % 4)*(4−dy % 4)
    c1=(4−dx % 4)*(dy % 4)
    d1=(dx % 4)*(dy % 4)
    a3=(dx % 4)*(dy % 4)=d1 
    b3=(4−dx % 4)*(dy % 4)=c1 
    c3=(dx % 4)*(4−dy % 4)=b1 
    d3=(4−dx % 4)*(4−dy % 4)=a1 


If B2 (χ′+i, y′+j) has already been computed, keep a running average, or keep all values computed and average, or do not replace old value with new value, or scrap old and new values and use zero motion vector.
If pixel (χoyo) has not been visited:
If (χoyo) was in an intro-coded macroblock in P3 AND P1 (χoyo) was used for prediction

B2(χoyo)=P3(χoyo)

Else if (χoyo) was in an intra-coded MB in P3 AND P1(χoyo) was not used for prediction

B2(χoyo)=(P1(χoyo)+P3(χoyo))/2

Else if (χoyo) was not in an intra-coded MB in P3 and P1(χoyo) was used for prediction
Use spatial interpolation for

B2(χoyo)

Else

B2(χoyo)=P1(χoyo)

Nearest-neighbor MV Substitution:

For each block:

    
    
        if not intra, compute MSE using current motion vector
        for each non-intra neighbor, use neighbor's motion vector to compute MSE
        Find minimum MSE
        if (minimum MSE<threshold)
        
            Select corresponding motion vector else
            block is intra
        
        
    
    


Having described embodiments of the above invention, it is noted that modifications and variation can be made by persons skilled in the art in light of the above teachings. It is therefore to be understood that changes may be made in the particular embodiments of the invention disclosed which are within the scope and spirit of the invention as defined by the appended claims.

## Claims

1. A method of processing video signals in the form of motion vectors generated by motion estimation, the method characterized by the steps of:
selecting a motion vector having the least mean square error from a block of size M×N;
applying a vector filter to the motion vector, if filter output MSE is below a preset threshold select the filtered motion vector as output filter, and if above the threshold, select input vector as output filter;
performing a P×Q nearest neighbor motion vector substitution on the output motion vector field, where P is less than M and Q is less than N; and
performing an S×T nearest neighbor substitution on the output motion vector field, where S is less than P and T is less than Q.

2. The method according to claim 1, wherein the step of applying a vector filter is performed using a nonlinear filter.

3. The method according to claim 2, wherein the nonlinear filter is the RE filter.

4. The method according to claim 1, wherein the preset threshold is sixteen times MSE of the input vector.

5. The method according to claim 1, wherein the step of performing P×Q nearest neighbor substitution includes comparing the output motion vector against motion vectors of neighboring P×Q blocks and outputting the motion vector having the smallest MSE.

6. The method according to claim 1, wherein the step of performing S×T nearest neighbor substitution includes comparing the selected motion vector against motion vectors of neighboring S×T blocks and outputting the motion vector having the smallest MSE.

7. The method according to claim 1, wherein M×N is 32×32, P×Q is 16×16 and S×T is 8×8.

8. An apparatus for processing video signals in the form of motion vectors generated by motion estimation, the apparatus characterized by:
means for selecting a motion vector having the least mean square error from a block of size M×N;
means for applying a vector filter to the motion vector, if filter output MSE is below a preset threshold select the filtered motion vector as output filter, and if above the threshold, select input vector as output filter;
means for performing a P×Q nearest neighbor motion vector substitution on the output motion vector field, where P is less than M and Q is less than N; and
means for performing an S×T nearest neighbor substitution on the output motion vector field, where S is less than P and T is less than Q.

9. The apparatus according to claim 8, wherein the step of applying a vector filter is performed using a nonlinear filter.

10. The apparatus according to claim 9, wherein the nonlinear filter is the RE filter.

11. The apparatus according to claim 8, wherein the preset threshold is sixteen times MSE of the input vector.

12. The apparatus according to claim 8, wherein the step of performing P×Q nearest neighbor substitution includes comparing the output motion vector against motion vectors of neighboring P×Q blocks and outputting the motion vector having the smallest MSE.

13. The apparatus according to claim 8, wherein the step of performing S×T nearest neighbor substitution includes comparing the selected motion vector against motion vectors of neighboring S×T blocks and outputting the motion vector having the smallest MSE.

14. The apparatus according to claim 8, wherein M×N is 32×32, P×Q is 16×16 and S×T is 8×8.