Method and system of eliminating color noises caused by an interpolation

A method and system of eliminating color noises caused by an interpolation, which performs an interpolation on a Bayer image obtained by an image sensor to restore red, green and blue colors of each pixel. Interpolated image is converted into a chromatic domain in order to rapidly use chroma pixel values of a pixel previously processed to eliminate color noises to update the original chroma pixel values in a median filter with 3×3 area of 2D, thereby increasing the color noise filtering capability of the median filter, and a low-pass filter is used to further eliminate the uneven effect of clustered color noises filtered out by the median filter.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates to the technical field of image processing and, more particularly, to a method and system of eliminating color noises caused by an interpolation.

2. Description of Related Art

A color image processing system essentially includes an image capturing unit, an image restoring and processing unit, an image display and an image compressor. The image capturing unit includes an image sensor, which is a sensitive device consisting of multiple photodiodes arranged in a 2D array and cooperates with a color filter array to thereby obtain a single color value for each pixel. The image restoring and processing unit applies an interpolation to each pixel for restoring red (R) color, blue (B) color and green (G) color of the pixel. The interpolation and restoration may cause obvious color spots at a boundary between white pixel and black pixel. In addition, when the image sensor is capturing source image data, the captured image data is likely to include noises, and the process of interpolation and restoration can also cause the noises to diffuse around the adjacent pixels.

A known median filter can be provided to reserve the edge information while noises are eliminated, so that an image does not appear any blur effect. Accordingly, the U.S. Pat. No. 5,778,106 uses a median filter to eliminate color noises of R-G and B-G However, the color noises caused in restoring by the interpolation appear in clusters. Therefore, a 2D median filter with a small range (such as 3×3) cannot effectively eliminate the color noises. A 2D median filter with a larger range (such as 7×7 or 9×9) can filter out the color noises but significantly increases the cost.

Therefore, it is desirable to provide an improved method and system to mitigate and/or obviate the aforementioned problems.

SUMMARY OF THE INVENTION

The object of the invention is to provide a method and system of eliminating color noises caused by an interpolation, so as to overcome the prior problem with color noises of cluster caused by an interpolation and reduce the cost of the typical 2D median filter.

According to a feature of the invention, there is provided a method of eliminating color noises of a digital image having plural pixels by producing a corrected red signal, a corrected green signal and a corrected blue signal for each pixel, the corrected red, green and blue signals generating a first corrected chroma signal and a second corrected chroma signal. The method includes the steps of: (A) receiving a target pixel and its adjacent pixels in the digital image; (B) interpolating the target pixel and the adjacent pixels to produce a red signal, a green signal and a blue signal for each of the target and adjacent pixels; (C) producing a first chroma signal and a second chroma signal based on the red signal, the green signal and the blue signal for each of the target and adjacent pixels; (D) performing a filtering process to thus produce a first filtered chroma signal and a second filtered chroma signal based on the first and second chroma signals of the target pixel, the first and second chroma signals of the adjacent pixels, and the first and second corrected chroma signals of the adjacent pixels; (E) computing the corrected red signal, the corrected green signal and the corrected blue signal for the target pixel based on the first filtered chroma signal, the second filtered chroma signal and the green signal; (F) producing the first corrected chroma signal and the second corrected chroma signal for the target pixel based on the corrected red signal, the corrected green signal and the corrected blue signal; and (G) repeating the steps (A) to (F) until each pixel of the digital image is processed.

