Abstract:
A method for detecting motion in video fields of video data, comprises the steps of: calculating texture information for a pixel in the video fields; determining a threshold value as a function of the calculated texture information; calculating a differential value for the pixel; and detecting motion in the video fields as a function of the determined threshold value and the calculated differential value.

Description:
FIELD OF INVENTION 
       [0001]    This invention generally relates to video processing, and, in particular, to motion detection in video fields for deinterlacing of the video fields for display. 
       BACKGROUND 
       [0002]    Video frames are typically encoded in an interlaced format comprising a first video field (e.g., a top video field) and a second video field (e.g., a bottom video field), each video field having alternating lines of the video frame and each field being temporally separated. Video images are typically encoded and transmitted to a receiver in such an interlaced format as a compromise between bandwidth and video image resolution. Since interlaced video frames are displayed using only half the lines of a full video frame, less system bandwidth is required to process and display these video frames. However, since the human eye typically cannot resolve a single video field, but rather, blends the first field and the second field, the perceived image has the vertical resolution of both fields combined. 
         [0003]    Some types of receivers, including computers, televisions, mobile phones, computing tablets, etc., may require the use of de-interlaced video frames instead of interlaced video frames. For such receivers, the video frames encoded in an interlaced format must be de-interlaced prior to display. Typically, any missing pixels from the video frame are interpolated using the pixels of the first video field and the second video field. 
         [0004]    There are several well-known methods to construct de-interlaced video frames. One such method is commonly referred to as the “bob” method in which a de-interlaced video frame is constructed from a single video field that is vertically interpolated. Whether to rely on a spatial or a temporal interpolation to interpolate an image data is decided by detecting the motion of a subject in the picture. Specifically, spatial interpolation is used to interpolate image data for pixels that are sensing a subject in motion, and temporal interpolation is used to interpolate image data for pixels that are sensing a motionless subject. In this way, by switching interpolation methods according to the state of motion of the subject being sensed by individual pixels, it is possible to faithfully reproduce the sensed subject in each field of the picture being played back. 
         [0005]    Conventionally, such detection of motion is achieved by calculating differences of the image data of identical pixels among even-numbered and odd-numbered fields, and then comparing those differences with a predetermined threshold value. If the differences are greater than the threshold value, the subject being sensed by the pixels in question is recognized to be in motion. 
         [0006]    In this way, by comparing the field-to-field differences of the image data of identical pixels with a constant, predefined threshold value, whether the subject being sensed by the pixels for which image data is going to be interpolated is in motion or not is judged. However, as long as such a threshold level is kept constant, for example, in a case where motion was present up to the field immediately previous to the one currently being reproduced but no motion is present any more in the current field, the motion that had been recognized just up to the previous field leads to an erroneous judgment that the motion is still present in the current field. In addition, the predefined threshold value has no relationship between any of the other pixels in the current video field/frame, which can lead to inaccurate results during interpolation. 
         [0007]    This makes faithful reproduction of the real image impossible, and sometimes causes flickering or the like while a motion picture is being played back. Therefore, it would be desirable to provide new methods and systems for motion detection in video fields that can use an adaptive threshold value, conserve processing power, and increase system bandwidth. 
       SUMMARY OF INVENTION 
       [0008]    An object of this invention is to provide methods and systems for motion detection in video fields that are adaptive to texture information and combing information of the video fields. 
         [0009]    Another object of this invention is to provide methods and systems for motion detection in video fields that minimize the use of memory. 
         [0010]    Yet another object of this invention is to provide methods and systems for motion detection in video fields that can be used for deinterlacing. 
         [0011]    Briefly, the present invention discloses methods and systems for detecting motion in video fields of video data, comprising the steps of: calculating texture information for a pixel in the video fields; determining a threshold value as a function of the calculated texture information; calculating a differential value for the pixel; and detecting motion in the video fields as a function of the determined threshold value and the calculated differential value. 
         [0012]    An advantage of this invention is that methods and systems for motion detection in video fields are provided that are adaptive to texture information and combing information of the video fields. 
         [0013]    Another advantage of this invention is that methods and systems for motion detection in video fields are provided that minimize the use of memory. 
         [0014]    Yet another advantage of this invention is that methods and systems for motion detection in video fields that can be used for deinterlacing. 
     
    
     
       DESCRIPTION OF THE DRAWINGS 
         [0015]    The foregoing and other objects, aspects, and advantages of the invention can be better understood from the following detailed description of the preferred embodiment of the invention when taken in conjunction with the accompanying drawings. 
           [0016]      FIG. 1  illustrates a flow chart of the present invention for motion detection in video fields. 
           [0017]      FIG. 2  illustrates a video field at a predefined time. 
           [0018]      FIG. 3  illustrates various video fields. 
           [0019]      FIG. 4  illustrates a block diagram of the present invention for motion detection in video fields. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0020]    In the following detailed description of the embodiments, reference is made to the accompanying drawings, which form a part hereof, and in which is shown by way of illustration of specific embodiments in which the present invention may be practiced. 
         [0021]      FIG. 1  illustrates a flow chart of the present invention for motion detection in video fields. In a video stream, multiple video fields can be decoded for display. Motion detection can be used to improve performance in decoding of the video fields. 
         [0022]    Texture information can be calculated  10  for a pixel in the video fields to detect motion for the pixel. For instance, texture information can include a vertical infield texture value txt 1  and a horizontal intra-field texture value txt 3 . The vertical infield texture value txt 1  can be calculated for a pixel having a position (x,y) in a current video field at time t by applying a low pass filter (“lpf”) to an absolute difference in luma values f(a,b,c) of neighboring vertical pixels (i.e., pixels at (x, y− 1 ) and (x, y+ 1 ) in a previous field (i.e., time=t- 1 ). The following equation can be used to calculate txt 1 : 
         [0000]        txt 1( y,x,t −1)= lpf*|f ( y −1 ,x,t −1)− f ( y +1 ,x,t −1)|  Equation [1]
 
         [0023]    The horizontal intra-field texture value txt 3  can be calculated for the pixel having position (x,y) in the current video field at the time t by applying a min, max, or average function G(d,e,f) on the difference of textures in different video fields. Each texture txt is based on a single video field, where the video fields can be of the same polarity. Same polarity can mean that the two video fields are both in top fields or both in bottom fields. The texture txt 3  can be calculated using the following equation: 
         [0000]        txt 3( y,x,t −1)= G ( txt ( y,x,t ),  txt ( y,x,t −2)|)   Equation [2]
 
         [0000]      where  txt ( a,b,c )= lpf*G (| f ( a −2 ,b,c )− f ( a,b,c )|, | f ( a+ 2 ,b,c )− f ( a,b,c )|).
 
         [0024]    An adaptive threshold thd can be calculated for motion detection  21  as a function of the calculated texture information. For instance, the adaptive threshold can equal: 
         [0000]        thd=α*txt 1+ β*txt 3   Equation [3]
 
         [0000]    where α and β are predefined constants. The predefined constants α and β can be determined based upon empirical and/or statistical analysis. For instance, α can be set to 0.3 and β can be set to 0.5 for luma components. 
         [0025]    In addition, differential values for the pixel can be calculated  14  for the pixel in the various video fields. The differential value for the pixel is calculated based on the difference of the luma values f(a,b,c) for that pixel position in two or more video fields. Alternatively, chroma values for the pixel position can be used, as well as other video characteristics for the pixel position. Typically, the difference in luma values can be based on the luma value in the current field (e.g., time=t) and the luma value in the previous field that has the same polarity as the current field (e.g., two fields away, time=t- 2 ). This differential value can be referred to as Dif 02  for the pixel, which can equal: 
         [0000]        Dif   02 ( y,x,t,t −1)= f ( y,x,t )− f ( y,x,t −2)   Equation [4]
 
         [0026]    Additionally other differential values can be calculated depending on the number of video fields used to detect motion for a particular pixel of the current video field. In the current example, there are a total of three video fields, including the current video field, the previous field, and the previous, previous video field. Thus, the other differentials can equal: 
         [0000]        Dif   01 ( y,x,t,t −1)= f ( y,x,t )− f ( y,x,t −1)   Equation [5]
 
         [0000]        Dif   21 ( y,x,t −2 ,t −1)= f ( y,x,t −2)− f   i ( y,x,t −1)   Equation [6]
 
         [0000]    where f i (a,b,c) is an interpolated value for the pixel at the given time. The other differentials Dif 01  and Dif 21  can also be used for determining an adaptive combing value (not shown in the flow chart, but illustrated in  FIG. 4 ). 
         [0027]    Motion detection can be determined for the pixel in the video fields  16  as a function of the determined threshold  12  and the calculated differential values  14 . For instance, the differential value Dif 02  and the adaptive threshold are compared to determine whether motion is detected for the respective pixel. If the differential value Dif 02  is greater than the adaptive threshold, then motion is detected for the pixel; else, motion is not detected for the pixel. 
         [0028]      FIG. 2  illustrates a video field at a predefined time. A video field  20  of a video stream can comprise pixels in an array format of rows and columns. The video field  20  can comprise a pixel location  22  at row y and column x. The methods and systems of the present invention can be used to generate a one bit motion flag for each pixel in the video field  20 , and in particular for the pixel location  22 . 
         [0029]      FIG. 3  illustrates various video fields at various times. The video field  20  of the video stream can be at time t. A video field  30  of the video stream can be at time t- 1 , and be the previous field from the video field  20 . A video field  34  can be at time t- 2  and be two previous fields from the video field  20 . The pixel location  22  can be at row y and column x in video field  20 . A pixel location  32  can be at row y and column x in video field  30 . The pixel location  36  can be at row y and column x in video field  34 . The methods and systems of the present invention can use multiple video fields to generate one bit motion values for each pixel in the video fields for decoding of the video fields. 
         [0030]      FIG. 4  illustrates a block diagram of the present invention for motion detection in video fields. A motion detector of the present invention comprises a differential calculator  40 , a textual information calculator  42 , an adaptive combing block  44 , an adaptive threshold calculator  46 , a motion comparison block  48 , a field motion calculator  50 , a sure motion calculator  52 , a motion field delay block  54 , and an alpha calculator  56 . 
         [0031]    The luma functions for a current field f(t), a first previous field f(t- 1 ), and a second previous field f(t- 2 ) are inputted to the differential calculator  40 . The differential calculator calculates various differential values for a pixel position in the various fields, including the differential values Dif 02 , Dif 01 , and Dif 21 . The differential values Dif 01  and Dif 21  are inputted to the adaptive combing block  44  for determining an adaptive combing value cmb. The adaptive combing value can be equal to the following: 
         [0000]        cmb=G (Dif( x,y,t t −1), Dif( x,y,t,t −2))   Equation (7)
 
         [0032]    The differential value Dif 02  is inputted to the motion comparison block  48  and the field motion calculator  50 . 
         [0033]    The luma functions for the current field f(t), the first previous field f(t- 1 ), and the second previous field f(t- 2 ) are also inputted to the textual information calculator  42 . The textual information calculator  42  determines textual information for the video fields, including txt 1  and txt 3 . The determined textural information is inputted to the adaptive threshold calculator  46  and the field motion calculator  50 . 
         [0034]    The adaptive threshold calculator  46  receives the textual information and the combing value cmb, and calculates an adaptive threshold. The adaptive threshold can be updated as needed or required. For instance, the threshold result of Equation [3] can be compared with a scaled combing value. The larger of two values can be selected as a new adaptive threshold value. 
         [0035]    The adaptive threshold is outputted to the motion comparison block  48 . The motion comparison block  48  compares the differential value Dif 02  and the adaptive threshold to detect motion for the respective pixel. The motion comparison block  48  can output a one-bit motion value (e.g., the motion value can be as follows mot(x,y,t)) to indicate whether a motion has been detected for the respective pixel. For instance, a 0 motion value can indicate that there is no motion detected for the pixel, and a 1 motion value can indicate that motion is detected for the pixel. Thus, the motion value is equal to zero when the Dif 02  is greater than the adaptive threshold; and the motion value is equal to one for any other cases. Next, the motion value can be stored by the motion field delay  54 , and inputted to the sure motion calculator  52 . 
         [0036]    The motion field delay  54  can store a motion value for each of the pixels of the current field and other fields. A motion history (“hist”) can be stored as the following equation: 
         [0000]      hist( y,x,t )= L (hist, mot),   Equation [8]
 
         [0000]    where hist is an iterative function for indicating the motion/static history of a video field. For instance, assume hist(y,x,t- 2 )=[mot(y,x,t- 8 ),mot(y,x,t- 6 ),mot(y,x,t- 4 ),mot(y,x,t- 2 )], then hist(y,x,t) can comprise 4-bits for each pixel since hist(y,x,t)=L(hist(y,x,t- 2 ), mot(y,x,t)), where L is a function operator for the various motion values. 
         [0037]    The motion values and hist can be read, and then used by the sure motion calculator  52  to confirm that motion is being detected for the current field (i.e., mot(y,x,t)) and/or other fields (e.g., from the motion field delay  54 , including hist(y,x,t- 2 ), hist(y− 1 ,x,t- 1 ) and hist(y+ 1 ,x,t- 1 )). If motion is confirmed, then the sure motion calculator  52  can send a sure motion flag to the alpha calculator  56 . If motion is not confirmed, then the sure motion calculator  52  can send a still motion flag to the alpha calculator  56 . 
         [0038]    The field motion calculator  50  can receive the differential value Dif 02 , the adaptive combing cmb and the textual information for generating a field motion value for use by the alpha calculator  56 . The field motion calculator  50  calculates a quantified field motion (“fMt 0 ”) between the current video field (time=t) and the previous, previous video field (time=t- 2 ), which can equal: 
         [0000]        fMt 0 =|Dif ( y,x,t,t −2)|− H ( I ( txt 1 , txt 3),  cmb ),   Equation [9]
 
         [0000]    where H(k ,l)=a 1 *k+a 2 *l+a 3  and I(m,n)=b 1 *m+b 2 *n+b 3 . The values a 1 , a 2 , a 3 , b 1 , b 2 , and b 3  can be predefined and can be implemented by programmable registers. 
         [0039]    The field motion calculator  50  also calculates a quantified field motion (“fMt 1 ”) between the previous, previous video field (time=t- 2 ) and the previous video field (time=t- 1 ), which can equal: 
         [0000]        fMt 1 =|dif ( y,x,t −1 ,t −2)| K ( I ( txt 1 , txt 3),  cmb ),   Equation [10]
 
         [0000]      where  K ( k,l )= a 1 *k+a 2 *l+a 3. 
         [0040]    The alpha calculator  56  uses the field motion calculator and the motion flags to determine an alpha for use by a blender during the decoding of the respective fields. Alpha can equal the following: 
         [0000]      alpha= M ( fMt 0, mot, pSM, pSS),   Equation[11]
 
         [0000]    where pSM is the sure motion flag, pSS is the sure still flag, and M(a,b,c,d) function is as follows: 
         [0041]    if pSM(y,x,t- 1 ) is true, then there is motion and alpha=a maximum value (e.g. 15 for 4-bit value); 
         [0042]    if pSS(y,x,t- 1 ) is true, there there is no motion and is static, thus alpha=a minimum value (e.g. 0); and 
         [0043]    otherwise, alpha is scaled as a function of the fMt 0  and mot. 
         [0044]    While the present invention has been described with reference to certain preferred embodiments or methods, it is to be understood that the present invention is not limited to such specific embodiments or methods. Rather, it is the inventor&#39;s contention that the invention be understood and construed in its broadest meaning as reflected by the following claims. Thus, these claims are to be understood as incorporating not only the preferred apparatuses, methods, and systems described herein, but all those other and further alterations and modifications as would be apparent to those of ordinary skilled in the art.