Abstract:
A method of coding a moving picture reduces blocking artifacts. The method includes defining pixel sets S0, S1, S2 around a block boundary, selectively determining a deblocking mode as a default mode or a DC offset mode depending on the degree of blocking artifacts. If the default mode is selected, frequency information is obtained around the block boundary per pixel using a 4-point DCT kernel, for example, a magnitude of a discontinuous component belonging to the block boundary is replaced with a minimum magnitude of discontinuous components belonging to the surroundings of the block boundary in the frequency domain and the replacing step is applied to the spatial domain. If the DC offset mode is selected and a determination is made to perform DC offset mode, the blocking artifacts in a smooth region are removed in the DC offset mode.

Description:
Notice: More than one reissue application has been filed for the reissue of U.S. Pat. No. 6,240,135. The reissue applications are application Ser. No. 11/834,312 (the present application); Ser. Nos. 11/834,347; 11/851,551; 11/851,529; and 11/851,517, all of which are divisional reissues of U.S. Pat. No. 6,240,135. 
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a method of coding data, and more particularly, to a method of removing blocking artifacts when coding image signals such as in a moving picture at low-bit-rate. 
     2. Background of the Related Art 
     Generally, to efficiently compress a time variable video sequence, it is necessary to remove redundancy in the temporal domain as well as in the two-dimensional spatial domain. In moving picture experts group (MPEG), discrete cosine transform (DCT) is used to remove the redundancy in the two-dimensional spatial domain while a motion compensation method is used to remove the redundancy in the temporal domain. 
     The DCT is a method of removing the correlativity between data through a two-dimensional spatial transformation. Each block in a picture is spatially transformed using the DCT after the picture is divided into blocks. Data that has been spatially transformed tends to be driven to a certain direction. Only a group of the data driven in the certain direction is quantized and transmitted. 
     Pictures, which are consecutive in the temporal domain, tend to form motions of a human being or an object at the center of the frame. This property is used to reduce the redundancy of the temporal domain in the motion compensation method. A volume of data to be transmitted can be minimized by taking out a similar region from the preceding picture to fill a corresponding region, which has not been changed (or has very little change), in the present picture. The operation of finding the most similar blocks between pictures is called a motion estimation. The displacement representing a degree of motion is called a motion vector. MPEG uses a motion compensation-DCT method so that the two methods combine. 
     When a compression technique is combined with a DCT algorithm, the DCT transform is usually performed after input data is sampled in a unit size of 8×8, and the transform coefficients are quantized with respect to a visual property using quantization values from a quantization table. Then, the data is compressed through a run length coding (RLC). The data processed with the DCT is converted from a spatial domain to a frequency domain and compressed through the quantization with respect to the visual property of human beings, not to be visually recognized. For example, since eyes of human beings are insensitive to a high frequency, a high frequency coefficient is quantized in a large step size. 
     For the quantized data, the data having a relatively high frequency is coded with a short code word. The quantized data having a low frequency is coded with a long code word. Thus, the data is finally compressed. 
     In processing a moving picture as discussed above, blocks are individually processed to maximize the compression ratio and coding efficiency. However, the individual process causes blocking artifacts that disturb the eyes of human beings at boundaries between blocks. 
     A related art method of removing blocking artifacts will be described with reference to  FIGS. 1 and 2 .  FIG. 1  is a pixel matrix illustrating a method for removing blocking artifacts.  FIG. 2  is a pixel matrix illustrating block boundaries in horizontal and vertical directions. 
     Various algorithms have been presented for removing blocking artifacts that appear in a coding system, which individually processes blocks. For example, MPEG-4 used a deblocking filter by Telenor, which uses the following algorithm: 
     If B is replaced with B 1  and C is replaced with C 1 ,
         B 1 =B+d 1 ,   C 1 =C−d 1 , and   d 1 =sign(d)*(MAX(0,|d|−MAX(0,2* |d|−QP)))
 