According to another feature of the invention, there is provided a system of eliminating color noises of a digital image having plural pixels by producing a corrected red signal, a corrected green signal and a corrected blue signal for each pixel, the corrected red, green and blue signals generating a first corrected chroma signal and a second corrected chroma signal. The system includes: an interpolator, which receives a target pixel and its adjacent pixels in the digital image and interpolates the target pixel and the adjacent pixels to produce a red signal, a green signal and a blue signal for each of the target and adjacent pixels; a chroma generator, which is connected to the interpolator for producing a first chroma signal and a second chroma signal based on the red signal, the green signal and the blue signal for each of the target and adjacent pixels; a filter, which is connected to the chroma generator for producing a first filtered chroma signal and a second filtered chroma signal based on the first and second chroma signals of the target pixel, the first and second chroma signals of the adjacent pixels, and the first and second corrected chroma signals of the adjacent pixels; a corrector, which is connected to the interpolator and the filter for computing the corrected red signal, the corrected green signal and the corrected blue signal for the target pixel based on the first filtered chroma signal, the second filtered chroma signal and the green signal; and an update device, which is connected to the corrector for producing the first corrected chroma signal and the second corrected chroma signal for the target pixel based on the corrected red signal, the corrected green signal and the corrected blue signal. Other objects, advantages, and novel features of the invention will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1is a block diagram of a system of eliminating color noises caused by an interpolation according to the invention. As shown inFIG. 1, the system can eliminate color noises caused when an interpolation is performed on a digital image, to thus produce a correct red signal Rc, a correct green signal Gc and a correct blue signal Bc for a pixel (i, j). The digital image is preferably a Bayer image. The system includes an interpolator110, a chroma generator120, a filter130, a corrector140and an update device150.

The interpolator110receives the pixel (i, j) and its adjacent pixels in the digital image and interpolates the pixel (i, j) and the adjacent pixels to have a red signal, a green signal and a blue signal for each pixel.FIG. 2is a schematic diagram of an interpolation of the Bayer image according to the invention. As shown inFIG. 2, the pixels are arranged interlacingly in a form of GR-based row and BG-based row. Because each pixel of the Bayer image contains only red color, green color or blue color, the interpolator110uses an interpolation to reconstruct missing colors for each pixel, and accordingly outputs the respective red signal, the respective green signal and the respective blue signal.

The chroma generator120is connected to the interpolator110for producing a first chroma signal (R-G) and a second chroma signal (B-G) according to the red signal, the green signal and blue signal of a pixel such as the pixel (i, j).FIG. 3is a circuit diagram of the chroma generator120according to the invention. InFIG. 3, the chroma generator120includes a first subtractor121and a second subtractor122. The first subtractor121has a first input terminal to receive the red signal of pixel (i, j) and a second input terminal to receive the green signal, and subtracts its green signal from the red signal to thus obtain the first chroma signal (R-G). The second subtractor122has a first input terminal to receive the blue signal of pixel (i, j) and a second input terminal to receive its green signal, and subtracts the green signal from the blue signal to thus obtain the second chroma signal (B-G).

The filter130is connected to the chroma generator120for performing a filtering process on the first chroma signal (R-G) and the second chroma signal (B-G), to thus produce a first filtered chroma signal F(R-G) and a second filtered chroma signal F(B-G).FIG. 4is a block diagram of the filter130according to the invention. As shown inFIG. 4, the filter130includes a first median filter410, a first low pass filter (LPF)420, a second median filter430and a second LPF440.

The first median filter410performs a median filtering process on the first chroma signal (R-G). The first median filter410has one terminal to receive the first chroma signal (R-G) and the other terminal to receive a first corrected chroma signal (Rc-Gc). As shown inFIG. 5A, the first median filter410uses the corrected chroma signal (Rc-Gc), which is a chroma value of a pixel previously processed to eliminate color noises, to replace the original chroma value. The first median filter410arranges the first chroma signals (R-G) and the first corrected chroma signals (Rc-Gc) of the pixel (i, j) and adjacent pixels based on their values from small to large. For example, when the first chroma signals (R-G) and the first corrected chroma signals (Rc-Gc) of the pixel (i, j) and adjacent pixels are {135,140,163,157,160,155,150,142,140} and processed by the first median filter410, a sequence of {135,140,140,142,150,155,157,160,163} is produced.

The first LPF420is connected to the first median filter410in order to perform a low pass filtering process on the sequence to thus produce the first filtered chroma signal F(R-G). The first LPF420can have a coefficient of

