Abstract:
A method and a system are used for determining color value of a pixel for an image processing operation, including steps of: providing a reference depth value representing a level of motion of the pixel; providing a plurality of color values and corresponding depth values of the pixel at a plurality of levels of motion; and selecting a target color value of the pixel among the plurality of color values according to the reference depth value and the plurality of depth values.

Description:
FIELD OF THE INVENTION 
     The present invention relates to a system and a method for determining color value of pixels, and more particularly to a system and a method for determining color value of pixels for image processing. 
     BACKGROUND OF THE INVENTION 
     Interlacing and non-interlacing (or progressive) image scanning and displaying techniques are widely applied to a variety of systems. Thus, when an image is transmitted between systems or for display, conversion between interlacing and non-interlacing formats is often required. 
     Please refer to  FIG. 1  which schematically illustrates a de-interlacing processing. An odd field  11  and an even field  12  to be de-interlaced are shown, each including a half of scan lines of a scanned image. After a de-interlacing operation  13 , a non-interlaced frame  14  is obtained, which includes all scan lines, as shown in  FIG. 1 . The odd field  11  comprises first scan line  111 , third scan line  113 , fifth scan line  115 , and so on. The even field  12  comprises second scan line  122 , fourth scan line  124 , sixth scan line  126 , and so on. After the de-interlacing operation  13 , a non-interlacing frame  14  is obtained, including all scan lines  141 ,  142 ,  143 ,  144 ,  145 ,  146 , . . . of the scanned image corresponding to the interlaced lines  111 ,  122 ,  113 ,  124 ,  115 ,  126 , . . . respectively. 
     The de-interlacing operation  13  is implemented with interpolation. That is, data of the missing lines in the odd field  11  or even field  12  are estimated by way of interpolation. Two kinds of interpolating algorithms may be applied to the de-interlacing operation. One is spatial interpolation, and the other is temporal interpolation. The spatial interpolation calculates the missing even lines or odd lines by interpolating corresponding adjacent lines in the odd field  11  or the even field  12  respectively. For example, the even scan line  144  of the non-interlacing frame  14  can be obtained by interpolating the scan lines  113  and  115  in the odd field  11 . Similarly, the entire non-interlacing frame  14  can be obtained by interpolating every pair of adjacent lines in the odd field  11 . On the other hand, the temporal interpolation method fills the missing lines with corresponding lines in the preceding field. For example, the odd scan line  113  in the odd field  11  can be used to fill the missing odd scan line between the even scan lines  122  and  124  of the even field  12 . Accordingly, the entire non-interlacing frame  14  is obtained with the even scan lines  122 ,  124 ,  126 , . . . in the even field  12  serving as the even scan lines  142 ,  144 ,  146 , . . . and the odd scan lines  111 ,  113 ,  115 , . . . obtained at the preceding time point serving as the odd scan lines  141 ,  143  and  145 , . . . . 
     By taking advantage of both the interpolation methods, a motion adaptive de-interlacing algorithm is developed. A level of motion is determined by performing motion-detection in each field. Then a proper de-interlacing algorithm and its corresponding ratio are chosen according to the obtained levels of motion. An exemplary motion adaptive de-interlacing system used in a computer system is shown in  FIG. 2 . The motion adaptive de-interlacing system comprises a motion-detection module  21  for performing two-level motion-detection according to a current field F(n), preceding field F(n−1) and next field F(n+1). The motion-detection module  21  also generates a control signal to control a multiplexer  22  to select one of the outputs from a spatial interpolation module  23  and a temporal interpolation module  24 , then the selected output is integrated with the current field F(n) as a non-interlacing frame  25 . 
     Generally speaking, for motion images, spatial interpolation will produce better quality than temporal interpolation. This is because the spatial interpolation module  23  does not consider the preceding field F(n−1). On the contrary, temporal interpolation will have better performance than spatial interpolation for still images. Consequently, the spatial interpolation module  23  and the temporal interpolation module  24  selectively function depending on the practical use. 
     To perform the motion-detection, a conventional computer system requires additional motion-detection module  21  in order to detect the level of motion of the current field F(n). Complexity of the motion-detection-module  21  may grow large as the levels of motion to be detected increases. It is apparently disadvantageous in hardware cost of the computer system. 
     SUMMARY OF THE INVENTION 
     Therefore, the present invention provides a device and a method for determining color data of pixels, thereby performing de-interlacing without additional hardware. 
     The present invention provides a method for determining color value of a pixel for an image processing operation, comprising steps of: providing a reference depth value representing a level of motion of the pixel; providing a plurality of color values and corresponding depth values of the pixel at a plurality of levels of motion; and selecting a target color value of the pixel among the plurality of color values according to the reference depth value and the plurality of depth values. 
     The present invention also relates to a system for determining color value of a pixel for an image processing operation, comprising: a depth-value buffer for storing a reference depth value representing a level of motion of the pixel; and a rendering engine coupled to the depth-value buffer for receiving a plurality of color values and corresponding depth values of the pixel at a plurality of levels of motion respectively, and selecting of one of the plurality of color values as a target color value of the pixel according to the reference depth value and the plurality of depth values. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The above contents of the present invention will become more readily apparent to those ordinarily skilled in the art after reviewing the following detailed description and accompanying drawings, in which: 
         FIG. 1  is a scheme showing an de-interlacing operation; 
         FIG. 2  is a schematic functional block diagram illustrating conventional de-interlacing system; 
         FIG. 3  is a schematic block diagram of a computer system, capable of performing a method for determining color value of pixels for image processing according to the present invention; 
         FIG. 4  is a schematic functional block diagram illustrating a system for determining color value of pixels, which is capable of performing a de-interlacing operation, according to an embodiment of the present invention; 
         FIGS. 5A˜5C  are scheme showing absolute-value operations adapted in the first operation unit of  FIG. 4 ; 
         FIG. 6A  is a flowchart illustrating a method for determining color value of pixels according to an embodiment of the present invention; 
         FIGS. 6B and 6C  are a flowchart exemplifying the method of  FIG. 6A ; and 
         FIG. 7  is a flowchart illustrating a method for determining color value of pixels according to another embodiment of the present invention. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The present invention will now be described more specifically with reference to the following embodiments. It is to be noted that the following descriptions of preferred embodiments of this invention are presented herein for purpose of illustration and description only; it is not intended to be exhaustive or to be limited to the precise form disclosed. 
     For performing de-interlacing without additional motion-detection module while still taking advantage of both spatial and temporal interpolations, the present invention utilizes hardware and/or software already existing in the computer system to achieve the objects. 
       FIG. 4  illustrates a block diagram of a de-interlacing operation in a computer system according to an embodiment of the present invention. The computer system sequentially receives a plurality of interlacing field data from, for example, a TV signal source, a hard disk drive or a DVD. The fields received may comprises a current field F(n), a preceding field F(n−1) and a next field F(n+1). The purpose of the de-interlacing operation is to calculate the missing field F′(n) corresponding to the current field F(n) for a non-interlaced frame NIF(n). 
     The de-interlacing operation utilizes a first operation unit  41 , a second operation unit  42 , a depth-value Z buffer  43  and a rendering engine  44 . Pixels f(n−1) in preceding field F(n−1) and pixels f(n+1) in next field F(n+1) are inputted to the first operation unit  41  to determine the corresponding levels of motion for each pixel in the missing field F′(n). Various algorithms have been developed for determining levels of motion, and thus are not redundantly described herein. These algorithms or any other proper algorithm can be used in the first operation unit  41 . 
     In this embodiment, the operation executed in the first operation unit  41  is an absolute-value operation. The absolute-value operation, for example, can be executed by a texture operation instruction set defined in Microsoft DirectX®. For example,  FIG. 5A  illustrates a texture operation instruction set defined in Microsoft DirectX® 7.0, in which six textures (Texture 0˜5) are used for the absolute-value operation. Alternatively,  FIG. 5B  and  FIG. 5C  illustrate texture operation instruction sets defined in Microsoft DirectX® 8.0 and Microsoft DirectX® 9.0, respectively, in which pixel shader instruction sets are used to calculate the absolute value of f(n−1) and f(n+1). It should be understood that the first operation unit  41  may utilize other algorithms or hardwares to determine the levels of motion for pixels in the missing field F′(n) as long as pixels f(n−1) in preceding field F(n−1) and pixels f(n+1) in next field F(n+1) are used therein. 
     In brief, the first operation unit  41  calculates the absolute value of color data between pixels at the same position in the preceding field F(n−1) and the next field F(n+1). The function of the first operation unit  41 , for example, can be executed by a three-dimensional (3D) engine conventionally used or specifically designed in a computer system. Please refer to  FIG. 3 . A computer system includes a central processing unit (CPU)  31 , a north bridge chip  32 , a south bridge chip  33 , a system memory  34 , a display module chip  30  and a display  39 . The 3D engine  301  is disposed in the display module chip  30  that may stand alone or be incorporated into the north bridge chip  32 . 
     The operations of the 3D engine  301  for implementing the function of the first operation unit  41  for processing the field F(n) include the following:
     a) setting pixels in the preceding field F(n−1) and the next field F(n+1) to be textures;   b) performing a texture operation on respective pixels in the preceding field F(n−1) and the next field F(n+1) to obtain absolute values of pixels at the same positions in the preceding field F(n−1) and the next field F (n+1);   c) rendering a rectangle plane consisting of two triangles and writing the absolute values into corresponding pixel positions in the rectangle plane to form a reference rectangle A, the absolute values recorded in the reference rectangle A represent levels of motion of the pixels; and   d) storing the data of the reference rectangle A as depth values in the depth-value buffer (Z buffer)  43 .   

     Following above steps, the second operation unit  42  performs a plurality of texture operations on pixels in the preceding field F(n−1) and the current field F(n) to obtain a plurality of rectangle textures  451 - 45 M corresponding to various levels of motion L 1  to LM of the missing field F′(n). Each of the rectangle textures has a size identical to that of the reference rectangle A. The M rectangle textures also correspond to M depth values, i.e. Z 1 ˜ZM. Assume that the rectangle texture  45 M represents the highest level of motion LM, and the rectangle texture  451  represents the lowest level of motion L 1 , the other rectangle textures each represents a gradually increased level of motion from L 1  to LM, i.e. the rectangle textures  451  to  45 M. The higher the level of motion is, the change between two consecutive frames is faster and more drastic. For rectangle texture at the highest level of motion, e.g. LM of the present embodiment, the missing pixels are calculated by interpolating adjacent pixels in the current field F(n) due to the rapid change of frames. The rectangle texture  45 M is thus generated, in which the color value f′(n) of the missing field F′(n) is designated according to the value of the current field f(n). On the other hand, changes between frames at the lowest level of motion are relatively small, e.g. L 1  of the present embodiment, and therefore pixels of the preceding field F(n−1) can be used as the missing pixels to form the rectangle texture  451  with the color value designated to f(n−1) 
     In brief, the second operation unit  42  performs a texture operation based on the current field F(n) only at the highest level of motion and the preceding field F(n−1) only at the lowest level of motion. For performing texture operation on rectangle textures in between the highest and the lowest levels of motion, the second operation module  42  applies different ratios to the combination of F(n) and F(n−1). In an embodiment, various linear combinations can be used as the ratios below: 
                       Color   ⁢           ⁢   data   ⁢           ⁢   of   ⁢           ⁢   missing   ⁢           ⁢   pixels   ⁢           ⁢   at   ⁢           ⁢   the   ⁢           ⁢   lowest   ⁢           ⁢   level   ⁢           ⁢   of   ⁢           ⁢   motion   ⁢           ⁢   L   ⁢           ⁢   1   ⁢     (     Z   =     Z   ⁢           ⁢   1       )       =     f   ⁡     (     n   -   1     )         ;     ⁢     
     ⁢   Color   ⁢           ⁢   data   ⁢           ⁢   of   ⁢           ⁢   missing   ⁢           ⁢   pixels   ⁢           ⁢   at   ⁢           ⁢   the   ⁢           ⁢   level   ⁢           ⁢   of   ⁢           ⁢   motion   ⁢           ⁢     La   ⁡     (     Z   =   Za     )         =         (       (     a   -   1     )     /     (     M   -   1     )       )     ×     f   ⁡     (   n   )         +       (       (     M   -   1     )     -       (     a   -   1     )     /     (     M   -   1     )         )     ×     f   ⁡     (     n   -   1     )             ;   and                   Color   ⁢           ⁢   data   ⁢           ⁢   of   ⁢           ⁢   missing   ⁢           ⁢   pixels   ⁢           ⁢   at   ⁢           ⁢   the   ⁢           ⁢   highest   ⁢           ⁢   level   ⁢           ⁢   of   ⁢           ⁢   motion   ⁢           ⁢   L   ⁢           ⁢     M   ⁡     (     Z   =     Z   ⁢           ⁢   M       )         =     f   ⁡     (   n   )         ,         
