# Patent

## Title
Image processing apparatus and method

## Abstract

The invention discloses an image processing apparatus and method. The method of the invention first splits the image into a green color plane, a red color plane and a blue color plane. Afterward, each one of the green color plane, the red color plane and the blue color plane is sequentially masked by a working window, such that each of the pixels on the one color plane is sequentially located at the center of the working window and referred to as a central pixel. Then, the pixels other than the central pixel in the working window are classified into edge pixels and non-edge pixels. Finally, a filtered central pixel is calculated according to a formula, and the central pixel is replaced with the filtered central pixel, whereby the noises of the image remained in the CFA domain are suppressed.

## Background
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention is related to an image processing apparatus and method and, more particularly, to an image processing apparatus and method for noise suppression.
2. Description of the Prior Art
In a digital imaging system such as digital camera or digital video camera, raw images of an object/scene captured from a sensing or capture device are often subject to various types of “noise” (elements not present in the object or environment which may nonetheless appear in the image). The presence of noise in an image is perhaps caused by the characteristics of the imaging system, such as the sensor, or processing steps subsequent to the initial image capture, which may add noise while trying to achieve a different purpose. The properties and characteristics that would identify a pixel or a region of pixels as “noisy” and the properties that would identify a pixel or a region of pixels as an edge or a fine detail of the image are difficult to distinguish. Thus, the noise inhibiting methods of the prior arts often remove the edge or detail pixels or region of pixels of the image, and therefore a blurring effect occurs within that region of the image, and lowers the quality of the image. In addition, in color images, the blurring effect leads to a bleeding of one color across the edge to another pixel(s).
In the prior art, when the object/scene is imaged by a sensing or imaging device, such as a digital camera, the resultant image in captured into a CFA (Color Filter Array) bearing a particular color channel pattern. One oft-used pattern for capturing images is known as the Bayer pattern, which has color channels as follows,

G R G R G R G . . .

B G B G B G B . . .

G R G R G R G . . .

Thus, in a Bayer pattern CFA, each pixel location has an intensity value associated only with one of the three color planes (Green, Red and Blue) which combine to make a full color. The process of estimating the two missing color components for each pixel location is known in the art as color interpolation. The interpolation of color often precedes the removal of noise in color mages due to the fact that most traditional noise reduction or removal techniques are designed to operate upon images with full color pixel information. The process of color interpolation itself will introduce noises, such that the original captured image noise may be blended with other noises and may perhaps lose the distinction of being noises and gain the distinction of being an image feature.
Traditionally, performing noise removal on the full color pixels attained by the color interpolation process increases the memory and processing needs of the noise removal process by three times (since each pixel has thrice the resolution), and thus it is difficult and expensive to improve the noise removal in hardware. Other noise removal techniques attempt to reduce this burden by performing color space conversion after color interpolation into, for instance, the YUV space, where only the Y (chrominance) component is considered for noise removal, so as to reduce the burden of hardware. However, this too may propagate additional noise beyond that propagated by color interpolation and cannot be easily implemented in hardware as well.
Thus, there is a need for a noise reduction framework that will not only distinguish edge pixels from non-edge pixels, but also one that can work directly in the CFA image domain prior to any color interpolation, so as to increase the processing efficiency, and lower the hardware cost.
SUMMARY OF THE INVENTION
Accordingly, a scope of the invention is to provide an image processing apparatus and method. Particularly, the image processing apparatus and method of the invention can increase the efficiency of noise suppression and further reduce the hardware cost.
According to a preferred embodiment, the image processing method of the invention is used for the purpose of reducing noises of a captured or recorded image in a color filter array (CFA) domain. Furthermore, the method includes the following steps:
First of all, split the image into a green color plane, a red color plane and a blue color plane.
Sequentially masks each of the green color plane, the red color plane and the blue color plane with a working window such that each of the pixels of said one color plane is sequentially located at the center of the working window and referred to as a central pixel (Cc).
Furthermore, classify the pixels other than the central pixel in the working window into N edge pixels (Cedge,i) and M non-edge pixels (Cnon,j), N and M both are integers larger than 1, i is an integer index ranging from 1 to N, and j is an integer index ranging from 1 to M.
Finally, calculate a filtered central pixel (Cfc) according to the following formula, and replaces the central pixel (Cc) with the filtered central pixel (Cfc):




  
    C
    fc
  
  =
  
    
      
        
          
            
              C
              c
            
            +
            
              
                ∑
                
                  i
                  =
                  1
                
                N
              
              ⁢
              
                
                  
                    C
                    
                      edge
                      ,
                      i
                    
                  
                  ·
                  WEI
                
                ⁢
                
                  
                
                ⁢
                2
                ⁢
                
                  (
                  
                    
                    
                      
                        C
                        c
                      
                      -
                      
                        C
                        
                          edge
                          ,
                          i
                        
                      
                    
                    
                  
                  )
                
              
            
            +
          
        
      
      
        
          
            
              ∑
              
                j
                =
                1
              
              M
            
            ⁢
            
              
                
                  C
                  
                    non
                    ,
                    j
                  
                
                ·
                WEI
              
              ⁢
              
                
              
              ⁢
              1
              ⁢
              
                (
                
                  
                  
                    
                      C
                      c
                    
                    -
                    
                      C
                      
                        non
                        ,
                        j
                      
                    
                  
                  
                
                )
              
            
          
        
      
    
    
      1
      +
      
        
          ∑
          
            i
            =
            1
          
          N
        
        ⁢
        
          WEI
          ⁢
          
            
          
          ⁢
          2
          ⁢
          
            (
            
              
              
                
                  C
                  c
                
                -
                
                  C
                  
                    edge
                    ,
                    i
                  
                
              
              
            
            )
          
        
      
      +
      
        
          ∑
          
            j
            =
            1
          
          M
        
        ⁢
        
          WEI
          ⁢
          
            
          
          ⁢
          1
          ⁢
          
            (
            
              
              
                
                  C
                  c
                
                -
                
                  C
                  
                    non
                    ,
                    j
                  
                
              
              
            
            )
          
        
      
    
  




