Abstract:
The invention relates to a device for pre-processing before encoding of a sequence of images including: means of storing the current frame and at least two preceding frames, means of defining a vicinity for each point of the current frame and for each corresponding point in the two preceding frames, means of measuring the motion of the current point relative to its position in the two preceding frames so as to detect whether the current point is in motion or in a static zone. According to the invention, the device includes: means of performing a spatial smoothing on the current point if the current point is in motion, means of performing a space-time smoothing if the current point is located in a static zone.

Description:
[0001]     The invention relates to a pre-processing device and method before encoding of a sequence of video images.  
       BACKGROUND OF THE INVENTION  
       [0002]     Image coding devices are all the more effective if they encode images having a reduced temporal or spatial entropy.  
         [0003]     They are often therefore associated with devices for pre-processing images in which the images are processed to provide a better coding.  
         [0004]     As is known, the pre-processing devices designed to reduce the temporal entropy of a video sequence use linear or nonlinear filters, which increase the temporal redundancy image by image, so as to reduce the coding cost of the predicted or interpolated images.  
         [0005]     The main drawbacks of these methods are: 
        reduced temporal definition which is reflected in smoothing effects on uniform areas,     blurring effects on objects,     duplication of certain outlines in the event of strong motions.        
 
         [0009]     Motion-compensated filters provide a degree of improvement, but there are risks of artifacts in the event of poor motion estimation.  
         [0010]     In the same way, the pre-processing devices designed to reduce the spatial entropy of a video sequence use linear or non-linear filters which reduce and even eliminate the high-frequency components mainly responsible for the image coding cost in intramode. There are many filters, among them the one- or two-dimensional low-pass filters, the Nagao filters, averaging filters and median filters.  
         [0011]     The main drawbacks of these methods are: 
        a reduction in spatial definition that is too visible, in particular in the vertical axis, due to the fact that each frame of an interlaced video has only half the vertical resolution of an image,     blurring effects on the objects,     degraded outlines.        
 
       BRIEF SUMMARY OF THE INVENTION  
       [0015]     The invention proposes to overcome at least one of the abovementioned drawbacks.  
         [0016]     To this end, the invention proposes a device for pre-processing before encoding of a sequence of images including: 
    means of storing the current frame and at least two preceding frames,     means of defining a vicinity for each point of the current frame and for each corresponding point in the two preceding frames,     means of measuring the motion of the current point relative to its position in the two preceding frames so as to detect whether the current point is in motion or in a static zone. 
 
 According to the invention, the device includes 
    means of performing a spatial smoothing on the current point if the current point is in motion,     means of performing a space-time smoothing if the current point is located in a static zone.    
 
         [0022]     Advantageously, the device includes means of increasing the severity of the smoothing according to the amplitude of the luminance in the vicinity of the current point.  
         [0023]     Preferably, the device includes: 
        means of calculating an average luminance in the vicinity of the current point in the current frame,     means of calculating a cumulative average luminance in the vicinity of the current point in the current frame and in the preceding frame,     means of calculating a cumulative average luminance in the vicinity of the current point in the current frame and in the frame preceding the preceding frame,     means of calculating a cumulative average luminance in the vicinity of the current point in the current frame, in the preceding frame and in the frame preceding the preceding frame,     means of selecting one of said averages according to the measurement of motion of the current point.        
 
         [0029]     According to a preferred embodiment, the device includes means of comparing said selected average and the luminance value of the current point of the current frame with predetermined thresholds.  
         [0030]     Preferably, the means of increasing the severity of the smoothing modify the luminance value of the current point according to a factor dependent on the comparison of said selected average and the value of the current point of the current frame with predetermined thresholds.  
         [0031]     According to the preferred embodiment, the means of increasing the severity of the filtering assign the current point a new luminance value dependent on the luminance value of the current point, of said coefficient and of said selected average.  
         [0032]     The invention also relates to a method of pre-processing before encoding of a sequence of images including: 
    a step for storing the current frame and at least two preceding frames,     a step for determining a vicinity for each point of the current frame and for each corresponding point in the two preceding frames,     a step for measuring the motion of the current point relative to its position in the two preceding frames so as to detect whether the current point is in motion or in a static zone. 
 
 According to the invention, the method includes: 
    a step for spatial smoothing on the current point if the current point is in motion,     a step for space-time smoothing if the current point is located in a static zone.    
 
         [0038]     The invention will be better understood and illustrated by means of exemplary embodiments and advantageous implementations, by no means limiting, with reference to the appended figures in which:  
     
    
     BRIEF DESCRIPTION OF THE DRAWINGS  
       [0039]      FIG. 1  represents a device for detecting the static zones,  
         [0040]      FIG. 2  represents the windows used in the current and preceding frames to determine the value of the current point,  
         [0041]      FIG. 3  represents a device of a preferred embodiment of the invention,  
         [0042]      FIG. 4  represents an operating flow diagram of a multiplexing module. 
     
    
     DETAILED DESCRIPTION OF THE INVENTION  
       [0043]      FIG. 1  represents a static zone detection device.  
         [0044]     The detection of the static zones is performed on the basis of the luminance information.  
         [0045]     The device includes a de-interlacer  1 . The de-interlacer  1  converts the video signal at the input into a progressive signal, by doubling the number of lines per frame using a known de-interlacing system which relies on three consecutive frames. This is advantageously used to obtain progressive frames which each contain the complete vertical definition of an image and it is then possible to envisage frame-by-frame comparisons since the respective lines of two consecutive frames are now spatially in the same position.  
         [0046]     The consecutive frames are stored in a memory  2  in order to be used subsequently to determine the static zones. The memory  2  stores the frames one after the other, permanently retaining at least the last two frames received from the de-interlacer  1 .  
         [0047]     Then, for each point of the current frame T, of the immediately preceding frame T- 1  and of the frame T- 2 , the respective means  3 ,  4  and  5  calculate a window centred on the current point.  
         [0048]     The size of the window is three pixels in the horizontal direction and three pixels in the vertical direction for all three frames. These three windows are illustrated in  FIG. 2 . P represents the current point of the current frame T. P′ and P″ represent the points of the same coordinates as the current point respectively in the frames T- 1  and T- 2 .  
         [0049]     The window of the current frame F(T) is made up: 
        on the line above the current point, from left to right, of the points A, B, C,     on the line of the current point D, to the left of the current point and E, to the right of the current point,     on the line below the current point, from left to right, the points F, G and H.        
 
         [0053]     The window of the frame T- 1  called F(T- 1 ) is made up of the points A′, B′, C′, D′, P′, E′, F′, G′, H′, spatially corresponding respectively to the points A, B, C, D, P, E, F, G, H.  
         [0054]     The window of the frame T- 2  called F(T- 2 ) is made up of the points A″, B″, C″, D″, P″, E″, F″, G″, H″ spatially corresponding respectively to the points A, B, C, D, P, E, F, G, H.  
         [0055]     A module  6  calculates ZF(T- 1 ) which corresponds to determining the static zone between the frame T- 1  and the frame T.  
         [0056]     A module  7  calculates ZF(T- 2 ) which corresponds to determining the static zone between the frame T- 2  and the frame T.  
         [0057]     To obtain, ZF(T- 1 ) and ZF(T- 2 ), the following operations are performed:  
         R   ⁢           ⁢   1     =       (                  A   -     A             ⁢   ′              +          B   -     B             ⁢   ′              +          C   -     C             ⁢   ′              +          D   -     D             ⁢   ′              +                      E   -     E             ⁢   ′              +          F   +     F   ′            +          G   -     G   ′            +          H   -     H   ′                    )     8         
         R   ⁢           ⁢   2     =       (                  A   -     A   ′′            +          B   -     B   ′′            +          C   -     C   ′′            +          D   -     D   ′′            +                      E   -     E   ′′            +          F   +     F   ′′            +          G   -     G   ′′            +          H   -     H   ′′                    )     8         
 
         [0058]     If R1&lt;ThresholdS1 then ZF(T- 1 )=1 and the current point P is located in a static zone relative to T- 1 , otherwise ZF(T- 1 )=0.  
         [0059]     If R2&lt;ThresholdS2 then ZF(T- 2 )=1 and the current point P is located in a static zone relative to T- 2 , otherwise ZF(T- 2 )=0.  
         [0060]     Preferably, the following can be taken: 
 