where 1&lt;a&lt;M and Z 1 &lt;Za&lt;ZM, color data f(n−1) indicates color data in the preceding field F(n−1), color data f(n) indicates color data in the current field F(n).
 
     For example, assuming M=4, 
     
       
         
           
             
               
                 Color 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 data 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 missing 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 pixels 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 at 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 the 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 lowest 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 level 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 motion 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 L 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 1 
                 ⁢ 
                 
                   ( 
                   
                     Z 
                     = 
                     
                       Z 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       1 
                     
                   
                   ) 
                 
               
               = 
               
                 f 
                 ⁡ 
                 
                   ( 
                   
                     n 
                     - 
                     1 
                   
                   ) 
                 
               
             
             ; 
           
         
       
       
         
           
             
               
                 
                   
                     
                       Color 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       data 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       of 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       missing 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       pixels 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       at 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       the 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       level 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       of 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       motion 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       L 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       2 
                       ⁢ 
                       
                         ( 
                         
                           Z 
                           = 
                           
                             Z 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             2 
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         
                           ( 
                           
                             1 
                             / 
                             3 
                           
                           ) 
                         
                         × 
                         
                           f 
                           ⁡ 
                           
                             ( 
                             n 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           ( 
                           
                             2 
                             / 
                             3 
                           
                           ) 
                         
                         × 
                         
                           f 
                           ⁡ 
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                         
                       
                     
                   
                   ; 
                 
                 ⁢ 
                 
                   
 
                 
                 ⁢ 
                 Color 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 data 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 missing 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 pixels 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 at 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 the 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 level 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 motion 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 L 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 3 
                 ⁢ 
                 
                   ( 
                   
                     Z 
                     = 
                     
                       Z 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       3 
                     
                   
                   ) 
                 
               
               = 
               
                 
                   
                     ( 
                     
                       2 
                       / 
                       3 
                     
                     ) 
                   
                   × 
                   
                     f 
                     ⁡ 
                     
                       ( 
                       n 
                       ) 
                     
                   
                 
                 + 
                 
                   
                     ( 
                     
                       1 
                       / 
                       3 
                     
                     ) 
                   
                   × 
                   
                     f 
                     ⁡ 
                     
                       ( 
                       
                         n 
                         - 
                         1 
                       
                       ) 
                     
                   
                 
               
             
             ; 
             and 
           
         
       
       
         
           
             
               
                 Color 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 data 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 missing 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 pixels 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 at 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 the 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 highest 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 level 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 motion 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 L 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 4 
                 ⁢ 
                 
                   ( 
                   
                     Z 
                     = 
                     
                       Z 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       4 
                     
                   
                   ) 
                 
               
               = 
               
                 f 
                 ⁡ 
                 
                   ( 
                   n 
                   ) 
                 
               
             
             ; 
           
         
       
         
         
           
             where Z represents the depth value of the rectangle, and Z 1 &lt;Z 2 &lt;Z 3 &lt;Z 4 . 
           
         
       
    
     After the reference rectangle A and the rectangle textures  451 ˜ 45 M are obtained, a method for dynamically adjusting color data of pixels is executed, thereby accomplishing the de-interlacing operation. An embodiment of the method will be described hereinafter with reference to the flowchart of  FIG. 6A  and  FIG. 4 . 
     With the provision of the reference rectangle A generated by the first operation unit  41  and stored in the Z buffer  43  and the rectangle textures  451 ˜ 45 M generated by the second operation unit  42  (Step S 61 ), the rendering engine  44  performs a multiple rendering procedure according to the reference rectangle A and rectangle textures  451 ˜ 45 M as follows to obtain a target rectangle B with the same size as the reference rectangle A. In Step S 62 , the depth value Zx of a pixel P 1  in the rectangle texture  45   x  (M≧x≧1) is compared with a corresponding depth value ZP 1  stored in the Z buffer  43 . Then the following step determines whether the depth value Zx is smaller than the corresponding depth value ZP 1  in the Z buffer  43 . (Step S 63 ). If Zx&lt;ZP 1 , render the color data of the pixel P 1  onto the target rectangle B at the same pixel position (Step S 64 ). Otherwise, discard this color data from rendering onto the target rectangle B (Step S 65 ). Later determine whether every pixel of the rectangle texture  45   x  at the level of motion Lx has completed the comparison in Step S 66 . If yes, enter Step S 67  to determine whether x is equal to M. If x is not equal to M, increment x by 1 and return to Step S 62 ; if x is equal to M, which means all levels of motion have been processed, the rendering process ends and the missing pixels f(n′) of an non-interlaced frame F(n′) with respect to the current field F(n) are obtained. 
     The flowchart of  FIGS. 6B˜6C  exemplifies the method for dynamically adjusting color data of pixels of  FIG. 6A  with M=4. First of all, a depth buffer having depth values of a reference rectangle and four rectangle textures corresponding to levels of motion L 1 , L 2 , L 3  and L 4  are provided (Step S 701 ). The depth value Z 1  of a pixel P 1  in the rectangle texture corresponding to level L 1  is compared with a corresponding depth value ZP 1  stored in the Z buffer  43  (Step S 702 ). If Z 1 &lt;ZP 1  (Step S 703 ), render the color data f(n−1) onto the target rectangle B at the same pixel position (Step S 704 ). Otherwise, discard this color data from rendering onto the rectangle object B (Step S 705 ). Then check if all the pixels of the rectangle texture at the level L 1  have been processed with the comparing and discriminating procedures (Step S 706 ). If not yet, continue the comparing and discriminating procedures to another pixel P 2  in the same rectangle texture, and so on. It should be noted that the depth value in the depth buffer will not be changed during the rendering process and remain the same. As a result, the color data f(n) of a depth value that is smaller than the corresponding depth value in the Z buffer will be rendered on the surface of the rectangle target B. That is, only when the level of motion of a particular pixel determined by the second operation unit  42  is smaller than that determined by the first operation unit  41  will the color data f(n−1) of the particular pixel be rendered on the surface of the target rectangle B. 
     If the rectangle texture at level L 1  have been completely processed, proceed to the rectangle texture at the next level L 2  to compare the depth value Z 2  of the pixel P 1  in the rectangle texture at level L 2  with the depth value ZP 1  of the pixel P 1  stored in the Z buffer  43  (Step S 707 ). If Z 2 &lt;ZP 1  (Step S 708 ), render the color data [(⅓)xf(n)+(⅔)xf(n−1)] onto the target rectangle B (Step S 709 ) so that the new color data will replace the previously rendered color data. Otherwise, discard this color data from rendering onto the target rectangle B (Step S 710 ). Steps S 708 ˜S 710  are repeated for other pixels of the rectangle texture at level L 2  until all the pixels have been processed (Step S 711 ). 
     Then proceed to next rectangle texture corresponding to level L 3  to compare the depth value Z 3  of the pixel P 1  in the rectangle texture corresponding to level L 3  with the depth value ZP 1  of the pixel P 1  stored in the Z buffer  43  (Step S 712 ). If Z 3 &lt;ZP 1  (Step S 713 ), render the color data [(⅔)×f(n)+(⅓)×f(n−1)] onto the target rectangle B (Step S 714 ) so that the color data [(⅔)×f(n)+(⅓)×f(n−1)] will replace the previously rendered color data. Otherwise, discard this color data from rendering onto the target rectangle B (Step S 715 ). Steps S 713 ˜S 715  are repeated for other pixels of the rectangle texture corresponding to the level L 3  until all the pixels have been processed (Step S 716 ). 
     Afterwards, proceed to next rectangle texture corresponding to level L 4  to compare the depth value Z 4  of the pixel P 1  in the rectangle texture corresponding to the level L 4  with the depth value ZP 1  of the pixel P 1  stored in the Z buffer  43  (Step S 717 ). If Z 4 &lt;ZP 1  (Step S 718 ), render the color data f(n) onto the target rectangle B (Step S 719 ) so that the color data f(n) will replace the previously rendered color data. Otherwise, discard this color data from rendering onto the rectangle object B (Step S 720 ). Steps S 718 ˜S 720  are repeated for other pixels of the rectangle texture corresponding to the level L 4  until all the pixels have been processed (Step S 721 ). Then the rendering operation ends. 
     In the above mentioned procedures, the depth values stored in the Z buffer remain unchanged while the depth values rendered onto the target rectangle B could be updated with the increasing levels of motion. Therefore, for each pixel, color data of a rectangle texture corresponding to a level of motion smaller than but closest to the one recorded in the Z buffer is used as the color data of the pixel and rendered onto the target rectangle B. In this way, the missing pixels f(n′) of the non-interlaced field corresponding to the current field F(n) can be found. Then the current field F(n) and the missing field F(n′) are combined to form the final non-interlaced frame NIF(n). 
     In another embodiment, the first operating unit may perform a normalization operation on the absolute values so as to scale down the resulting depth values to particular ranges. For example, the above-mentioned depth values Z 1 , Z 2 , Z 3  and Z 4  can be limited to 0, 1, 2 and 3 with respect to each level of motion as the scale of the overall depth value is defined as 4. 
     A further embodiment of a method for determining color data of pixels for de-interlacing according to the present invention is illustrated in the flowchart of  FIG. 7 . The method of  FIG. 7  is similar to the method of  FIG. 6A  except that the higher level of motion is defined with a smaller depth value. That is, in the comparing procedure, the depth value Z(M−x+1) of a pixel P 1  in the rectangle texture  45   x  (M≧x≧1) is compared with a depth value ZP 1  stored in the Z buffer  43  (Step  82 ), and the color data of the pixel P 1  is rendered onto the target rectangle B only when Z(M−x+1)&gt;ZP 1  (Step S 83 ), while discarding this color data from rendering onto the target rectangle B if Z(M−x+1)≦ZP 1  (Step  84 ). For M levels of motion, 
                 Color   ⁢           ⁢   data   ⁢           ⁢   of   ⁢           ⁢   missing   ⁢           ⁢   pixels   ⁢           ⁢   at   ⁢           ⁢   the   ⁢           ⁢   lowest   ⁢           ⁢   level   ⁢           ⁢   of   ⁢           ⁢   motion   ⁢           ⁢   L   ⁢           ⁢   1   ⁢     (     Z   =     Z   ⁢           ⁢   M       )       =     f   ⁡     (     n   -   1     )         ;                   Color   ⁢           ⁢   data   ⁢           ⁢   of   ⁢           ⁢   missing   ⁢           ⁢   pixels   ⁢           ⁢   at   ⁢           ⁢   level   ⁢           ⁢   of   ⁢           ⁢   motion   ⁢           ⁢     La   ⁡     (     Z   =     Z   ⁢           ⁢   a       )         =         (       (     a   -   1     )     /     (     M   -   1     )       )     ×     f   ⁡     (   n   )         +       (       (     M   -   1     )     -       (     a   -   1     )     /     (     M   -   1     )         )     ×     f   ⁡     (     n   -   1     )             ;   and                   Color   ⁢           ⁢   data   ⁢           ⁢   of   ⁢           ⁢   missing   ⁢           ⁢   pixels   ⁢           ⁢   at   ⁢           ⁢   the   ⁢           ⁢   highest   ⁢           ⁢   level   ⁢           ⁢   of   ⁢           ⁢   motion   ⁢           ⁢   L   ⁢           ⁢     M   ⁡     (     Z   =     Z   ⁢           ⁢   1       )         =     f   ⁡     (   n   )         ,         
where 1&lt;a&lt;M and Z 1 &lt;Za&lt;ZM, and where color data f(n−1) indicates color data in the preceding field F(n−1), and color data f(n) indicates color data in the current field F(n).
 
     For example, assuming M=4, then 
     
       
         
           
             
               
                 Color 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 data 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 missing 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 pixels 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 at 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 the 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 lowest 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 level 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 motion 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 L 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 1 
                 ⁢ 
                 
                   ( 
                   
                     Z 
                     = 
                     
                       Z 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       1 
                     
                   
                   ) 
                 
               
               = 
               
                 f 
                 ⁡ 
                 
                   ( 
                   
                     n 
                     - 
                     1 
                   
                   ) 
                 
               
             
             ; 
           
         
       
       
         
           
             
               
                 
                   
                     
                       Color 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       data 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       of 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       missing 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       pixels 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       at 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       the 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       level 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       of 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       motion 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       L 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       2 
                       ⁢ 
                       
                         ( 
                         
                           Z 
                           = 
                           
                             Z 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             2 
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         
                           ( 
                           
                             1 
                             / 
                             3 
                           
                           ) 
                         
                         × 
                         
                           f 
                           ⁡ 
                           
                             ( 
                             n 
                             ) 
                           
                         
                       
                       + 
                       
                         
                           ( 
                           
                             2 
                             / 
                             3 
                           
                           ) 
                         
                         × 
                         
                           f 
                           ⁡ 
                           
                             ( 
                             
                               n 
                               - 
                               1 
                             
                             ) 
                           
                         
                       
                     
                   
                   ; 
                 
                 ⁢ 
                 
                   
 
                 
                 ⁢ 
                 Color 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 data 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 missing 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 pixels 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 at 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 the 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 level 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 of 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 motion 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 L 
                 ⁢ 
                 
                     
                 
                 ⁢ 
                 3 
                 ⁢ 
                 
                   ( 
                   
                     Z 
                     = 
                     
                       Z 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       3 
                     
                   
                   ) 
                 
               
               = 
               
                 
                   
                     ( 
                     
                       2 
                       / 
                       3 
                     
                     ) 
                   
                   × 
                   
                     f 
                     ⁡ 
                     
                       ( 
                       n 
                       ) 
                     
                   
                 
                 + 
                 
                   
                     ( 
                     
                       1 
                       / 
                       3 
                     
                     ) 
                   
                   × 
                   
                     f 
                     ⁡ 
                     
                       ( 
                       
                         n 
                         - 
                         1 
                       
                       ) 
                     
                   
                 
               
             
             ; 
             and 
           
         
       
       
         
           
             
               Color 
               ⁢ 
               
                   
               
               ⁢ 
               data 
               ⁢ 
               
                   
               
               ⁢ 
               of 
               ⁢ 
               
                   
               
               ⁢ 
               missing 
               ⁢ 
               
                   
               
               ⁢ 
               pixels 
               ⁢ 
               
                   
               
               ⁢ 
               at 
               ⁢ 
               
                   
               
               ⁢ 
               the 
               ⁢ 
               
                   
               
               ⁢ 
               highest 
               ⁢ 
               
                   
               
               ⁢ 
               level 
               ⁢ 
               
                   
               
               ⁢ 
               of 
               ⁢ 
               
                   
               
               ⁢ 
               motion 
               ⁢ 
               
                   
               
               ⁢ 
               L 
               ⁢ 
               
                   
               
               ⁢ 
               4 
               ⁢ 
               
                 ( 
                 
                   Z 
                   = 
                   
                     Z 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     4 
                   
                 
                 ) 
               
             
             = 
             
               
                 f 
                 ⁡ 
                 
                   ( 
                   n 
                   ) 
                 
               
               . 
             
           
         
       
     
     In the above mentioned procedures, the depth values stored in the Z buffer remain unchanged while the depth values rendered onto the target rectangle B could be updated with the increasing levels of motion. Therefore, for each pixel, color data of a rectangle texture corresponding to a level of motion greater than but closest to the one recorded in the Z buffer is used as the color data of the pixel and rendered onto the target rectangle B. In this way, missing pixels with color data varying with respective levels of motion can be obtained so as to combine with the interlacing field F(n) to accomplish the de-interlacing operation. 
     In addition to the de-interlacing operation, the present system and a method for determining color data of pixels can be used in a variety of program-code tools for designing a control chip of an electronic product. 
     While the invention has been described in terms of what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention needs not to be limited to the disclosed embodiment. On the contrary, it is intended to cover various modifications and similar arrangements included within the spirit and scope of the appended claims which are to be accorded with the broadest interpretation so as to encompass all such modifications and similar structures.