wherein WEI1 is a first distribution function, and WEI2 is a second distribution function.

Accordingly, the noises of the captured or recorded image remained in the CFA domain can be suppressed.
According to another preferred embodiment, the image processing apparatus of the invention is also used for reducing noises of a captured or recorded image in a CFA domain. The image processing apparatus includes a storage unit and an image processing unit.
The storage unit is used for separately receiving a green color plane, a red color plane and a blue color plane of the image.
The image processing unit is coupled to the storage unit, for sequentially masking a working window on each of the green color plane, the red color plane and the blue color plane, such that each of the pixels of said one color plane is sequentially located at the center of the working window and referred to be as a central pixel (Cc).
The image processing unit also classifies the pixels other than the central pixel in the working window into N edge pixels (Cedge,i) and M non-edge pixels (Cnon,j), N and M both are integers larger than 1, i is an integer index ranging from 1 to N, and j is an integer index ranging from 1 to M.
Furthermore, the image processing unit calculates a filtered central pixel (Cfc) according to the following formula, and replaces the central pixel (Cc) by the filtered central pixel (Cfc):




  
    C
    fc
  
  =
  
    
      
        
          
            
              C
              c
            
            +
            
              
                ∑
                
                  i
                  =
                  1
                
                N
              
              ⁢
              
                
                  
                    C
                    
                      edge
                      ,
                      i
                    
                  
                  ·
                  WEI
                
                ⁢
                
                  
                
                ⁢
                2
                ⁢
                
                  (
                  
                    
                    
                      
                        C
                        c
                      
                      -
                      
                        C
                        
                          edge
                          ,
                          i
                        
                      
                    
                    
                  
                  )
                
              
            
            +
          
        
      
      
        
          
            
              ∑
              
                j
                =
                1
              
              M
            
            ⁢
            
              
                
                  C
                  
                    non
                    ,
                    j
                  
                
                ·
                WEI
              
              ⁢
              
                
              
              ⁢
              1
              ⁢
              
                (
                
                  
                  
                    
                      C
                      c
                    
                    -
                    
                      C
                      
                        non
                        ,
                        j
                      
                    
                  
                  
                
                )
              
            
          
        
      
    
    
      1
      +
      
        
          ∑
          
            i
            =
            1
          
          N
        
        ⁢
        
          WEI
          ⁢
          
            
          
          ⁢
          2
          ⁢
          
            (
            
              
              
                
                  C
                  c
                
                -
                
                  C
                  
                    edge
                    ,
                    i
                  
                
              
              
            
            )
          
        
      
      +
      
        
          ∑
          
            j
            =
            1
          
          M
        
        ⁢
        
          WEI
          ⁢
          
            
          
          ⁢
          1
          ⁢
          
            (
            
              
              
                
                  C
                  c
                
                -
                
                  C
                  
                    non
                    ,
                    j
                  
                
              
              
            
            )
          
        
      
    
  