[001464100]⁢/⁢16.
Namely, after the sequence {135,140,140,142,150,155,157,160,163} is further produced by the first LPF420, the first filtered chroma signal F(R-G) is produced to have a value of:
{140×1+142×4+150×6+155×4+157×1}/16.

The second median filter430performs a median filtering process on the second chroma signal (B-G). As shown inFIG. 5B, the second median filter430uses the corrected chroma signal (Bc-Gc), which is a chroma value of a pixel previously processed to eliminate color noises, to replace the original chroma value. The second LPF440is connected to the second median filter430for performing a low-pass filtering on a signal processed by the median filtering to thus produce the second filtered chroma signal F(B-G).

FIG. 6A-6Eare schematic diagrams of an operation of a median filter according to the invention. An arrangement based on values from small to large is performed on each row ofFIG. 6A(3×3=9 comparisons are required), so as to have a result shown inFIG. 6Bin which the original second row, {157,160,155}, is changed into {155,157,160}, and the original third row, {150,142,140}, is changed into {140,142,150}. Next, an arrangement based on the values from small to large is performed on each column ofFIG. 6B(3×3=9 comparisons are required), so as to have a result shown inFIG. 6Cin which the original first column, {135,155,140}, is changed into {135,140,155}, the original second column, {140,157,160}, is changed into {140,142,157}, and the original third column, {163,160,150}, is changed into {150,160,163}. Next, an arrangement based on values from small to large is performed on a diagonal ofFIG. 6C(3 comparisons are required), so as to have a result shown inFIG. 6Din which the original diagonal, {150,142,155}, is changed into {142,150,155}. Next, an arrangement based on values from small to large is performed on positions {Z2, Z3, Z4} and {Z6, Z7, Z8} ofFIG. 6D(3×2=6 comparison required), so as to have a result shown inFIG. 6Ein which the original positions {140,140,142} and {155,157,160} are arranged from small to large, and no change is taken. At last, an arrangement of {Z3mid, Z4max, Z5median, Z6min, Z7mid}, as shown in the upper part ofFIG. 6E, is performed. As such, the median filter only compares 9+9+3+6=27 times for completing the cited operation, which is fewer than 36 (8+7+6+5+4+3+2+1) times determined by using a bubble sorting algorithm for a typical median filter.

The corrector140is connected to the interpolator110and the filter130to compute a corrected red signal Rc, a corrected green signal Gc and a corrected blue signal Bc for the pixel (i, j) based on the first filtered chroma signal F(R-G), the second filtered chroma signal F(B-G) and the green signal (G).FIG. 7is a block diagram of the corrector140according to the invention. As shown inFIG. 7, the corrector140includes a first adder710and a second adder720. The first adder710adds the first filtered chroma signal F(R-G) and the green signal (G) produced by the interpolator110to thus produce the corrected red signal Rc. The second adder720adds the second filtered chroma signal F(B-G) and the green signal (G) produced by the interpolator110to thus produce the corrected blue signal Bc. The corrector140directly produces the corrected green signal Gc according to the green signal (G) produced by the interpolator110.

The update device150is connected to the corrector140for receiving the corrected blue signal Bc, the corrected red signal Rc and the corrected green signal Gc and accordingly producing the first corrected chroma signal (Rc-Gc) and the second corrected chroma signal (Bc-Gc).

In view of the foregoing, it is known that the invention converts the image into a chromatic domain and rapidly updates the chroma values of a pixel in the median filters with 3×3 area of 2D; namely, the chroma values {(Rc-Gc), (Bc-Gc)} of the pixel previously processed to eliminate color noises are used to replace the original chroma values {(R-G), (B-G)}. Therefore, for each 3×3 area of an image, four of nine chroma pixel values are processed to completely eliminating the color noises, so that the color filtering capability of a median filter is increased for a block with color noises of cluster, and an LPF is combined to further eliminate the uneven effect of the clustered color noises filtered out by the median filter.