where d=(3A−8B+8C−3D)/16 and QP denotes the quantization parameter of the macroblock where pixel C belongs.
       

     In processing a MPEG-4 moving picture, blocking artifacts are removed using the above algorithm to improve picture quality. However, it is difficult to effectively remove the blocking artifacts with the above with a small operation capacity in a real time operation. For example, coding and decoding a moving picture is a real time operation. In other words, to completely remove the blocking artifacts, a large calculation amount is needed, which is undesirable in efficiency. 
     Alternatively, to remove the blocking artifacts, there is provided a method of changing processes of coding and decoding. This method increases the amount of bits to be transmitted. 
     Still another method for removing blocking artifacts is based on the theory of projection onto convex sets (POCS). However, this method is applied only to a still picture because of an iteration structure and long convergence time. 
     Thus, the related art methods for removing blocking artifacts in a coding system of a moving picture have several problems. First, in performing an algorithm for removing the blocking artifacts, a calculation is complicated and the calculation amount and time become correspondingly large. Further, the blocking artifacts are not removed in either complex regions or smooth regions in a picture. In addition, the amount of bits to be transmitted increases. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to provide a method of removing blocking artifacts in a coding system that substantially obviates one or more of the problems due to limitations and disadvantages of the related art. 
     Another object of the present invention is to remove blocking artifacts when necessary in a smooth portion of a moving picture. 
     Yet another object of the present invention is to provide a method of removing blocking artifacts in a coding system of a moving picture where blocking artifacts of the moving picture are removed at real time using frequency features around a block boundary without increasing the amount of bits. 
     To achieve at least the above objects in a whole or in parts, a method of removing blocking artifacts in a coding system according to the present invention includes determining at least pixel sets S 0 , S 1 , S 2  around a block boundary, selecting one of a default mode and a DC offset mode as a deblocking mode based on an amount of blocking artifacts, deblocking filtering pixels adjacent the block boundary if a default mode is selected, deblocking filtering of pixels adjacent the block boundary if a default mode is selected, and removing artifacts in the DC offset mode when the DC offset mode is selected and a DC offset mode condition is satisfied, where the artifacts are removed in the DC offset mode according to the following equation: 
     
       
         
           
             
               
                 v 
                 n 
               
               = 
               
                 
                   ∑ 
                   
                     k 
                     = 
                     
                       - 
                       4 
                     
                   
                   4 
                 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 
                   
                     b 
                     k 
                   
                   · 
                   
                     p 
                     
                       n 
                       + 
                       k 
                     
                   
                 
               
             
             , 
             
               1 
               ≤ 
               n 
               ≤ 
               8 
             
           
         
       
       
         
           
             
               
                 P 
                 m 
               
               = 
               
                 
                   
                     ( 
                     
                       
                          
                         
                           
                             v 
                             1 
                           
                           - 
                           
                             v 
                             0 
                           
                         
                          
                       
                       &lt; 
                       QP 
                     
                     ) 
                   
                   ? 
                   
                     v 
                     0 
                   
                 
                 ⁢ 
                 
                   : 
                 
                 ⁢ 
                 
                   v 
                   1 
                 
               
             
             , 
           
         
       
     
     If m&lt;1;
         v m , if 1≦m≦8;   (|v 8 −v 9 |&lt;QP)? v 9 : v 8 , if m&gt;8;   {b k :−4≦k≦4}={1,1,2,2,4,2,2,1,1}//16,
 