wherein WEI1 is a first distribution function, and WEI2 is a second distribution function.

Accordingly, the noises of the captured or recorded image remained in the CFA domain can be suppressed by the image processing apparatus of the invention.



BRIEF DESCRIPTION OF THE APPENDED DRAWINGS
FIG. 1 shows a flow chart of the image processing method of an embodiment of the invention.
FIG. 2A illustrates the green color plane masked by the working window of an embodiment of the invention.
FIG. 2B illustrates the red color plane masked by the working window of an embodiment of the invention.
FIG. 2C illustrates the blue color plane masked by the working window of an embodiment of the invention.
FIG. 3A shows the first Rayleigh distribution function of the invention.
FIG. 3B shows the second Rayleigh distribution function of the invention.
FIG. 4A shows the first step function simplified from the first Rayleigh distribution function of FIG. 3A.
FIG. 4B shows the second step function simplified from the second Rayleigh distribution function of FIG. 3B.
FIG. 5 is a functional block of the image processing apparatus of an embodiment of the invention.



DETAILED DESCRIPTION OF THE INVENTION
The present invention provides an image processing apparatus and method for effectively suppressing noise of image. The preferred embodiments are disclosed as below.
Please refer to FIG. 1, which shows a flow chart of the image processing method of an embodiment of the invention. The image processing method can be applied for reducing noises of a captured or recorded image in a color filter array (CFA) domain. Particularly, the CFA is arranged in a Bayer pattern.
As shown in FIG. 1, the method includes the following steps:
Step S51, capture or record an image.
Step S53, split the captured or recorded image to a green color plane, a red color plane, and a blue color plane.
Step S55, for the green color plane, the red color plane, and the blue color plane, sequentially mask a working window on each of the color planes such that each of the pixels of each color plane is sequentially located at the center of the working window and referred to as a central pixel (Cc).
Step S57, classify the pixels other than the central pixel in the working window into N edge pixels (Cedge,i) and M non-edge pixels (Cnon,j). Both N and M are integers larger than 1, i is an integer index ranging from 1 to N, and j is an integer index ranging from 1 to M.
Step S59, calculate a filtered central pixel (Cfc) according to the following equation, and replace the central pixel (Cc) with the filtered central pixel (Cfc):




  
    
      
        
          C
          fc
        
        =
        
          
            
              
                
                  
                    C
                    c
                  
                  +
                  
                    
                      ∑
                      
                        i
                        =
                        1
                      
                      N
                    
                    ⁢
                    
                      
                        
                          C
                          
                            edge
                            ,
                            i
                          
                        
                        ·
                        WEI
                      
                      ⁢
                      
                        
                      
                      ⁢
                      2
                      ⁢
                      
                        (
                        
                          
                          
                            
                              C
                              c
                            
                            -
                            
                              C
                              
                                edge
                                ,
                                i
                              
                            
                          
                          
                        
                        )
                      
                    
                  
                  +
                
              
            
            
              
                
                  
                    ∑
                    
                      j
                      =
                      1
                    
                    M
                  
                  ⁢
                  
                    
                      
                        C
                        
                          non
                          ,
                          j
                        
                      
                      ·
                      WEI
                    
                    ⁢
                    
                      
                    
                    ⁢
                    1
                    ⁢
                    
                      (
                      
                        
                        
                          
                            C
                            c
                          
                          -
                          
                            C
                            
                              non
                              ,
                              j
                            
                          
                        
                        
                      
                      )
                    
                  
                
              
            
          
          
            
              
                
                  1
                  +
                  
                    
                      ∑
                      
                        i
                        =
                        1
                      
                      N
                    
                    ⁢
                    
                      WEI
                      ⁢
                      
                        
                      
                      ⁢
                      2
                      ⁢
                      
                        (
                        
                          
                          
                            
                              C
                              c
                            
                            -
                            
                              C
                              
                                edge
                                ,
                                i
                              
                            
                          
                          
                        
                        )
                      
                    
                  
                  +
                
              
            
            
              
                
                  
                    ∑
                    
                      j
                      =
                      1
                    
                    M
                  
                  ⁢
                  
                    WEI
                    ⁢
                    
                      
                    
                    ⁢
                    1
                    ⁢
                    
                      (
                      
                        
                        
                          
                            C
                            c
                          
                          -
                          
                            C
                            
                              non
                              ,
                              j
                            
                          
                        
                        
                      
                      )
                    
                  
                
              
            
          
        
      
    
    
      
        [
        
          Equation
          ⁢
          
            
          
          ⁢
          1
        
        ]
      
    
  




