Abstract:
An image processing module is provided. A de-mosaic unit in the image processing module includes an edge direction detection unit and a multi-pixel directional interpolation unit. The edge direction detection unit is used to determine a first color row luminance difference according to a plurality of first color pixels of a pixel row of raw data, and determine a first color column luminance difference according to a plurality of first color pixels of a pixel column of raw data. The multi-pixels directional interpolation unit is used to determine pixel luminance of a third color array according to the first color column luminance difference, the first color row luminance difference, the third color pixels adjacent to a first color pixel and the third color pixels adjacent to a second color pixel.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present disclosure relates to an image processing method and an image processing device. 
         [0003]    2. Description of the Related Art 
         [0004]    A color filter array (CFA) in a Complementary Metal-Oxide-Semiconductor (CMOS) sensor is usually arranged in Bayer pattern. Raw data from a sensor is processed by de-mosaic processing (color interpolation) to produce an image, wherein each pixel of the image includes red, green and blue components. For example, a Bayer pattern is formed by one red pixel, one blue pixel and two green pixels (Gb and Gr) arranged in a 2*2 pixel array. The green pixel Gb is a green pixel arranged in a row with the blue pixels, and the green pixel Gr is a green pixel arranged in a row with the red pixels. The light amplitude of the green pixels Gb and Gr may be different due to layout or manufacturing differences, even with identical incident lights. Thus, a so-called false texture or maze artifact may occur after the de-mosaic processing. 
         [0005]    A typical image processing device has a Gb/Gr imbalance correction unit to correct the differences of the green pixels. Referring to an exemplary Bayer pattern in  FIG. 1 , a conventional Gb/Gr imbalance correction method can be expressed as the following formula: 
         [0000]        Gr _avg=( G 0+ G 1+ G 5+ G 6)/4 
         [0000]        Gb _avg=(2* G 3+ G 2+ G 4)/4 
         [0000]        G _diff= Gr _avg− Gb _avg
 
         [0000]        G 3_bal= G 3+ G _diff 
         [0006]    Take the green pixel g3 which is arranged in a row with the blue pixels as an example. The Gr_avg is an average of the green pixels in two rows with the red pixels, and the Gb_avg is an average of the green pixels in one row with the blue pixels. G_diff is a difference between Gr_avg and Gb_avg. The compensation value G3_bal of the green pixel g3 is equal to an original value G3 of the green pixel g3 plus the difference between the Gr_avg and Gb_avg. The method keeps the Gr values of the green pixels unchanged (namely, keeps the values of the green pixels in the row with the red pixels unchanged), but adjusts the Gb values of the green pixels. 
         [0007]    However, the conventional Gr/Gb imbalance correction method will cause the edge to blur. In fact, the false texture or maze artifact is only obvious on the smooth region of an image, which is masked by the edge transition around the edge of the image. Therefore, a new Gr/Gb imbalance correction method which is able to suppress the false texture or maze artifact, and blurred-edges is called for. 
       BRIEF SUMMARY OF INVENTION 
       [0008]    A detailed description is given in the following embodiments with reference to the accompanying drawings. 
         [0009]    In one embodiment, the invention provides an image processing method adapted to correct the luminance of green pixels in a Bayer pattern. The image processing method comprising: generating a low-pass weight according to a luminance difference average between a predetermined green pixel and a plurality of green pixels, a first predetermined luminance and a second predetermined luminance by a content adaptive unit; generating a de-noise value according to a luminance weighted average of a plurality of green pixels by a de-noise filter unit; generating a first color weighted value according to the low-pass weight and a luminance weighted average of the plurality of green pixels within the first color area, generating a second color weighted value according to the low-pass weight and a luminance weighted average of the plurality of green pixels within the second color area, and generating a color weighted difference according to the first color weighted value and the second color weighted value by a color weighted calculation unit; generating a mixed luminance value according to the low-pass weight, the de-noise value and the luminance of the predetermined green pixel by a mix unit; and generating a luminance corrected value according to the mixed luminance value, a first luminance average, a second luminance average, the color weighted difference and a control parameter by a compensation unit. 
         [0010]    In one embodiment, the invention provides an image processing method. The image processing method comprises: generating a plurality of weighted values according to the luminance difference average between a predetermined green pixel and a plurality of pixels by a content adaptive unit; generating a de-noise value according to the products of each of the weighted values and each of the plurality of green pixels, and a summation of the plurality of weighted values by a de-noise filter unit; generating a first color weighted value according to a summation of the weighted values of the plurality of green values within a first color area and the volume of the plurality of green pixels, generating a second color weighted value according to a summation of the weighted values of the plurality of green values within a second color area and the volume of the plurality of green pixels, and generating a color weighted difference according to the first color weighted value and the second color weighted value by a color weighted calculation unit; and generating a luminance corrected value of the predetermined green pixel according to a first luminance average, a second luminance average, the de-noise value, the color weighted difference and a control parameter by a compensation unit. 
         [0011]    In another embodiment, the invention provides an image processing device adapted to correct the luminance of green pixels in a Bayer pattern. The image processing device includes a content adaptive unit used for generating a low-pass weight according to a luminance difference average between a predetermined green pixel and a plurality of green pixels, a first predetermined luminance and a second predetermined luminance. The image processing device further includes a de-noise filter unit used for generating a de-noise value according to a luminance weighted average of a plurality of green pixels. The image processing device further includes a color weighted calculation unit used for generating a first color weighted value according to the low-pass weight and a luminance weighted average of the plurality of green pixels within the first color area, generating a second color weighted value according to the low-pass weight and a luminance weighted average of the plurality of green pixels within the second color area, and generating a color weighted difference according to the first color weighted value and the second color weighted value. The image processing device further includes a mix unit used for generating a mixed luminance value according to the low-pass weight, the de-noise value and the luminance of the predetermined green pixel. The image processing device further includes a compensation unit used for generating a luminance corrected value according to the mixed luminance value, a first luminance average, a second luminance average, the color weighted difference and a control parameter. 
         [0012]    In another embodiment, the invention provides an image processing device adapted to correct the luminance of green pixels in a Bayer pattern. The image processing device includes a content adaptive unit used for generating a plurality of weighted values according to the luminance difference average between a predetermined green pixel and a plurality of pixels. The image processing device further includes a de-noise filter unit used for generating a de-noise value according to the products of each of the weighted values and each of the plurality of green pixels, and a summation of the plurality of weighted values. The image processing device further includes a color weighted calculation unit used for generating a first color weighted value according to a summation of the weighted values of the plurality of green values within a first color area and the volume of the plurality of green pixels, generating a second color weighted value according to a summation of the weighted values of the plurality of green values within a second color area and the volume of the plurality of green pixels, and generating a color weighted difference according to the first color weighted value and the second color weighted value. The image processing device further includes a compensation unit used for generating a luminance corrected value of the predetermined green pixel according to a first luminance average, a second luminance average, the de-noise value, the color weighted difference and a control parameter. 
         [0013]    The image processing method and the image processing device in the embodiment may not only correct the Gr/Gb imbalance to suppress false textures or maze artifacts on the smooth regions of an image, but also compensate for the Gr/Gb difference to suppress blurred-edges around the edges of an image. 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0014]    The present invention can be more fully understood by reading the subsequent detailed description and examples with references made to the accompanying drawings, wherein: 
           [0015]      FIG. 1  is a diagram showing an exemplary Bayer pattern used in the conventional image processing method for correcting the luminance of the green pixels; 
           [0016]      FIG. 2  is a diagram showing an exemplary Bayer pattern used in the image processing method for correcting the luminance of the green pixels according to the embodiment of the invention; 
           [0017]      FIG. 3  is a flowchart illustrating the image processing method according to the embodiment of the invention; 
           [0018]      FIG. 4  is a flowchart illustrating the image processing method according to another embodiment of the invention; 
           [0019]      FIG. 5  is a flowchart illustrating the image processing method according to another embodiment of the invention; 
           [0020]      FIG. 6  shows a low-pass filter according to another embodiment of the invention; 
           [0021]      FIG. 7  is a diagram showing an image processing device according to the embodiment of the invention; and 
           [0022]      FIG. 8  is a diagram showing an image processing device according to another embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF INVENTION 
       [0023]    The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims. 
         [0024]      FIG. 3  is a flowchart illustrating the image processing method according to the embodiment of the invention. Referring to  FIG. 2 ,  FIG. 2  is a diagram showing an exemplary Bayer pattern used in the image processing method. At step  302 , a low-pass weight is generated by the content adaptive unit according to a luminance difference average (G_diff_abs) between a predetermined green pixel (g6) and a plurality of green pixels, a first predetermined luminance threshold (th_h) and a second predetermined luminance threshold (th_l). 
         [0025]    In the embodiment, at first, the luminance difference average is obtained by the content adaptive unit according to a summation of absolute values of the luminance differences between the predetermined green pixel (g6) and a plurality of green pixels, and the volume of the plurality of green pixels. The luminance difference average (G_diff_abs) can be expressed as the following equation: 
         [0000]        G _diff_abs=(| G 6− G 0|+| G 6− G 1|+| G 6− G 2|+| G 6− G 3|+| G 6− G 4|+| G 6− G 5|+β G 6− G 7|+| G 6− G 8|+| G 6− G 9|+| G 6− G 10|+| G 6− G 11|+| G 6− G 12|)/12
 
         [0000]    The values G0-G11 respectively represent the luminance of the green pixels g0-g11. 
         [0026]    The first predetermined luminance and the second predetermined luminance and the luminance difference average are used to determine a regulated luminance difference average (G_diff_abs_new). In the embodiment, the first predetermined luminance threshold (th_h) is larger than the second predetermined luminance threshold (th_l). When the luminance difference average (G_diff_abs) is larger than the first predetermined luminance threshold (th_h), the regulated luminance difference average (G_diff_abs_new) is equal to the first predetermined luminance threshold (th_h). When the luminance difference average (G_diff_abs) is smaller than the second predetermined luminance threshold (th_l), the regulated luminance difference average (G_diff_abs_new) is equal to the second predetermined luminance threshold (th_l). Otherwise, the regulated luminance difference average (G_diff_abs_new) is equal to the luminance difference (G_diff_abs). In other words, the regulated luminance difference average (G_diff_abs_new) is limited to be between the first predetermined luminance threshold (th_h) and the second predetermined luminance threshold (th_l). 
         [0027]    Finally, the low-pass weight (W_lpf) may be determined according to the following equation: 
         [0000]        W   —   lpf= 1−( G _diff_abs− th   —   l )/( th   —   h−th   —   l )
 
         [0028]    Next, at step  304 , a de-noise value is generated by a de-noise filter unit according to a luminance weighted average of a plurality of green pixels. The de-noise value (G_lpf) may be determined according to the following equation: 
         [0000]        G   —   lpf =( G 0+ G 1+ G 2+ G 3+ G 4+ G 5+4* G 6+ G 7+ G 8+ G 9+ G 10+ G 11+ G 12)/16 
         [0000]    It is noted that the weighted multiplier of the green pixel g6 (i.e. the predetermined green pixel) is 4. 
         [0029]    At step  306 , a first color weighted value is generated according to the low-pass weight and a luminance weighted average of the plurality of green pixels within the first color area, and a second color weighted value is generated according to the low-pass weight and a luminance weighted average of the plurality of green pixels within the second color area. The first color weighted value may be expressed as the following equation: 
         [0000]      weight —   Gb =(1/16+1/16+1/16+1/16+4/16+1/16+1/16+1/16+1/16)* W   —   Jpf    
         [0000]    It is noted that the plurality of weighted multipliers 1/16 respectively represent the green pixels g0, g1, g2, g5, g7, g10, g11, and g12 which are arranged in the rows with the blue pixels. The weighted multiplier 4/16 represents the predetermined pixel g6. The second color weighted value may be expressed as the following equation: 
         [0000]      weight —   Gr =(1/16+1/16+1/16+1/16)* W   —   lpf    
         [0000]    It is noted that the plurality of weighted multipliers 1/16 respectively represent the green pixels g3, g4, g8, and g9 which are arranged in the rows with the red pixels. 
         [0030]    At step  308 , a color weighted difference is generated according to the first color weighted value and the second color weighted value by a color weighted calculation unit. The color weighted difference (weight_GbGr_diff) may be expressed as the following equation: 
         [0000]      weight —   GbGr =weight —   Gb −weight —   Gr  
 
         [0031]    At step  310 , a mixed luminance value is generated by a mix unit according to the low-pass weight, the de-noise value and the luminance of the predetermined green pixel. The mixed luminance value (g_mix@g6) may be expressed as the following equation: 
         [0000]        g _mix@ g 6= W   —   lpf*g   —   lpf +(1− W   —   lpf )* G 6
 
         [0032]    At step  312 , a luminance corrected value is generated according to the mixed luminance value, a first luminance average, a second luminance average, the color weighted difference and a control parameter by a compensation unit. The first luminance average (Gb_avg) may be expressed as the following equation: 
         [0000]        Gb _avg=( G 0+ G 1+ G 2+ G 5+ G 6+ G 7+ G 10+ G 11+ G 12)/9 
         [0000]    The green pixels g0, g1, g2, g5, g6, g7, g10, g11, and g12 are arranged in the rows with the blue pixels. The second luminance average (Gr_avg) may be expressed as the following equation: 
         [0000]        Gr _avg=( G 3+ G 4+ G 8+ G 9)/4 
         [0000]    The green pixels g3, g4, g8, and g9 are arranged in the rows with the red pixels. 
         [0033]    The luminance corrected value is a summation of the mixed luminance value (g_mix@g6), an average of a difference between the first luminance average (Gr_avg) and the second luminance average (Gb_avg), and the product of the color weighted difference (weight_GbGr_diff) and the control parameter (str). The luminance corrected value (g_out@g6) may be expressed as the following equation: 
         [0000]        g _out@ g 6= g _mix@ g 6+( Gr _avg− Gb _avg)/2*weight —   GbGr _diff* str  
 
         [0034]      FIG. 4  is a flowchart illustrating the image processing method according to another embodiment of the invention. Referring to  FIG. 2 ,  FIG. 2  is a diagram showing an exemplary Bayer pattern used in the image processing method. At step  402 , a plurality of weighted values is generated by a content adaptive unit according to the luminance difference average between a predetermined green pixel and a plurality of pixels. A single weighted value may be determined according to an absolute value of a difference between the luminance of the predetermined green pixel and the luminance of one of the plurality of the pixels divided by a maximum difference. The weighted values may be expressed as the following equation: 
         [0000]        Wn= 1−| G 6− Gn |/diff_max,clip to (0,1),
 
         [0000]    wherein n is from 0 to 12. The maximum difference (diff_max) is pre-determined by users such as 255. The range of the weighted value is from zero to one. Wn represents the weighted values, and Gn represents the luminance values of the green pixels. In the embodiment, the predetermined green pixel is g6. For example, the weighted values W0 and W1 can be expressed as the following equations according to the above equation: 
         [0000]        W 0=1−| G 6− G 0|/diff_max,clip to (0,1)
 
         [0000]        W 1=1−| G 6− G 1|/diff_max,clip to (0,1)
 
         [0000]    In the embodiment, when the weighted value (Wn) is zero, it means that the luminance between the predetermined green pixel g6 and gn is large, and vise versa. 
         [0035]    Next, at step  404 , a de-noise value is generated by a de-noise filter unit according to the products of each of the weighted values and each of the plurality of green pixels, and a summation of the plurality of weighted values. The summation of the plurality of weighted values may be expressed as the following equation: 
         [0000]        w _sum= w 0+ w 1+ w 2+ w 3+ w 4+ w 5+ w 6+ w 7+ w 8+ w 9+ w 10+ w 11+ w 12 
         [0000]    The de-noise value may be expressed as the following equation: 
         [0000]        g   —   lpf =( w 0* g 0+ w 1* g 1+ w 2* g 2+ w 3* g 3+ w 4* g 4+ w 5* g 5+ w 6* g 6+ w 7* g 7+ w 8* g 8+ w 9* g 9+ w 10* g 10+ w 11* g 11+ w 12* g 12)/ w _sum 
         [0036]    Next, at step  406 , a first color weighted value is generated by a color weighted calculation unit according to a summation of the weighted values of the plurality of green values within a first color area and the volume of the plurality of green pixels. The first color weighted value (weight_Gb) may be expressed as the following equation: 
         [0000]      weight —   Gb =( w 0+ w 1+ w 2+ w 5+ w 6+ w 7+ w 10+ w 11+ w 12)/13 
         [0037]    At step  408 , a second color weighted value is generated by a color weighted calculation unit according to a summation of the weighted values of the plurality of green values within a second color area and the volume of the plurality of green pixels. The second color weighted value (weight_Gr) may be expressed as the following equation: 
         [0000]      weight —   Gr =( w 3+ w 4+ w 8+ w 9)/13 
         [0038]    At step  410 , a color weighted difference is generated by a color weighted calculation unit according to the first color weighted value and the second color weighted value. The color weighted difference (weight_GbGr_diff) may be expressed as the following equation: 
         [0000]      weight —   GbGr _diff=(weight —   Gb −weight —   Gr )
 
         [0039]    At step  412 , a luminance corrected value of the predetermined green pixel is generated by a compensation unit according to a first luminance average, a second luminance average, the de-noise value, the color weighted difference and a control parameter. The first luminance average is determined according to the summation of the plurality of green pixels within the first color area and the volume thereof. The first luminance average may be expressed as the following equation: 
         [0000]        Gb _avg=( g 0+ g 1+ g 2+ g 5+ g 6+ g 7+ g 10+ g 11+ g 12)/9 
         [0000]    The green pixels g0, g1, g2, g5, g6, g7, g10, g11, and g12 are arranged in the rows with the blue pixels. The second luminance average is determined according to the summation of the plurality of green pixels within the second color area and the volume thereof. The second luminance average may be expressed as the following equation: 
         [0000]        Gr _avg=( g 3+ g 4+ g 8+ g 9)/4 
         [0000]    The green pixels g3, g4, g8, and g9 are arranged in the rows with the red pixels. 
         [0040]    The luminance corrected value (g_out@g6) of the predetermined green pixel is a summation of the de-noise value (g_lpf), the average of the difference between the first luminance average (Gr_avg) and the second luminance average (Gb_avg), and the product of the color weighted difference (weight_GbGr_diff) and the control parameter (str). The luminance corrected value may be expressed as the following equation: 
         [0000]        g _out@ g 6= g   —   lpf +( Gr _avg− Gb _avg)/2*weight —   GbGr*str  
 
         [0041]      FIG. 5  is a flowchart illustrating a de-noise and imbalance correction method according to one embodiment of the invention. The image includes pixels of plural primary colors. In this embodiment, the image is a raw image and includes green pixels, red pixels and blues pixels arranged in Bayer pattern as an example. Referring to  FIG. 2 ,  FIG. 2  is a diagram showing an exemplary Bayer pattern in the image. The green pixels include first-green pixels (denoted as Gb) arrange in a row with the blue pixels, and second-green pixels (denoted as Gr) arranged in a row with the red pixels. The method first proceeds to generate a low-pass value of the current green pixel g6 at step  702 . The low-pass step  702  may use a low-pass filter shown in  FIG. 6  on the current green pixel g6 and the surrounding green pixels. The low-pass value (G_lpf) of the current pixel g6 may be determined according to the following equation as an example: 
         [0000]        G   —   lpf =( G 0+ G 1+ G 2+ G 3+ G 4+ G 5+4* G 6+ G 7+ G 8+ G 9+ G 10+ G 11+ G 12)/16 
         [0042]    It is noted that alternative low-pass filter, or alternative de-noise process, may also be used in this step. 
         [0043]    At step  704 , the method generates a low-pass weight W_lpf based on the luminance difference of a current green pixel g6 with respect to surrounding green pixels. The surrounding green pixels of g6 in this embodiment are g0-g12, but the scope of the surrounding green pixels may be alternatively defined depending on different design. If the luminance difference is small, the low-pass weight is designed to be lager in this embodiment. Such that, at step  706 , a de-noised value of the current green pixel g6 is generated based on the low-pass value G_lpf and the low-pass weight W_lpf. For example, de-noised value Gd is determined: Gd=G_lpf*W_lpf+G6*(1−W_lpf). 
         [0044]    The low-pass weight can be designed in various ways. Here an example is given as a reference. First, the luminance difference of the current pixel g6 with respect to the surrounding green pixels is normalized to determine the low-pass weight for the low-pass value G_lpf. The normalization process first generates a luminance difference average G_diff_abs: 
         [0000]        G _diff_abs=(| G 6− G 0|+| G 6− G 1|+| G 6− G 2|+| G 6− G 3|+| G 6− G 4|+| G 6− G 51+1G6− G 7|+| G 6− G 8|+| G 6− G 9|+| G 6− G 10|+| G 6− G 11|+| G 6− G 12)/12
 
         [0045]    Then the luminance difference average G_diff_abs may be further cropped between a first predetermined threshold (th_h) and a second predetermined threshold (th_l), wherein the first predetermined luminance threshold (th_h) is larger than the second predetermined luminance threshold (th_l). When the luminance difference average G_diff_abs is larger than the first predetermined luminance threshold (th_h), the normalized luminance difference average G_diff_abs is equal to the first predetermined luminance threshold (th_h). When the luminance difference average G_diff_abs is smaller than the second predetermined luminance threshold (th_l), the normalized luminance difference average G_diff_abs is equal to the second predetermined luminance threshold (th_l). Otherwise, the luminance difference average (G_diff_abs) remains unchanged. In other words, the normalized luminance difference average G_diff_abs is limited to be between the first predetermined luminance threshold (th_h) and the second predetermined luminance threshold (th_l). Then, the low-pass weight W_lpf may be determined according to the following equation: 
         [0000]        W   —   lpf= 1−( G _diff_abs− th   —   l )/( th   —   h−th   —   l )
 
         [0046]    Next at step  708 , an imbalance value Gim is generated based on the difference of the Gb pixels (g0, g1, g2, g5, g7, g10, g11, g12) with respect to the Gr pixels (g3, g4, g8, g9) of the surrounding green pixels. First, the Gb pixels are averaged: 
         [0000]        Gb _avg=( G 0+ G 1+ G 2+ G 5+ G 6+ G 7+ G 10+ G 11+ G 12)/9 
         [0047]    Then, the Gr pixels are averaged: 
         [0000]        Gr _avg=( G 3+ G 4+ G 8+ G 9)/4 
         [0048]    Thus, the imbalance value Gim is set: 
         [0000]        Gim=Gr _avg− Gb _avg
 
         [0049]    Next at step  710 , the imbalance weight is generated based on the low pass filter such as shown in  FIG. 6 . First, a first color weighted value (weight_Gb) is generated according to the filter value of the low-pass filter that corresponds to the Gb pixels. The first color weighted value (weight_Gb) may be expressed as the following equation: 
         [0000]      weight —   Gb =(1/16+1/16+1/16+1/16+4/16+1/16+1/16+1/16+1/16)*weight —   lpf    
         [0050]    It is noted that the plurality of weighted multipliers 1/16 respectively represent the green pixels g0, g1, g2, g5, g7, g10, g11, and g12 which are arranged in the rows with the blue pixels. The weighted multiplier 4/16 represents the predetermined pixel g6. The second color weighted value is generated based on the filter value of the low-pass filter that corresponds to the Gr pixels, and may be expressed as the following equation: 
         [0000]      weight —   Gr =(1/16+1/16+1/16+1/16)*weight —   lpf    
         [0051]    It is noted that the plurality of weighted multipliers 1/16 respectively represent the green pixels g3, g4, g8, and g9 which are arranged in the rows with the red pixels. Then, the imbalance weight may be expressed as the following equation: 
         [0000]      weight —   GbGr _diff=weight —   Gb −weight —   Gr  
 
         [0052]    Finally at step  712 , an output value G_out of the current green pixel g6 is determined based on the de-noised value Gd, the imbalance value Gim and the imbalance weight (weight_GbGr_diff): 
         [0000]        G _out= Gd+Gim *weight —   GrGb*str    
         [0053]    The parameter str can be modified by the user dependent on the application. 
         [0054]      FIG. 7  is a diagram showing an image processing device according to the embodiment of the invention. The image processing device  500  includes a content adaptive unit  502 , a de-noise filter unit  504 , a color weighted calculation unit  506 , a mix unit  508  and a compensation unit  510 . 
         [0055]    The content adaptive unit  502  is used to generate a low-pass weight according to a luminance difference average between a predetermined green pixel and a plurality of green pixels, a first predetermined luminance and a second predetermined luminance. In the embodiment, at first, the luminance difference average is obtained by the content adaptive unit according to a summation of absolute values of the luminance differences between the predetermined green pixel (g6) and a plurality of green pixels, and the volume of the plurality of green pixels. The luminance difference average (G_diff_abs) can be expressed as the following equation: 
         [0000]        G _diff_abs=(| G 6− G 0|+| G 6− G 1|+| G 6− G 2|+| G 6− G 3|+| G 6− G 4|+| G 6− G 51+1G6− G 7|+| G 6− G 8|+| G 6− G 9|+| G 6− G 10|+| G 6− G 11|+| G 6− G 12)/12
 
         [0000]    The values G0-G12 respectively represent the luminance of the green pixels g0-g12. 
         [0056]    The first predetermined luminance and the second predetermined luminance and the luminance difference average are used to determine a regulated luminance difference average (G_diff_abs_new). In the embodiment, the first predetermined luminance threshold (th_h) is larger than the second predetermined luminance threshold (th_l). When the luminance difference average (G_diff_abs) is larger than the first predetermined luminance threshold (th_h), the regulated luminance difference average (G_diff_abs_new) is equal to the first predetermined luminance threshold (th_h). When the luminance difference average (G_diff_abs) is smaller than the second predetermined luminance threshold (th_l), the regulated luminance difference average (G_diff_abs_new) is equal to the second predetermined luminance threshold (th_l). Otherwise, the regulated luminance difference average (G_diff_abs_new) is equal to the luminance difference (G_diff_abs). In other words, the regulated luminance difference average (G_diff_abs_new) is limited to be between the first predetermined luminance threshold (th_h) and the second predetermined luminance threshold (th_l). 
         [0057]    Finally, the low-pass weight (W_lpf) may be determined according to the following equation: 
         [0000]        W   —   lpf= 1−( G _diff_abs− th   —   l )/( th   —   h−th   —   l )
 
         [0058]    The de-noise filter unit  504  is used for generating a de-noise value according to a luminance weighted average of a plurality of green pixels. The de-noise value (G_lpf) may be determined according to the following equation: 
         [0000]        G   —   lpf =( G 0+ G 1+ G 2+ G 3+ G 4+ G 5+4* G 6+ G 7+ G 8+ G 9+ G 10+ G 11+ G 12)/16 
         [0059]    It is noted that the weighted multiplier of the green pixel g6 (i.e. the predetermined green pixel) is 4. 
         [0060]    The color weighted calculation unit  506  is used for generating a first color weighted value according to the low-pass weight and a luminance weighted average of the plurality of green pixels within the first color area, generating a second color weighted value according to the low-pass weight and a luminance weighted average of the plurality of green pixels within the second color area, and generating a color weighted difference according to the first color weighted value and the second color weighted value. 
         [0061]    The first color weighted value may be expressed as the following equation: 
         [0000]      weight —   Gb =(1/16+1/16+1/16+1/16+4/16+1/16+1/16+1/16)*weight —   lpf    
         [0000]    It is noted that the plurality of weighted multipliers 1/16 respectively represent the green pixels g0, g1, g2, g5, g7, g10, g11, and g12 which are arranged in the rows with the blue pixels. The weighted multiplier 4/16 represents the predetermined pixel g6. The second color weighted value may be expressed as the following equation: 
         [0000]      weight —   Gb =(1/16+1/16+1/16+1/16)*weight —   lpf    
         [0000]    It is noted that the plurality of weighted multipliers 1/16 respectively represent the green pixels g3, g4, g8, and g9 which are arranged in the rows with the red pixels. The color weighted difference (weight_GbGr_diff) may be expressed as the following equation: 
         [0000]      weight —   GbGr _diff=weight —   Gb −weight —   Gr  
 
         [0062]    The mix unit  508  is used for generating a mixed luminance value according to the filter weighted value, the de-noise value and the luminance of the predetermined green pixel. The mixed luminance value (g_mix@g6) may be expressed as the following equation: 
         [0000]        g _mix@ g 6= W   —   lpf*g   —   lpf +(1− W   —   lpf )* G 6
 
         [0063]    The compensation unit  510  is used for generating a luminance corrected value according to the mixed luminance value, a first luminance average, a second luminance average, the color weighted difference and a control parameter. The first luminance average (Gb_avg) may be expressed as the following equation: 
         [0000]        Gb _avg=( G 0+ G 1+ G 2+ G 5+ G 6+ G 7+ G 10+ G 11+ G 12)/9 
         [0000]    The green pixels g0, g1, g2, g5, g6, g7, g10, g11, and g12 are arranged in the rows with the blue pixels. The second luminance average (Gr_avg) may be expressed as the following equation: 
         [0000]        Gr _avg=( G 3+ G 4+ G 8+ G 9)/4 
         [0000]    The green pixels g3, g4, g8, and g9 are arranged in the rows with the red pixels. 
         [0064]    The luminance corrected value is a summation of the mixed luminance value (g_mix@g6), an average of a difference between the first luminance average (Gb_avg) and the second luminance average (Gr_avg), and the product of the color weighted difference (weight_GbGr_diff) and the control parameter (str). The luminance corrected value (g_out@g6) may be expressed as the following equation: 
         [0000]        g _out@ g 6= g _mix@ g 6+( Gr _avg− Gb _avg)/2*weight —   GbGr _diff* str  
 
         [0065]      FIG. 8  is a diagram showing an image processing device according to another embodiment of the invention. The image processing device includes a content adaptive unit  602 , a de-noise filter unit  604 , a color weighted calculation unit  606 , and a compensation  608 . 
         [0066]    The content adaptive unit  602  is used for generating a plurality of weighted values according to the luminance difference average between a predetermined green pixel and a plurality of pixels. A single weighted value may be determined according to an absolute value of a difference between the luminance of the predetermined green pixel and the luminance of one of the plurality of the pixels divided by a maximum difference. The weighted values may be expressed as the following equation: 
         [0000]        Wn= 1−| G 6− Gn |/diff_max,clip to (0,1),
 
         [0000]    wherein n is from 0 to 12. The maximum difference (diff_max) is pre-determined by users such as 255. The range of the weighted value is from zero to one. Wn represents weighted values, and (Gn) represents the luminance values of the green pixels. In the embodiment, the predetermined green pixel is g6. For example, the weighted values W0 and W1 can be expressed as the following equations according to the above equation: 
         [0000]        W 0=1−| G 6− G 0|/diff_max,clip to (0,1)
 
         [0000]        W 1=1−| G 6− G 1|/diff_max,clip to (0,1)
 
         [0067]    In the embodiment, when the weighted value (Wn) is zero, it means that the luminance between the predetermined green pixel g6 and gn is large, and vise versa. 
         [0068]    The de-noise filter unit  604  is used for generating a de-noise value according to the products of each of the weighted values and each of the plurality of green pixels, and a summation of the plurality of weighted values. The summation of the plurality of weighted values may be expressed as the following equation: 
         [0000]        w _sum= w 0+ w 1+ w 2+ w 3+ w 4+ w 5+ w 6+ w 7+ w 8+ w 9+ w 10+ w 11+ w 12 
         [0000]    The de-noise value may be expressed as the following equation: 
         [0000]        g   —   lpf =( w 0* g 0+ w 1* g 1+ w 2* g 2+ w 3* g 3+ w 4* g 4+ w 5* g 5+ w 6* g 6+ w 7* g 7+ w 8* g 8+ w 9* g 9+ w 10* g 10+ w 11* g 11+ w 12* g 12)/ w _sum 
         [0069]    The color weighted calculation unit  606  is used for generating a first color weighted value according to a summation of the weighted values of the plurality of green values within a first color area and the volume of the plurality of green pixels, and generating a second color weighted value according to a summation of the weighted values of the plurality of green values within a second color area and the volume of the plurality of green pixels, and generating a color weighted difference according to the first color weighted value and the second color weighted value. The first color weighted value (weight_Gb) may be expressed as the following equation: 
         [0000]      weight —   Gb =( w 0+ w 1+ w 2+ w 5+ w 6+ w 7+ w 10+ w 11+ w 12)/13 
         [0000]    The second color weighted value (weight_Gr) may be expressed as the following equation: 
         [0000]      weight —   Gr =( w 3+ w 4+ w 8+ w 9)/13 
         [0000]    The color weighted difference (weight_GbGr_diff) may be expressed as the following equation: 
         [0000]      weight —   GbGr _diff=(weight —   Gb −weight —   Gr )
 
         [0070]    The compensation unit  608  is used for generating a luminance corrected value of the predetermined green pixel according to a first luminance average, a second luminance average, the de-noise value, the color weighted difference and a control parameter. The first luminance average is determined according to the summation of the plurality of green pixels within the first color area and the volume thereof. The first luminance average may be expressed as the following equation: 
         [0000]        Gb _avg=( g 0+ g 1+ g 2+ g 5+ g 6+ g 7+ g 10+ g 11+ g 12)/9 
         [0000]    The green pixels g0, g1, g2, g5, g6, g7, g10, g11, and g12 are arranged in the rows with the blue pixels. The second luminance average is determined according to the summation of the plurality of green pixels within the second color area and the volume thereof. The second luminance average may be expressed as the following equation: 
         [0000]        Gr _avg=( g 3+ g 4+ g 8+ g 9)/4 
         [0000]    The green pixels g3, g4, g8, and g9 are arranged in the rows with the red pixels. 
         [0071]    The luminance corrected value (g_out@g6) of the predetermined green pixel is a summation of the de-noise value (g_lpf), the average of the difference between the first luminance average (Gb_avg) and the second luminance average (Gr_avg), and the product of the color weighted difference (weight_GbGr_diff) and the control parameter (str). The luminance corrected value may be expressed as the following equation: 
         [0000]        g _out@ g 6= g   —   lpf +( Gr _avg− Gb _avg)/2*weight —   GbGr _diff* str  
 
         [0072]    While the invention has been described by way of example and in terms of the preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.