Abstract:
An edge parameter computing method for an image, wherein the image includes a plurality of pixels forming a Bayer pattern. The edge parameter computing method comprises: (a) computing an average grey level of at least one specific type pixels in a specific region of the image; (b) computing each grey level difference value between the average grey level and the specific type pixels in the specific region to generate a plurality of grey level difference values; (c) finding a specific pixel with a maximum grey level difference value according to the grey level difference values; and (d) computing a ratio value between the average grey level and the maximum grey level difference value as the edge parameter.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to an edge parameter computing method for image and an image noise omitting method utilizing the edge parameter computing method, and particularly relates to an edge parameter computing method and a image noise omitting method utilizing different weighting processes according to the edge parameter. 
         [0003]    2. Description of the Prior Art 
         [0004]      FIG. 1  is a block diagram illustrating a prior art image processing system  100 . As shown in  FIG. 1 , the image processing system  100  comprises an image sensor  101  such as a CCD (Charge-coupled Device), an analog amplifier  103 , an analog-digital converter  105  and an image processing module  107 . The image sensor  101  is utilized to sense input light from a target (i.e. an analog image signal AIS), and to transform input light intensity to charge intensity (i.e. a sampling image signal SIS). After that, the analog amplifier  103  amplifies the sampling image signal SIS to generate an amplified sampling image signal ASIS. After that, the analog-digital converter  105  transforms the amplified sampling image signal ASIS to a digital image signal S RGB  with RGB format. The image processing module  107  transforms the digital image signal S RGB  with RGB format to a digital image signal S YUV  with YUV format, and transmits the digital image signal S YUV  to the displaying apparatus  109  for displaying. Alternatively, the digital image signal S YUV  can be transmitted to the compression processing module  111  for compression and then stored to the storage apparatus  113 . The image processing module  107  described here can be implemented by every hardware or software that image processing may utilizes, such as format transforming, interpretation processing, encoding/decoding. Since such skill is known by persons skilled in the art, it is omitted for brevity here. 
         [0005]      FIG. 2  is a schematic diagram illustrating a prior art Bayer Pattern. The Bayer Pattern is an arrangement format for a color filter array in am image sensor. As shown in  FIG. 2   a,  Bayer Pattern includes specific arrangement. For example, the arrangement for the first column  201  is RGRGR, the arrangement for the second column  203  is GBGBG, and the arrangement for the third column  205  is RGRGR again.  FIGS. 2   b ,  2   c  also illustrate Bayer Pattern.  FIGS. 2   b ,  2   c  have the same arrangement of  FIG. 2   a,  and the difference between  FIGS. 2   a ,  2   b ,  2   c  is that  FIG. 2   a  utilizes an R pixel as a center, but  FIGS. 2   b ,  2   c  utilize B, G pixels as a center. 
         [0006]    However, disclosed prior art does not provide a special processing for image noise, or the noise processing is performed but it consumes large amount of system resource and time. 
       SUMMARY OF THE INVENTION 
       [0007]    Accordingly, one objective of the present invention is to provide an image noise omitting method, to omit the noise in the image. 
         [0008]    Another objective of the present invention is to provide an edge parameter computing method for an image. 
         [0009]    One embodiment of the present application discloses an method for computing an edge parameter of an image, wherein the image includes a plurality of pixels forming a Bayer pattern. The edge parameter computing method comprises: (a) computing an average grey level of at least one specific type pixels in a specific region of the image; (b) computing each grey level difference value between the average grey level and the specific type pixels in the specific region to generate a plurality of grey level difference values; (c) finding a specific pixel with a maximum grey level difference value according to the grey level difference values; and (d) computing a ratio value between the average grey level and the maximum grey level difference value as the edge parameter. 
         [0010]    Another embodiment of the present application discloses a noise omitting method for an image, wherein the image includes a plurality of pixels forming a Bayer pattern. The edge parameter computing method comprises: (a) computing an average grey level of at least one of specific type pixels in a first region of the image; (b) computing each grey level difference between the average grey level and the specific type pixels to generate a plurality of grey level difference values; (c) finding a specific pixel with a maximum grey level difference value according to the grey level difference values; and (d) determining a second region according to the specific pixel and a target pixel in the first region; and (e) selectively utilizing the pixel in the second region to adjust a grey level value of the target pixel to omit noise. 
         [0011]    These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0012]      FIG. 1  is a block diagram illustrating a prior art image processing system. 
           [0013]      FIG. 2   a,    2   b,    2   c  are schematic diagrams illustrating a prior art Bayer Pattern. 
           [0014]    FIGS.  3 , 4  respectively describe part of the flow chart for the image noise omitting method according the embodiment of the present application. 
       
    
    
     DETAILED DESCRIPTION 
       [0015]    Certain terms are used throughout the description and following claims to refer to particular components. As one skilled in the art will appreciate, electronic equipment manufacturers may refer to a component by different names. This document does not intend to distinguish between components that differ in name but not function. In the following description and in the claims, the terms “include” and “comprise” are used in an open-ended fashion, and thus should be interpreted to mean “include, but not limited to . . . ”. Also, the term “couple” is intended to mean either an indirect or direct electrical connection. Accordingly, if one device is coupled to another device, that connection may be through a direct electrical connection, or through an indirect electrical connection via other devices and connections. 
         [0016]      FIG. 3  and  FIG. 4  respectively illustrate part of the flow charts of the image noise omitting method according to one embodiment of the present invention. Please jointly refer to these two figures to understand the present invention more clearly. The image noise omitting method according to one embodiment of the present invention can be applied in the image processing module  107  via software, firmware or hardware. 
         [0017]      FIG. 3  can include following steps: 
         [0018]    Step  301   
         [0019]    Utilize a Bayer Pattern. 
         [0020]    Step  303   
         [0021]    Determine the pixel to be performed by a noise omitting process (i.e. a target pixel) belongs to a G pixel or one of the R/B pixels. If the target pixel belongs to a G pixel, go to step  307 , and if the target pixel belongs to the R pixel or B pixel, go to step  305 . For more detail, determining the pixel at the center of Bayer Pattern is a G or R/B pixel, while determining the target pixel. Take  FIGS. 2   a,    2   b  for example, the pixel at the center of Bayer Pattern are R/B pixels (R t /B t ), and then the step  305  is performed. Take  FIG. 2   c  for example, the pixel at the center of Bayer Pattern is a G pixel (G t ), and then the step  307  is performed. 
         [0022]    Step  305   
         [0023]    Utilize an R/B window. Take  FIG. 2   a  for example, the R window indicates 8 R pixels closest to the target pixel R t , that is, R 0 ˜R 7 . Take  FIG. 2   b  for example, the B window indicates 8 R pixels closest to the target pixel B t , that is, B 0 ˜B 7 . The B pixel and the R pixel have the same corresponding locations with the target pixel in Bayer pattern, thus such format is called the R/B window. 
         [0024]    Step  307   
         [0025]    Utilize a G window. Take  FIG. 2   c  for example, the G window indicates 12 G pixels closest to the target pixel G t , that is, G 0 ˜G 11 . 
         [0026]    Step  309   
         [0027]    Utilize one of the G window or R/B window to compute the grey level average value Avg G  of the pixels in the pixel window. Take G window for example, the grey level average value Avg G  of the pixels G 0 ˜G 11  are computed. Take the R window for example, the grey level average value Avg R  of the pixels R 0 ˜R 7  are computed. Take the B window for example, the grey level average value Avg B  of the pixels B 0 ˜B 7  are computed. 
         [0028]    Step  311   
         [0029]    Respectively compute the grey level difference value D between a gray level of a plurality of pixels in a window (part or all of the pixels) and the average grey level value Avg. Take the G window for example, the differences D G0 ˜D G11  between the pixels G 0 ˜G 11  and the average grey level value Avg G  are all computed, or only the differences D G0 ˜D G7  between the pixels G 0 ˜G 7  and the average grey level value Avg G  are computed. Take the R window for example, the differences D R0 ˜D R7  between the pixels R 0 ˜R 7  and the average grey level value Avg R  are computed. Take the B window for example, the differences D B0 ˜D B7  between the pixels B 0 ˜B 7  and the average grey level value Avg B  are computed. 
         [0030]    Step  313   
         [0031]    Find the pixel with a maximum grey level difference value D max  and mark the location. For example, if the maximum value in D R0 ˜D R7  is D R1  then it is determined to be D max , and the pixel R 1  is marked. An edge is supposed to exist between the pixel R 1  and the pixel R t , since the pixel R 1  has a maximum value comparing with the average grey level value Avg R . 
         [0032]    Step  315   
         [0033]    Obtain an orthogonal window according to the information from the step  313 , and utilize the orthogonal window to perform weighting process in a direction toward the pixel with a maximum grey level difference value D max . For example, in the step  313 , the pixel R 1 , which has a maximum difference D R1  comparing with the average grey level value Avg is obtained. Then an orthogonal window such as a window comprising R 3 , R t , R 7 , is build according to a normal vector of a line connected by the pixels R 1  and R t . 
         [0034]    Step  317   
         [0035]    Compute an edge parameter ED. 
         [0036]    Such edge parameter ED indicates the edge intensity of the direction that the orthogonal window processes toward. A larger value indicates that the image has an apparent edge in this direction (or called a strong edge). Oppositely, a smaller value indicates that the image has an unapparent edge in this direction (or called a weak edge). The reason for computing such edge parameter ED is that noise or processing error easily occurs at edges. Accordingly, different weighting processing must be applied to apparent edges, unapparent edges or non edges, this processing will be described as follows: 
         [0037]    In this embodiment, a method for computing edge parameter is provided, which can be expressed as following Equation (1): 
         [0000]        ED=D   max /Avg   Equation (1) 
         [0038]    As described above, ED is edge parameter, D max  is the maximum grey level difference value, and Avg is the average grey level value. The reason for utilizing Equation (1) to indicate edge parameter is described as follows. An apparent edge may exist if the maximum grey level difference value D max  is larger than the average grey level value Avg. For example, a chair is located in front of a wall, then an apparent edge will exist at the interface of the chair and the wall, and the grey level of the pixels among the chair and the wall will have different values. Oppositely, an unapparent edge may exist, or no edge exists, if the maximum grey level difference value D max  is smaller than the average grey level value Avg. For example, there is no edge on a wall, and the grey level of the wall will have similar values. Therefore, an apparent edge can be determined to exist or not, according to a ratio between the D max  and Avg even both values are small, according to Equation (1). 
         [0039]    Please refer to  FIG. 4  to understand following steps, the step  317  in  FIG. 3  continues to the step  319  of  FIG. 4 . 
         [0040]    Step  319   
         [0041]    Determine whether the target pixel belongs to G pixel or one of R/B pixels. If belonging to G pixel, go to step  321 . If belonging to one of the R/B pixels, go to step  323 . 
         [0042]    Step  321   
         [0043]    Set a first threshold value Th 1  to an R/B threshold value, and compute a second threshold value Th 2  according to the first threshold value Th 1 . The setting of the threshold value will be described as follows. 
         [0044]    Step  323   
         [0045]    Set a first threshold value Th 1  to a G threshold value, and compute a second threshold value Th 2  according to the first threshold value Th 1 . The setting of the threshold value will be described as follows. 
         [0046]    Generally speaking, the noise levels are different for G pixel and R/B pixel. Accordingly, different threshold values must be set according to the type of the target pixel (a G pixel or an R/B pixel). The noise level for R/B pixel is always larger than which of the G pixel, thus the threshold value of the R/B pixel is preferably larger than which of the G pixel. In this embodiment, the second threshold value Th 2  equals to first threshold value Th 1  subtracting an offset value, which can be generated according to the state of edge. Besides, it should be noted that the first and second in the specification and following claims of the present application indicate that they are different signals or parameters instead of indicating the order thereof. 
         [0047]    Step  325   
         [0048]    Determine whether the edge parameter ED is smaller than the second threshold value Th 2 . If yes, go to step  327 . If no, go to step  329 . 
         [0049]    Step  327   
         [0050]    Utilize the third weighting value and an orthogonal window in the step  315  to perform weighting processing to the pixels in the orthogonal window. In this embodiment, it indicates no edge exist if the edge parameter ED is smaller than the second threshold value Th 2 . Thus, a weighting value suitable for the non edge region is applied in this case. 
         [0051]    Step  329   
         [0052]    Determine whether the edge parameter ED is smaller than the first threshold value Th 1 . If yes, go to step  333 . If not, go to step  331 . 
         [0053]    Step  331   
         [0054]    Utilize the first weighting value and the orthogonal window in the step  315 , to perform weighting processing to the pixels in the orthogonal window. In this embodiment, an apparent edge (or called a strong edge) may exists if the edge parameter ED is larger than the first threshold value Th 1 . Thus, a weighting value suitable for the apparent edge region is applied in this case. 
         [0055]    Step  333   
         [0056]    Utilize the second weighting value and the orthogonal window in the step  315 , to perform weighting processing to the pixels in the orthogonal window. In this embodiment, an unapparent edge (or called a weak edge) may exists if the edge parameter ED is larger than the first threshold value Th 1 . Thus, a weighting value suitable for the unapparent edge region is applied in this case. 
         [0057]    The weighting function according to the embodiment of the present invention will be described as follows. The weighting function is utilized in steps  327 ,  331  and  333  to compute weighted grey level value. The pixels Ri, R 3  and R 7  shown in  FIG. 2   a  are taken as example for description: 
         [0000]      Weighted grey level value  R   t &#39; of the target pixel  =W   t *( R   7   +R   3 )+(1− W   t )* R   t   =W   t ( R   7   +R   3   −R   t ) +R   t    Equation (2) 
         [0058]    The weighted grey level value from equation (2) can be applied to all R pixels in the orthogonal window of the step  315 , to increase noise elimination. However, in another embodiment, such weighted grey level value can be applied to the target pixel R t  only. 
         [0059]    In one embodiment, the third weighting value in the step  327  can be 0, that is, W t =0. Since the edge parameter ED is smaller than the second threshold value Th 2 , it is inferred that the Bayer pattern does not exist any edge (i.e. the region is non edge region). Thus, the grey level value of the target pixel R t  is not needed to be amended, the weighted grey level value R t &#39; can be directly set to the grey level value of the target pixel R t . 
         [0060]    In one embodiment, the first weighting value in the step  331  is 0.9, that is, W t =0.1. Since the edge parameter ED is larger than the first threshold value Th 1 , it is inferred that an apparent edge exists between the target pixel R t  and the pixel R 1  (i.e. the region is a strong edge region). Accordingly, the amendment grey level value of the target pixel R t  has a close relation ship with the grey level values of pixels R 3  and R 7 . 
         [0061]    In one embodiment, the second weighting value in the step  333  is 0.3, that is, W t =0.3. Since the edge parameter ED is between the first threshold value Th 1  and second threshold value Th 2 , it is inferred that an unapparent edge exists between the target pixel R t  and the pixel R 1  (i.e. the region is a weak edge region). Accordingly, the grey level values of pixels Rt, R 3  and R 7  can be referred when amend the grey level value of the target pixel R t . 
         [0062]    It should be noted that the Equation (2) is not limited to be applied to R pixel, other pixels such as B pixel or G pixel can be applied to Equation (2). Also, the first, the second, and the third weighting values are not limited to 0, 0.9, and 0.3. 
         [0063]    It should be noted that above-mentioned embodiment is only for example and does not meant to limit the scope of the present application. For example, the above mentioned embodiments can be utilized to other patterns besides the Bayer pattern, and other pixels besides RGB pixels such as YUV or other pixels. Besides, it is not limited that different regions must be utilized to process different types of pixels, that is, the steps  303 ,  305  and  307  can be omitted. Additionally, it is not limited that different threshold values must be utilized to process different types of pixels, that is, steps  319 ,  321  and  323  can be omitted. Additionally, it is not limited that two threshold values must be utilized to separate the strong edge region, the weak edge region and the non edge region. For example, steps  329  and  33  can be omitted and only the non edge region (step  227 ) and the edge region (step  331 ) are classified. Alternatively, the step  327  can be omitted and only the strong edge region (step  331 ) and the weak edge region (step  333 ) are classified. Such variation should also be included in the scope of the present invention. 
         [0064]    Please refer to  FIG. 1  again, a noise omitting module can be applied for implementation when the above-mentioned method embodiments are applied to the image processing system  100  shown in  FIG. 1 . Such noise omitting module can be located between the analog to digital converter  105  and the image processing module  107 , or beyond the image processing module  107 . 
         [0065]    According to above mentioned embodiment, a plurality of edge parameters can be computed and weighting operations with different weighting values are performed to different edges, such that the noise can be reduced. 
         [0066]    Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.