wherein WEI1 is a first distribution function, and WEI2 is a second distribution function.

Please refer to FIG. 2, which illustrates the color plane masked by the working window 20 of an embodiment of the invention. As shown in FIG. 2, the above-mentioned captured or recorded image is split into a green color plane (FIG. 2A), a red color plane (FIG. 2B), and a blue color plane (FIG. 2C), and each of the three color planes is masked by the working window 20.
Furthermore, the area masked by the working window 20 on the green color plane contains total thirteen pixels from G1 to G12 and the central pixel Gc. Moreover, among the thirteen pixels, pixels G2, G6, G7, and G11 are classified as edge pixels, whereas pixel G1, G3, G4, G5, G8, G9, G10, and G12 are classified as non-edge pixels. Therefore, according to the method of the invention, the central pixel Gc is calculated by the above-mentioned [Equation 1] as a filtered central Gfc:

Gfc={Gc+[G1·WEI1(|Gc−G1|)]+[G2·WEI2(|Gc−G2|)]+[G3·WEI1(|Gc−G3|)]+[G4·WEI1(|Gc−G4|)]+[G5·WEI1(|Gc−G5|)]+[G6·WEI2(|GcG6|)]+[G7·WEI2(|Gc−G7|)]+[G8·WEI1(|Gc−G8|)]+[G9·WEI1(|Gc−G9|)]+[G10·WEI1(|Gc−G10|)]+[G11·WEI2(|Gc−G11|)]+[G12·WEI1(|Gc−G12|)]}/{1+WEI1(|Gc−G1|)+WEI2(|Gc−G2|)+WEI1(|Gc−G3|)+WEI1(|Gc−G4|)+WEI1(|Gc−G5|)+WEI2(|Gc−G6|)+WEI2(|Gc−G7|)+WEI1(|Gc−G8|)+WEI1(|Gc−G9|)+WEI1(|Gc−G10|)+WEI2(|Gc−G11|)+WEI1(|Gc−G12|)}

Furthermore, other pixels on the green color plane are sequentially calculated to obtain the filtered pixel value thereof by the calculating method described above.
In addition, the area masked by the working window 20 on the red color plane of FIG. 2B contains total nine pixels from R1 to R8 and the central pixel Rc. Moreover, among the nine pixels, pixels R2, R4, R5, and R7 are classified as edge pixels, whereas pixels R1, R3, R6, and R8 are classified as non-edge pixels. Therefore, according to the method of the invention, the central pixel Rc is calculated by the above-mentioned [Equation 1] as a filtered central Rfc:

Rfc={Rc+[R1·WEI1(|Rc−R1|)]+[R2·WEI2(|Rc−R2|)]+[R3−WEI1(|Rc−R3|)]+[R4·WEI2(|Rc−R4|)]+[R5·WEI2(|Rc−R5|)]+[R6·WEI1(|Rc−R6|)]+[R7−WEI2(|Rc−R7|)]+[R8·WEI1(|Rc−R8|)]}/{1+WEI1(|Rc−R1|)+WEI2(|Rc−R2|)+WEI1(|Rc−R3|)+WEI2(|Rc−R4|)+WEI2(|Rc−R5|)+WEI1(|Rc−R6|)+WEI2(|Rc−R7|)+WEI1(|Rc−R8|)}