Threshold1=threshold2=8 
 
         [0061]     Then, the values of ZF(T- 1 ) and ZF(T- 2 ) are used to calculate the new value of the current point P.  
         [0062]     To this end,  FIG. 3  represents a device for calculating the new value of the current point P.  
         [0063]     A means  8  receives as input the points of the window F(T) surrounding the current point P and calculates a value AVG8 based on the luminance value of these points, without the current point:  
         AVG   ⁢           ⁢   8     =       A   +   B   +   C   +   D   +   E   +   F   +   G   +   H     8         
 
         [0064]     A means  9  receives as input the points of the window F(T) surrounding the current point P of the current frame T and the corresponding points of the preceding frame T- 1  in the window F(T- 1 ). It calculates an average AVG(T- 1 )17 from these values:  
           AVG   ⁡     (     T   -   1     )       ⁢   17     =               (     A   +   B   +   C   +   D   +   E   +   F   +   G   +   H     )     +               (       A   ′     +     B   ′     +     C   ′     +     D   ′     +     P   ′     +     E   ′     +     F   ′     +     G   ′     +     H   ′       )           17         
 
         [0065]     A means  10  receives as input the points of the window F(T) surrounding the current point P of the current frame T and the corresponding points in the window F(T- 2 ). It calculates an average AVG(T- 2 )17 from these values:  
           AVG   ⁡     (     T   -   2     )       ⁢   17     =               (     A   +   B   +   C   +   D   +   E   +   F   +   G   +   H     )     +               (       A   ′′     +     B   ′′     +     C   ′′     +     D   ′′     +     P   ′′     +     E   ′′     +     F   ′′     +     G   ′′     +     H   ′′       )           17         
 
         [0066]     A means  11  receives as input the points of the window F(T) surrounding the current point P of the current frame T and the corresponding points of the window F(T- 1 ) and of the window F(T- 2 ). It calculates an average AVG(T- 1 - 2 )26 from these values:  
           AVG   ⁡     (     T   -   1   -   2     )       ⁢   26     =         (     A   +   B   +   C   +   D   +   E   +   F   +   G   +   H     )     26     +       (       A   ′     +     B   ′     +     C   ′     +     D   ′     +     P   ′     +     E   ′     +     F   ′     +     G   ′     +     H   ′       )     26     +       (       A   ′′     +     B   ′′     +     C   ′′     +     D   ′′     +     P   ′′     +     E   ′′     +     F   ′′     +     G   ′′     +     H   ′′       )     26           
 
         [0067]     The results obtained are transmitted to decision means  12 , which also receive as input the static zones ZF(T- 1 ) and ZF(T- 2 ) and produce the signal Avg as output.  
         [0068]     The decision means multiplex the various averages in accordance with the static zone values according to the algorithm given in  FIG. 4 .  
         [0069]     In a step E 1 , a test is run on the value of ZF(T- 1 ).  
         [0070]     If ZF(T- 1 ) is “1”, then the procedure moves on to a step E 3 . In this step E 3 , ZF(T- 2 ) is tested. If ZF(T- 2 ) is “1”, then the procedure goes on to the step E 7  in which Avg is assigned the value AVG(T- 1 - 2 )26, otherwise, if ZF(T- 2 ) is “0”, then the procedure goes on to the step E 6  in which Avg is assigned the value AVG(T- 2 )17.  
         [0071]     If, in the step E 1 , ZF(T- 1 ) is “0”, then the procedure goes on to a step E 2  and ZF(T- 2 ) is tested. If ZF(T- 2 ) is “1”, then the procedure goes on to the step E 5  in which Avg is assigned the value AVG(T- 1 )17. Otherwise, if ZF(T- 2 ) is “0”, then the procedure goes on to the step E 4  in which Avg is assigned the value AVG8.  
         [0072]     With reference to  FIG. 3 , the output of the decision means  12  is transmitted to a comparator  13 . The comparator  13  also receives as input threshold values S 3 , S 4 , S 5  and S 6 .  
         [0073]     Depending on the comparisons between the value of the current point and the thresholds and the average value and the thresholds, a factor α defined in the table below, is deduced from this.  
                                                                         Current point   Selected average               value   value   α                                        &lt;S3   &lt;S3   0.125           &lt;S4 &amp; &gt;S3   &lt;S3   0.25           &lt;S5 &amp; &gt;S4   &lt;S4   0.5           &lt;S6 &amp; &gt;S5   &lt;S5   0.75           Other cases   Other cases   1                      
 
         [0074]     The threshold values are preferably defined as follows:  
         [0075]     S 3 =60  
         [0076]     S 4 =120  
         [0077]     S 5 =180  
         [0078]     S 6 =240  
         [0079]     Means  14  then modify the value of the current point according to α and the selected average value. The new value of P, denoted P new  is then defined as follows: 
 
 P   new   =α×P+ (1−αa)Avg 
 
         [0080]     Thus, when the point P is in motion relative to the two preceding frames T- 1  and T- 2 , that is, it is not considered as being in a static zone relative to the preceding frames ((ZF(T- 1 )=0 and ZF(T- 2 )=0), a spatial smoothing is performed by modifying the value of the current point P and assigning it a new value taking into account the value of the points in its vicinity (AVG 8 ).  
         [0081]     When the current point P is in motion relative to the preceding frame T- 1  only, that is, it is considered as being in motion relative to T- 1 , but not. relative to T- 2 , a space-time smoothing is performed by modifying the value of the current point P and assigning it a new value taking into account the value of the points in its vicinity F(T) and the value of the points in the vicinity F(T- 1 )) of the current point P′ in the preceding frame (AVG(T- 1 )17).  
         [0082]     When the current point P is not in motion relative to the preceding frame T- 1  but relative to T- 2 , the frame preceding the preceding frame, a space-time smoothing is performed by modifying the value of the current point P and assigning it a new value taking into account the value of the points in its vicinity F(T) and the value of the points in the vicinity F(T- 2 )) of the current point P″ in the frame T- 2  AVG(T- 2 ) 17 ).  
         [0083]     When the current point P is not in motion relative to the preceding frame T- 1 , nor relative to T- 2 , the frame preceding the preceding frame, a space-time smoothing is performed by modifying the value of the current point P and assigning it a new value taking into account the value of the points in its vicinity F(T), the value of the points in the vicinity F(T- 1 ) of the current point in the frame T- 1  and the value of the points in the vicinity F(T- 2 ) of the current point in the frame T- 2  (AVG(T- 1 - 2 ) 26 ).  
         [0084]     Next, the smoothing is weighed according to the average values by the factor α. In fact, a psycho-visual characteristic is applied, according to which the smoothing of an object becomes more. difficult to perceive by eye as its luminance is weak. Thus, the severity of the smoothing depends on this average luminance value.  
         [0085]     An interlacing module  15  is used to recover the video frames processed in interlaced form. The duly processed video frame is then transmitted to an encoding device in order to be encoded.