wherein v 0 −v 9  are boundary pixels, QP is the quanatation parameter of a block adjacent the block boundary, and v n  is an adjusted pixel value.
       

     To further achieve the above advantages and in accordance with the purpose of the present invention, as embodied and broadly described, a method of removing blocking artifacts in a coding system of a moving picture according to the present invention includes the steps of defining pixel sets S 0 , S 1 , S 2  around block boundary, selectively determining a deblocking mode as a default mode or a DC offset mode depending on the degree of blocking artifacts after obtaining a mode decision value, obtaining frequency information around the block boundary per pixel using 4-point DCT kernel if the default mode is determined, replacing a magnitude of a discontinuous component belonging to the block boundary with a minimum magnitude of discontinuous components belonging to the surroundings of the block boundary in the frequency domain and applying this replacing step to the spatial domain, judging whether or not it is necessary to perform DC offset mode if the DC offset mode is determined, and removing the blocking artifacts in a smooth region when the judgment is to perform the DC offset mode. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The invention will be described in detail with reference to the following drawings in which like reference numerals refer to like elements wherein: 
         FIG. 1  is a diagram showing a pixel matrix illustrating a related art method of removing blocking artifacts; 
         FIG. 2  is a diagram showing a pixel matrix illustrating block boundaries in horizontal and vertical directions; 
         FIG. 3  is a schematic diagram showing a 4-point DCT basis; 
         FIG. 4  is a flow chart showing a preferred embodiment of a method of removing blocking artifacts according to the present invention; and 
         FIG. 5  is a table showing exemplary results of a preferred embodiment of a method of removing blocking artifacts according to the present invention. 
     
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
     In a preferred embodiment of the present invention, blocking artifacts at a block boundary are removed in a frequency domain not a spatial domain. Frequency features around the block boundary are preferably obtained using a 4-point DCT kernel, which can be easily calculated. Thus, a complex region at the block boundary can effectively be processed by extending the smoothness of a picture from the frequency domain to the spatial domain. 
     Using the 4-point DCT kernel has advantages that frequency analysis is possible and deblocking can easily be processed. Therefore, the 4-point DCT Kernel can efficiently remove the blocking artifacts of a real time moving picture. 
     The blocking artifacts appear at the block boundary between fixed block patterns in the form of a line of discontinuity. Accordingly, removal of the blocking artifacts involves transformation of the discontinuity of the block boundary region to continuity. 
       FIG. 2  shows a block boundary region in a horizontal or a vertical direction. In one-dimensional images consisting of four points such as S 0 , S 1  and S 2  located around the block boundary, S 1  and S 2  are individually processed with a block-unit compression method. Thus, S 1  and S 2  are not influenced by the blocking artifacts. However, S 0  is located across a block boundary. Thus, S 0  is directly influenced by the blocking artifacts. 
     In the preferred embodiment according to the present invention, frequency information in S 1  and S 2  is used to reduce the blocking artifacts from S 0 . When images change smoothly, image features of S 0 , S 1  and S 2  are similar to one another. This means that image features of S 0 , S 1  and S 2  are also similar to one another in the frequency domain. 
     Since the frequency features of S 0 , S 1  and S 2  are similar, the frequency component of S 0  influenced by the blocking artifacts is adjusted considering the frequency components of S 1 , S 2 , which can remove the blocking artifacts. Here, DCT, which is widely applied as an image compression technique, is used as a frequency analysis tool. 
     The blocking artifacts may appear in both horizontal and vertical block boundaries. In the preferred embodiment according to the present invention, after the blocking artifacts at the horizontal block boundary are removed, the blocking artifacts at the vertical block boundary are removed. 
     Pixel sets S 0 , S 1  and S 2 , which overlap, can be defined around the horizontal block boundary. S 0  is a 4-point pixel set arranged across the block boundary while S 1  and S 2  are 4-point pixel sets that adjoin the block boundary. 
     That is to say, the pixel set S 0  contains a discontinuity. The discontinuity in S 0  is removed in the preferred embodiment using common information (e.g., between S 0  and S 2 ), which are not directly influenced by the discontinuity of the block boundary. 
     The 4-point DCT basis is used to get information around the block boundary and is shown in  FIG. 3 . The 4-point DCT basis vectors have symmetric and anti-symmetric properties. In other words, assuming the 4-point DCT coefficients of S 0  are defined as a 0,0 (DC), a 1,0 , a 2,0 , a 3,0 , although both a 2,0  and a 3,0  are the high frequency components, a 2,0  is symmetric and a 3,0  is anti-symmetric around the center. 
     As shown in  FIG. 2 , since the center of S 0  is coincident with the block boundary, a factor directly affecting the block discontinuity is not the symmetric component but the anti-symmetric component. Thus, in the preferred embodiment the magnitude of a 3,0  in the frequency domain is adjusted based on the anti-symmetric component so that the block discontinuity can be adjusted. An appropriate adjustment of a 3,0  in the frequency domain is directly related to the removal of the block discontinuity in the spatial domain. 
     Operations for reduction or removal of the block discontinuity will now be described. In the preferred embodiment, the magnitude of a 3,0  is replaced with the minimum value of the magnitudes of a 3,1  and a 3,2 . By doing this, a large blocking artifact, which appears when one side of the block boundary to be processed is smooth, can be removed. For a complex region where both S 1  and S 2  are the objects of motion (i.e., all the values of the magnitudes of a 3,0 , a 3,1  and a 3,2  are large), there is little influence on the block boundary. 
     A method for removing the blocking artifacts in a default mode in the preferred embodiment is as follows:
         v 4 ′=v 4 −d;   v 5 ′=v 5 +d; and   d=CLIP(c 2 .(a 3,0 ′−a 3,0 )//c 3 ,0(v 4 −v 5 )/2)*δ(|a 3,0 |&lt;QP),
 
where a 3,0 ′=SIGN(a 3,0 )*MIN(|a 3,0 |,|a 3,1 |,|a 3,2 |),
   a 3,0 =([c 1 −c 2  c 2 −c 1 ]*[v 3 v 4 v 5 v 6 ] T )//c 3 ,   a 3,1 =([c 1 −c 2  c 2 −c 1 ]*[v 1 v 2 v 3 v 4 ] T )//c 3 , and   a 3,2 =([c 1 −c 2  c 2 −c 1 ]*[v 5 v 6 v 7 v 8 ] T )//c 3 .       

     Thus, boundary pixels v 4  and v 5  that adjoin the boundary are replaced with v 4 ′ and v 5 ′, respectively. QP is the quantization parameter of the macroblock where pixel v 5  belongs. Values c 1 , c 2 , c 3  are kernel constants used in the 4-point DCT. The values of c 1  and c 2  are approximated to an integer, and the value of c 3  is approximated to a multiple of 2. The values of a 3,0 , a 3,1 , a 3,2  are evaluated from the simple inner product of the DCT kernel and the pixel sets S 0 , S  1  and S 2 . 
     The condition |a 3,0 |&lt;QP is used to count the influence of the quantization parameter on the blocking artifacts. The condition |a 3,0 |&lt;QP also prevents over-smoothing when the blocking artifacts are not very serious. The clipping operation on the compensated value is performed to prevent the direction of the gradient at the block boundary from being enlarged or changed in an opposite direction. 
     This filtering process is performed in both horizontal and vertical block boundaries. In this manner, the blocking artifacts in the whole frame can be removed. 
     In the default mode, only the boundary pixel values v 4  and v 5  are compensated. Thus, the default mode is not sufficient to remove the blocking artifacts in a very smooth region, such as a setting in a picture. Therefore, in the preferred embodiment the blocking artifacts in the smooth region are removed by a DC offset mode. 
     A method for removing the blocking artifacts in the DC offset mode in the preferred embodiment is as follows:
         max=MAX(v 1 , v 2 , v 3 , v 4 , v 5 , v 6 , v 7 , v 8 ),   min=MIN(v 1 , v 2 , v 3 , v 4 , v 5 , v 6 , v 7 , v 8 )   if(|max−min|&lt;2QP), /*low pass filtering*/       

     
       
         
           
             
               
                 v 
                 n 
               
               = 
               
                 
                   ∑ 
                   
                     k 
                     = 
                     
                       - 
                       4 
                     
                   
                   4 
                 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 
                   
                     b 
                     k 
                   
                   · 
                   
                     p 
                     
                       n 
                       + 
                       k 
                     
                   
                 
               
             
             , 
             
               1 
               ≤ 
               n 
               ≤ 
               8 
             
           
         
       
       
         
           
             
               
                 P 
                 m 
               
               = 
               
                 
                   
                     ( 
                     
                       
                          
                         
                           
                             v 
                             1 
                           
                           - 
                           
                             v 
                             0 
                           
                         
                          
                       
                       &lt; 
                       QP 
                     
                     ) 
                   
                   ? 
                   
                     v 
                     0 
                   
                 
                 ⁢ 
                 
                   : 
                 
                 ⁢ 
                 
                   v 
                   1 
                 
               
             
             , 
           
         
       
         
         
           
             if m&lt;1; 
             v m , if 1≦m≦8; 
             (|v 8 −v 9 |&lt;QP)? v 9 : v 8 , if m&gt;8; 
             {b k :−4≦k≦4}={1,1,2,2,4,2,2,1,1}//16. 
           
         
       
    
     If the absolute value of the maximum data value minus minimum data value in the block boundary pixels is smaller than twice the quantization parameter (i.e., if deblocking is required), the blocking artifacts in the smooth region are removed by the DC offset mode. 
     The decision to use the default mode or to use the DC offset mode is preferably made based on the following condition:
 
Mode decision value(eq_cnt)=φ(v 0 −v 1 )+φ(v 1 −v 2 )+φ(v 2 −v 3 )+φ(v 3 −v 4 )+φ(v 4 −v 5 )+φ(v 5 −v 1 )+φ(v 7 −v 8 )+φ(v 8 −v 9 ),
         where φ(γ)=1 if |γ|≦THR1(first threshold value) and φ(γ)=0 otherwise.       

     If the mode decision value eq_cnt≧THR2(i.e., a second threshold value), the DC offset mode is applied. In the remaining cases, default mode is applied. 
     A method for removing the blocking artifacts to code a moving picture at low-rate-bit according to the preferred embodiment of the present invention will be described with reference to  FIG. 4 . After beginning in  FIG. 4 , control continues to step  401 S. In step  401 S, three pixel sets S 0 , S 1 , S 2  are defined based on the horizontal block boundary. From step  401 S, control continues to step  402 S. 
     In step  402 S, the mode decision value (e.g., eq_cnt) is determined and control continues to step  403 S. In step  403 S, the mode decision value is compared with a decision value (e.g., a second threshold value THR2 preferably set by a user) to perform deblocking filtering process by selecting the mode depending on the degree of the blocking artifacts in the picture. 
     If the determination in step  403 S is negative, control continues to step  404 S where the default mode is set. From step  404 S, control continues to step  405 S where frequency information around the block boundary on each of the pixel is determined, for example, using the 4-point DCT kernel. From step  405 S, control continues to step  406 S. 
     In step  406 S, the magnitude of the discontinuous component belonging to the block boundary is replaced with the minimum magnitude of the discontinuous components belonging to the surroundings of the block boundary in the frequency domain. This adjusting operation is applied to the spatial domain. That is, the magnitude of the discontinuous component belonging to the block boundary is replaced with the minimum magnitude of the discontinuous components belonging to the surroundings of the block boundary in the spatial domain. 
     In the default mode of the preferred embodiment, the blocking artifacts are removed in step  406 S using the method as described below:
         v 4 ′=v 4 −d;   v 5 ′=v 5 +d; and   d=CLIP(c 2 .(a 3,0 ′−a 3,0 )//c 3 ,0,(v 4 −v 5 )/2)* δ(|a 3 |&lt;QP,
 
where a 3,0 ′=SIGN(a 3,0 )*MIN(|a 3,0 |,|a 3,1 |,|a 3,2 |),
   a 3,0 =([c 1 −c 2  c 2 −c 1 ]*[v 3 v 4 v 5 v 6 ] T )//c 3 ,   a 3,1 =([c 1 −c 2  c 2 −c 1 ]*[v 1 v 2 v 3 v 4 ] T )//c 3 ,   a 3,2 =([c 1 −c 2  c 2 −c 1 ]*[v 5 v 6 v 7 v 8 ] T )//c 3 . In the default mode, the blocking artifacts are effectively removed in a complex region. However, the default mode does not sufficiently remove blocking artifacts in a smooth region.       

     If the determination in step  403 S is affirmative, control continues to step  407 S where the DC offset mode is set to remove the blocking artifacts. From step  407 S, control continues to step  408 S where the minimum and maximum data values (min, max) are determined. From step  408 S, control continues to step  409 S where a determination is made to remove the blocking artifacts in the default mode. If the determination in step  409 S is negative, the process ends. If the determination in step  409 S is affirmative, control continues to step  410 S. 
     In the DC offset mode according to the preferred embodiment, in step  410 S, the blocking artifacts are removed using the following algorithm.
         max=MAX(v 1 , v 2 , v 3 , v 4 , v 5 , v 6 , v 7 , v 8 ),   min=MIN(v 1 , v 2 , v 3 , v 4 , v 5 , v 6 , v 7 , v 8 ),   if(|max−min|&lt;2.QP), /*low pass filtering*/       

     
       
         
           
             
               
                 v 
                 n 
               
               = 
               
                 
                   ∑ 
                   
                     k 
                     = 
                     
                       - 
                       4 
                     
                   
                   4 
                 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 
                   
                     b 
                     k 
                   
                   · 
                   
                     p 
                     
                       n 
                       + 
                       k 
                     
                   
                 
               
             
             , 
             
               1 
               ≤ 
               n 
               ≤ 
               8 
             
           
         
       
       
         
           
             
               
                 P 
                 m 
               
               = 
               
                 
                   
                     ( 
                     
                       
                          
                         
                           
                             v 
                             1 
                           
                           - 
                           
                             v 
                             0 
                           
                         
                          
                       
                       &lt; 
                       QP 
                     
                     ) 
                   
                   ? 
                   
                     v 
                     0 
                   
                 
                 ⁢ 
                 
                   : 
                 
                 ⁢ 
                 
                   v 
                   1 
                 
               
             
             , 
           
         
       
         
         
           
             if m&lt;1; 
             v m , if 1≦m≦8; 
             (|v 8 −v 9 |&lt;QP)? v 9 : v 8 , if m&gt;8; 
             {b k : −4≦k≦4}={1,1,2,2,4,2,2,1,1}//16. 
           
         
       
    
     The maximum data value and the minimum data value in the block boundary pixels are obtained in step  408 S. Then, if the absolute value of the maximum data value minus the minimum data value is smaller than 2QP (i.e., if deblocking is required), the blocking artifacts in the smooth region are removed by the DC offset mode in steps  409 S and  410 S. 
     From step  406 S and  410 S, control continues to step  411 S. If the deblocking filtering process around the horizontal block boundary is completed, the deblocking filtering process around the vertical block boundary is performed in step  411 S. From step  411 S, control continues to step  412 S. 
     In step  412 S, the deblocking filtering processes around the horizontal and vertical block boundaries repeat over the whole frame. From step  412 S, the process ends. 
       FIG. 5  is a table illustrating exemplary PSNR properties according to the method of removing the blocking artifacts of the preferred embodiment. The conditions yielding the exemplary results of  FIG. 5  are as follows:
         300 frames (only the initial frame was coded in intra.);   Fixed QP;   H.263 quantization;   F_code=1;   Enable DC/AC prediction; and   Rectangular shape VOP.
 
As shown in  FIG. 5 , the method for removing the blocking artifacts of the preferred embodiment improves results relative to VM (no filtering) of MPEG-4.
       

     As described above, the method for removing the blocking artifacts according to the preferred embodiments of the present invention has various advantages. The deblocking filtering process is performed using features of the frequency domain so that the blocking artifacts are effectively removed. Further, the blocking artifacts are removed in both the complex and smooth regions. Thus, an excellent image or picture quality is provided. In addition, amount of bits does not increase. 
     The foregoing embodiments are merely exemplary and are not to be construed as limiting the present invention. The present teaching can be readily applied to other types of apparatuses. The description of the present invention is intended to be illustrative, and not to limit the scope of the claims. Many alternatives, modifications, and variations will be apparent to those skilled in the art.