Similarly, other pixels on the red color plane are sequentially calculated to obtain the filtered pixel value thereof by the calculating method described above.
Furthermore, the area masked by the working window 20 on the blue color plane of FIG. 2C contains total nine pixels from B1 to B8 and the central pixel Bc. Among the nine pixels, pixels R2, R4, R5, and R7 are classified as edge pixels, whereas pixels R1, R3, R6, and R8 are classified as non-edge pixels. Therefore, according to the method of the invention, the central pixel Bc is calculated by the above-mentioned [Equation 1] as a filtered central Bfc:

Bfc={Bc+[B1·WEI1(|Bc·B1|)]+[B2·WEI2(|Bc−B2|)]+[B3·WEI1(|Bc−B3|)]+[B4·WEI2(|Bc−B4|)]+[B5·WEI2(|Bc−B5|)]+[B6·WEI1(|Bc−B6|)]+[B7·WEI2(|Bc−B7|)]+[B8·WEI1(|Bc−B8|)]}/{1+WEI1(|Bc−B1|)+WEI2(|Bc−B2|)+WEI1(|Bc−B3|)+WEI2(|Bc−B4|)+WEI2(|Bc−B5|)+WEI1(|Bc−B6|)+WEI2(|Bc−B7|)+WEI1(|Bc−B8|)}

Similarly, other pixels on the blue color plane are sequentially calculated to obtain the filtered pixel value thereof by the calculating method described above.
In an embodiment, both the first distribution function and the second distribution function are Rayleigh distribution functions. Please refer to FIG. 3, which shows the Rayleigh distribution functions of the invention. In FIG. 3, the cross axle represents the modulus of the deviation of the central pixel and other pixels; and the vertical axle represents the value of the Rayleigh distribution function with the modulus. In the embodiment, when the other pixels belong to non-edge pixels, the Rayleigh distribution function (the first distribution function) as shown in FIG. 3A is applied, and when the other pixels belong to edge pixels, the Rayleigh distribution function (the second distribution function) as shown in FIG. 3B is applied.
Furthermore, in practice, the first distribution function and the second distribution function can be implemented as a first step function and a second step function respectively by simplifying the Rayleigh distribution function. Please refer to FIG. 4A and FIG. 4B. FIG. 4A shows the first step function simplified from the first Rayleigh distribution function of FIG. 3A; and FIG. 4B shows the second step function simplified from the second Rayleigh distribution function of FIG. 3B. In practice, the first step function is suitable for calculating on the non-edge pixels; and the second step function is suitable for calculating the edge pixels.
Please note that the image processing method can optionally contain plural sets of the first distribution function and the second distribution function, for instance, sets of the first distribution function and the second distribution function for different ISO values, so as to increase the noise suppression efficiency.
By the above-mentioned methods, the present invention re-calculates the pixel value of each pixel of each color plane, based on the distinguish of the edge pixels and the non-edge pixels, and on the first distribution function and the second distribution, and replaces the original pixel value by the re-calculated pixel value, so as to suppress the noises of a captured or recorded image remained in the CFA domain.
Please refer further to FIG. 5, which shows a functional block of the image processing apparatus 1 of an embodiment of the invention. The image processing apparatus 1 is used for suppressing the noises of a captured or recorded image remained in the CFA domain. Particularly, the CFA is arranged in a Bayer pattern
As shown in FIG. 5, the image processing apparatus 1 includes an image capturing/recording unit 12, a splitting unit 14, a storage unit 16, and an image processing unit 18.
The image capturing/recording unit 12, such as CCD or CMOS sensing device, is used for capturing/recording the image. The splitting unit 14 is coupled to the image capturing/recording unit 12, for splitting the image into a green color plane, a red color plane, and a blue color plane. In addition, the storage unit 16 is coupled to the splitting unit 14, for separately receiving a green color plane, a red color plane and a blue color plane of the image.
Furthermore, the image processing unit 18 is coupled to the storage unit 16, for sequentially masking a working window on the green color plane, the red color plane, and the blue color plane, such that each pixel on each of the said color planes is sequentially located at the center of the working window and referred to as a central pixel (Cc). The image processing unit 18 also classifies the pixels other than the central pixel in the working window into N edge pixels (Cedge,i) and M non-edge pixels (Cnon,j). Both N and M both are integers larger than 1, i is an integer index ranging from 1 to N, and j is an integer index ranging from 1 to M.
Furthermore, the image processing unit 18 also calculates a filtered central pixel (Cfc) according to the above-mentioned [equation 1], and replaces the central pixel (Cc) with the filtered central pixel (Cfc). The image processing apparatus 1 can suppress the noises of the image remained in the CFA domain by the above-mentioned units.
Please note that the equation used for the image process apparatus 1 to calculate the filtered central pixel (Cfc) is the same as the above-mentioned [equation 1], and both the first distribution function and the second distribution function can also be Rayleigh distribution functions or step functions, thus, discussion of unnecessary details will be omitted.
In summary, the image processing apparatus and method of the invention can calculate the pixels (edge pixels and non-edge pixels) with different characteristics remained in the CFA domain by corresponding distribution functions, to reach the noise suppression effect. Furthermore, the image processing apparatus and method of the invention can increase the whole image processing efficiency and reduce the hardware cost. Particularly, the image processing apparatus and method of the invention can effectively suppress the noises in an image to increase the quality of the image, and can apply different distribution function according to different processing conditions to calculate the pixel value to reach the optimal effect.
With the example and explanations above, the features and spirits of the invention will be hopefully well described. Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teaching of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.

