Abstract:
The present invention provides a noise reduction method and apparatus for use in reducing noise of a digital image. The noise reduction apparatus comprises a threshold value generating unit, a determining unit, and an adjusting unit. The threshold value generating unit generates a noise threshold value according to a target window and a first chrominance value and a second chrominance value of an input pixel of the image. The determining unit determines whether the input pixel needs to be adjusted according to the noise threshold value and pixel values of neighboring pixels of the input pixel. The adjusting unit adjusts the pixel value of the input pixel when the input pixel is determined as needing to be adjusted. Using the noise reduction apparatus of the present invention, not only noise of a digital image can be identified, but also the degradation caused by the noise can be reduced and thus the overall picture quality can be improved.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention generally relates to a noise reduction method and a noise reduction apparatus and, more particularly, to a noise reduction method and a noise reduction apparatus using the luminance value and the chrominance values of an input pixel so as to identify and eliminate a noise point of a digital image by adjusting the luminance value and the chrominance values. 
     2. Description of the Prior Art 
     In digital image processing, the most generally used method to reduce noise is to directly process the pixels related to the image. For example, averaging filters and sequence statistical filters are used according to respective requirements. 
     Conventionally, mosquito noise and Gaussian noise are eliminated using a lowpass filter, operating corresponding to the pixel values in a masked region by the filter so as to obtain a mean value and then make the mean value replace the pixel values. However, the lowpass filter performs pixel adjustment for the entire image including some non-noise portions. Therefore, the noise reduction process using the lowpass filter may lead to undesirable distortion of the image because it cannot identify where noise occurs. Moreover, since the pixel is adjusted according to the pixel values of the neighboring pixels, the adjusted image shows unnaturalness in luminance and chrominance. 
     Accordingly, the present invention provides a noise reduction method not only to identify noise of a digital image, but also to reduce noise by adjusting the luminance value and the chrominance values to avoid image distortion. 
     Compared to the prior art, the noise reduction method of the present invention exhibits excellent performance in noise reduction while remaining the original colors in the region where there is no noise determined. 
     SUMMARY OF THE INVENTION 
     It is a primary object of the present invention to provide a noise reduction method and a noise reduction apparatus so as to identify noise in a digital image and adjust the luminance value and the chrominance values of a pixel that is determined a noise point so that the image quality is improved and the image distortion is avoided. 
     In order to achieve the foregoing object, the present invention provides a noise reduction method, comprising steps of: defining a target window by a first chrominance range and a second chrominance range; determining a noise threshold value according to whether an input pixel of the image is located inside the target window by a threshold value generating unit; determining whether a pixel value of the input pixel needs to be adjusted according to the noise threshold value and pixel values of neighboring pixels of the input pixel by a determining unit; and adjusting the pixel value of the input pixel by an adjusting unit when the input pixel is determined as needing to be adjusted. 
     Preferably, a noise weighting calculation is performed according to the shortest distance between the target window and the input pixel so as to determine the noise threshold value if the input pixel having the first chrominance value and the second chrominance value is located inside the target window. 
     In order to achieve the foregoing object, the present invention further provides a noise reduction apparatus, comprising a threshold value generating unit, for generating a noise threshold value according to a target window and a first chrominance value and a second chrominance value of an input pixel of the image; a determining unit, for determining whether the input pixel needs to be adjusted according to the noise threshold value and pixel values of neighboring pixels of the input pixel; and an adjusting unit, adjusting the pixel value of the input pixel when the input pixel is determined as needing to be adjusted. 
     Accordingly, the present invention provides a noise reduction method using the first chrominance and the second chrominance values of an input pixel to select a noise threshold value and determine whether the input pixel is infected with noise, which is to be eliminated by adjusting the luminance value or the color value of the input pixel. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       The objects, spirits and advantages of the preferred embodiments of the present invention will be readily understood by the accompanying drawings and detailed descriptions, wherein: 
         FIG. 1  is a schematic diagram showing an input pixel and its neighboring pixels according to the preferred embodiment of the present invention; 
         FIG. 2  is a schematic diagram showing an input pixel and a corresponding target window according to the preferred embodiment of the present invention; 
         FIG. 3  is a flowchart showing steps of the noise reduction method according to the preferred embodiment of the present invention; 
         FIG. 4  is a flowchart showing steps for adjusting the first chrominance value in the noise reduction method according to another preferred embodiment of the present invention; 
         FIG. 5  is a flowchart showing steps for adjusting the second chrominance value in the noise reduction method according to another preferred embodiment of the present invention; and 
         FIG. 6  is a lookup table used in the noise reduction method according to the present invention. 
         FIG. 7  shows a noise reduction apparatus according to one of embodiments of the present invention. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     The present invention providing a noise reduction method and apparatus for use in an image processing device can be exemplified by the preferred embodiments as described hereinafter. 
     Please refer to  FIG. 1 , which is a schematic diagram showing an input pixel and its neighboring pixels of an image according to the preferred embodiment of the present invention. A 3×3 mask  10  comprises an input pixel Pin and its neighboring pixels P 1 , P 2 , P 3 , P 4 , P 5 , P 6 , P 7 , P 8 . When the input pixel Pin moves from one point in a digital image  12  to another, the mask  10  also moves. The mask  10  can also be implemented by using a 5×5 mask or a 7×7 mask. 
     Please refer to  FIG. 2 , which is a schematic diagram showing an input pixel and a corresponding target window according to the preferred embodiment of the present invention. A target window  20  is established on a coordinate plane defined by the first chrominance Cb and the second chrominance Cr as the horizontal axis and the vertical axis. The target window  20  is a rectangular window, wherein Cb_U, Cb_L, Cr_U and Cr_L are determined by the user. There exists a shortest distance Dmin between the target window  20  and the input pixel Pin if the input pixel Pin having the first chrominance value Cb and the second chrominance value Cr is located inside the target window  20 . 
       FIG. 7  shows a noise reduction apparatus according to one of embodiments of the present invention. The noise reduction apparatus comprises a threshold value generating unit  710 , a determining unit  720  and an adjusting unit  730 . The threshold value generating unit  710  is used for generating a noise threshold value according to a target window and a first chrominance value and a second chrominance value of an input pixel of an image. The determining unit  720  is used to determine whether the input pixel needs to be adjusted according to the noise threshold value and pixel values of the input pixel and its neighboring pixels. The adjusting unit  730  is used to adjust the input pixel.  FIG. 3  is a flowchart showing steps of the noise reduction method according to the preferred embodiment of the present invention. Referring to  FIGS. 3 and 7 , the detailed description of the preferred embodiment is described as following. First, as described in Step S 300 , a target window is defined on a coordinate plane defined by the first chrominance and the second chrominance as the horizontal axis and the vertical axis. In Step S 310 , a first chrominance value and a second chrominance value of an input pixel of an image are selected. Then in Step S 320 , whether the input pixel having the first chrominance value and the second chrominance value is located inside the target window is determined by the threshold value generating unit  710 . 
     In Step S 330 , the threshold value generating unit  710  performs a noise weighting calculation to determine a noise threshold value when the input pixel having the first chrominance value and the second chrominance value is located inside the target window; otherwise, the threshold value generating unit  710  selects a pre-determined noise standard value N_b as a noise threshold value when the input pixel is not located inside the target window, as described in Step S 340 . The noise weighting calculation is expressed as:
 
 N   —   th=N   —   b−W 1× D min
 
     wherein N_th is the noise threshold value, N_b is the pre-determined noise standard value, W 1  is a first weighting value and Dmin is the shortest distance between the target window and the input pixel. 
     After the noise threshold value is determined, the difference values between the luminance value of each of the neighboring pixels of the input pixel and a mean luminance value of the neighboring pixels are calculated by the determining unit  720  so as to obtain a set of luminance difference values, as described in Step S 350 . In Step S 360 , whether the absolute value of each difference value is not larger than the noise threshold value is determining by the determining unit  720 . In Step S 370 , a luminance adjusting calculation is performed by the adjusting unit  730  to adjust the luminance value of the input pixel if the absolute value of each difference value is not larger than the noise threshold value; otherwise, the luminance value of the input pixel is remained if the absolute value of any difference value is larger than the noise threshold value, as described in Step S 380 . The luminance adjusting calculation is expressed as:
 
 Y in_new=(1− W 2)× Y in+ W 2× Y _mean
 
     wherein Yin_new is an adjusted luminance value of the input pixel, Yin is the luminance value of the input pixel, W 2  is a second weighting value and Y_mean is a mean luminance value of the neighboring pixels of the input pixel. 
     After either Step S 370  or Step S 380  is completed, another pixel is selected as a new input pixel, as described in Step S 390 . 
     Please further refer to  FIG. 4 , which is a flowchart showing steps for adjusting the first chrominance value in the noise reduction method according to another preferred embodiment of the present invention. Step S 400  to Step  440  are identical to Step S 300  to Step  340 . Step S 450  to Step S 480  are used for adjusting the first chrominance value, as described hereinafter. 
     In Step S 450 , the difference values between the first chrominance value of each of the neighboring pixels of the input pixel and a first mean chrominance value of the neighboring pixels are calculated by the determining unit  720  so as to obtain a set of first chrominance difference values, as described in Step S 450 . In Step S 460 , whether the absolute value of each difference value is not larger than the noise threshold value is determining by the determining unit  720 . In Step S 470 , a first chrominance adjusting calculation is performed by the adjusting unit  730  to adjust the first chrominance value of the input pixel if the absolute value of each difference value is not larger than the noise threshold value; otherwise, the first chrominance value of the input pixel is remained if the absolute value of any difference value is larger than the noise threshold value, as described in Step S 480 . The first chrominance adjusting calculation is expressed as:
 
 Cb in_new=(1− W 3)× Cb in+ W 3× Cb _mean
 
     wherein Cbin_new is an adjusted chrominance value of the input pixel, Cbin is the chrominance value of the input pixel, W 3  is a weighting value and Cb_mean is a mean chrominance value of the neighboring pixels of the input pixel. 
     After either Step S 470  or Step S 480  is completed, another pixel is selected as a new input pixel, as described in Step S 490 . 
     Please further refer to  FIG. 5 , which is a flowchart showing steps for adjusting the second chrominance value in the noise reduction method according to another preferred embodiment of the present invention. Step S 500  to Step  540  are identical to Step S 300  to Step  340 . Step S 550  to Step S 580  are used for adjusting the second chrominance value, as described hereinafter. 
     In Step S 550 , the difference values between the second chrominance value of each of the neighboring pixels of the input pixel and a second mean chrominance value of the neighboring pixels are calculated by the determining unit  720  so as to obtain a set of second chrominance difference values, as described in Step S 550 . In Step S 560 , whether the absolute value of each difference value is not larger than the noise threshold value is determining by the determining unit  720 . In Step S 570 , a second chrominance adjusting calculation is performed by the adjusting unit  730  to adjust the second chrominance value of the input pixel if the absolute value of each difference value is not larger than the noise threshold value; otherwise, the second chrominance value of the input pixel is remained if the absolute value of any difference value is larger than the noise threshold value, as described in Step S 580 . The second chrominance adjusting calculation is expressed as:
 
 Cr in_new=(1− W 4)× Cr in+ W 4× Cr _mean
 
     wherein Crin_new is an adjusted chrominance value of the input pixel, Crin is the chrominance value of the input pixel, W 4  is a weighting value and Cr_mean is a mean chrominance value of the neighboring pixels of the input pixel. 
     After either Step S 570  or Step S 580  is completed, another pixel is selected as a new input pixel, as described in Step S 590 . 
     The aforesaid weighting values W 2 , W 3 , W 4  are selected according to a luminance index, a first chrominance index, a second chrominance index and a corresponding lookup table. The luminance index is expressed as: 
     
       
         
           
             Y_index 
             = 
             
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Y 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     1 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Y_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Y 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     2 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Y_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Y 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     3 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Y_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Y 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     4 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Y_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Y 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     5 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Y_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Y 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     6 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Y_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Y 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     7 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Y_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Y 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     8 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Y_mean 
                   
                   ] 
                 
               
             
           
         
       
     
     wherein Y_index is the luminance index, Y 1 , Y 2 , Y 3 , Y 4 , Y 5 , Y 6 , Y 7 , Y 8  are the luminance values of the neighboring pixels of the input pixel, and abs[ ] is an absolute value operator. 
     The first chrominance index is expressed as: 
     
       
         
           
             Cb_index 
             = 
             
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cb 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     1 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cb_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cb 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     2 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cb_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cb 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     3 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cb_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cb 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     4 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cb_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cb 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     5 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cb_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cb 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     6 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cb_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cb 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     7 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cb_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cb 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     8 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cb_mean 
                   
                   ] 
                 
               
             
           
         
       
     
     wherein Cb_index is the first chrominance index, Cb 1 , Cb 2 , Cb 3 , Cb 4 , Cb 5 , Cb 6 , Cb 7 , Cb 8  are the chrominance values of the neighboring pixels of the input pixel, and abs[ ] is an absolute value operator. 
     The second chrominance index is expressed as: 
     
       
         
           
             Cr_index 
             = 
             
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     1 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cr_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     2 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cr_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     3 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cr_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     4 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cr_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     5 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cr_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     6 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cr_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     7 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cr_mean 
                   
                   ] 
                 
               
               + 
               
                 abs 
                 ⁡ 
                 
                   [ 
                   
                     Cr 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     8 
                     ⁢ 
                     
                       - 
                     
                     ⁢ 
                     Cr_mean 
                   
                   ] 
                 
               
             
           
         
       
     
     wherein Cr_index is the second chrominance index, Cr 1 , Cr 2 , Cr 3 , Cr 4 , Cr 5 , Cr 6 , Cr 7 , Cr 8  are the chrominance values of the neighboring pixels of the input pixel, and abs[ ] is an absolute value operator. 
     For example, in  FIG. 6 , when half of the luminance index is 2, W 2  is set to be 2/16. Similarly, W 3  and W 4  can also be obtained by using the lookup table. 
     According to the above discussion, it is apparent that the present invention discloses a noise reduction method and a noise reduction apparatus so as to identify noise in a digital image and adjust the luminance value and the chrominance values of a pixel that is determined a noise point so that the image quality is improved and the image distortion is avoided. 
     Although this invention has been disclosed and illustrated with reference to particular embodiments, the principles involved are susceptible for use in numerous other embodiments that will be apparent to persons skilled in the art. This invention is, therefore, to be limited only as indicated by the scope of the appended claims.