## Claims

1. An image processing method for reducing noises of a captured or recorded image in a color filter array (CFA) domain, said method comprising the steps of:
splitting the image into a green color plane, a red color plane and a blue color plane;
for each of the green color plane, the red color plane and the blue color plane, sequentially masking a working window on each of the color planes such that each pixel on each of the color planes is sequentially located at the center of the working window and referred to as a central pixel (Cc), and performing the steps of:
classifying the pixels other than the central pixel in the working window into N edge pixels (Cedge,i) and M non-edge pixels (Cnon,j), both N and M being integers larger than 1, i being an integer index ranging from 1 to N, j being an integer index ranging from 1 to M; and
calculating a filtered central pixel (Cfc) according to the following formula, and replacing the central pixel (Cc) with the filtered central pixel (Cfc):






  
    
      C
      fc
    
    =
    
      
        
          
            
              
                C
                c
              
              +
              
                
                  ∑
                  
                    i
                    =
                    1
                  
                  N
                
                ⁢
                
                  
                    
                      C
                      
                        edge
                        ,
                        i
                      
                    
                    ·
                    WEI
                  
                  ⁢
                  
                    
                  
                  ⁢
                  2
                  ⁢
                  
                    (
                    
                      
                      
                        
                          C
                          c
                        
                        -
                        
                          C
                          
                            edge
                            ,
                            i
                          
                        
                      
                      
                    
                    )
                  
                
              
              +
            
          
        
        
          
            
              
                ∑
                
                  j
                  =
                  1
                
                M
              
              ⁢
              
                
                  
                    C
                    
                      non
                      ,
                      j
                    
                  
                  ·
                  WEI
                
                ⁢
                
                  
                
                ⁢
                1
                ⁢
                
                  (
                  
                    
                    
                      
                        C
                        c
                      
                      -
                      
                        C
                        
                          non
                          ,
                          j
                        
                      
                    
                    
                  
                  )
                
              
            
          
        
      
      
        1
        +
        
          
            ∑
            
              i
              =
              1
            
            N
          
          ⁢
          
            WEI
            ⁢
            
              
            
            ⁢
            2
            ⁢
            
              (
              
                
                
                  
                    C
                    c
                  
                  -
                  
                    C
                    
                      edge
                      ,
                      i
                    
                  
                
                
              
              )
            
          
        
        +
        
          
            ∑
            
              j
              =
              1
            
            M
          
          ⁢
          
            WEI
            ⁢
            
              
            
            ⁢
            1
            ⁢
            
              (
              
                
                
                  
                    C
                    c
                  
                  -
                  
                    C
                    
                      non
                      ,
                      j
                    
                  
                
                
              
              )
            
          
        
      
    
  
  ;




wherein WEI1 is a first distribution function, and WEI2 is a second distribution function;
whereby the noises of the image remained in the CFA domain are suppressed.

2. The image processing method of claim 1, wherein the first distribution function is the Rayleigh distribution function, and the second distribution is another Rayleigh distribution function.

3. The image processing method of claim 2, wherein the first distribution function is implemented into a first step function, and the second distribution function is implemented into a second step function.

4. The image processing method of claim 1, wherein the CFA is arranged in a Bayer pattern.

5. An image processing apparatus for reducing noises of a captured or recorded image in a color filter array (CFA) domain, said image processing apparatus comprising:
a storage unit, for separately receiving a green color plane, a red color plane and a blue color plane of the image; and
an image processing unit, coupled to the storage unit, for each of the green color plane, the red color plane and the blue color plane, for sequentially masking a working window on each of the color planes such that each of the pixels on each of the color planes is sequentially located at the center of the working window and referred to as a central pixel (Cc), classifying the pixels other than the central pixel in the working window into N edge pixels (Cedge,i) and M non-edge pixels (Cnon,j), both N and M being integers larger than 1, i being an integer index ranging from 1 to N, j being an integer index ranging from 1 to M, and calculating a filtered central pixel (Cfc) according to the following formula, and replacing the central pixel (Cc) with the filtered central pixel (Cfc):





  
    
      C
      fc
    
    =
    
      
        
          
            
              
                C
                c
              
              +
              
                
                  ∑
                  
                    i
                    =
                    1
                  
                  N
                
                ⁢
                
                  
                    
                      C
                      
                        edge
                        ,
                        i
                      
                    
                    ·
                    WEI
                  
                  ⁢
                  
                    
                  
                  ⁢
                  2
                  ⁢
                  
                    (
                    
                      
                      
                        
                          C
                          c
                        
                        -
                        
                          C
                          
                            edge
                            ,
                            i
                          
                        
                      
                      
                    
                    )
                  
                
              
              +
            
          
        
        
          
            
              
                ∑
                
                  j
                  =
                  1
                
                M
              
              ⁢
              
                
                  
                    C
                    
                      non
                      ,
                      j
                    
                  
                  ·
                  WEI
                
                ⁢
                
                  
                
                ⁢
                1
                ⁢
                
                  (
                  
                    
                    
                      
                        C
                        c
                      
                      -
                      
                        C
                        
                          non
                          ,
                          j
                        
                      
                    
                    
                  
                  )
                
              
            
          
        
      
      
        1
        +
        
          
            ∑
            
              i
              =
              1
            
            N
          
          ⁢
          
            WEI
            ⁢
            
              
            
            ⁢
            2
            ⁢
            
              (
              
                
                
                  
                    C
                    c
                  
                  -
                  
                    C
                    
                      edge
                      ,
                      i
                    
                  
                
                
              
              )
            
          
        
        +
        
          
            ∑
            
              j
              =
              1
            
            M
          
          ⁢
          
            WEI
            ⁢
            
              
            
            ⁢
            1
            ⁢
            
              (
              
                
                
                  
                    C
                    c
                  
                  -
                  
                    C
                    
                      non
                      ,
                      j
                    
                  
                
                
              
              )
            
          
        
      
    
  
  ;




wherein WEI1 is a first distribution function, and WEI2 is a second distribution function;
whereby the noises of the image remained in the CFA domain are suppressed.

6. The image processing apparatus of claim 5, wherein the first distribution function the Rayleigh distribution function, and the second distribution is another Rayleigh distribution function.

7. The image processing apparatus of claim 6, wherein the first distribution function is implemented into a first step function, and the second distribution function is implemented into a second step function.

8. The image processing apparatus of claim 5, wherein the CFA is arranged in a Bayer pattern.