1. Field of the Invention
The invention relates generally to the field of image processing. More specifically, the invention relates processing of images generated by a digital imaging device.
2. Description of the Related Art
In the art of image processing, raw images of an object/scene captured from a sensing or capture device are often subject to varying types of "noise" (elements not present in the object or environment which may nonetheless appear in the image). The noise present in an image may be due to 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 indicate that a pixel or region of pixels is "noisy" and the properties that would indicate a pixel or region of pixels is an edge or a fine detail of the image are difficult to distinguish. Thus, a fundamental problem with the removal of noise is that often a removal of what is indicated as noise may actually be a removal of fine edge or detail. If the fine detail or edge is removed, a blurring effect may occur within that region of the image further, in color images, the blurring effect leads to a bleeding of one color across the edge to another pixel(s). Noise removal procedures that were based upon linear filtering techniques suffered greatly from this malady and thus, a class of filtering techniques based on ranked order statistics such as the median were developed.
The median filter ranks in order the intensity values belonging to a pixel P (for which the filter is being applied) and pixels in a particular neighborhood or along a particular vector about a pixel P. For example, a median filter (applied in a particular direction(s) through the pixel to neighboring pixels) applied to sample values including and about the pixel P of {12, 13, 200, 50, 14} would first be ranked in order as {12, 13, 14, 118, 200}. The so-called uni-directional FIR median hybrid filter would replace the original pixel location P that had a value of 200 with the median of the sample set which is 14. Thus, the output vector, after the filter, would be: {12, 13, 14, 50, 14}. If the value 200 were in fact part of an edge rather than noise, the smoothing caused by applying the filter as shown in the output vector values would decimate the edge feature.
Several improved median filters have been developed to compensate for this problem. One particular such median filter, the multilevel FIR (Finite Impulse Response) median hybrid filter repeatedly takes the median filter in each direction about an image and applies at each filter the original input pixel. The multi-level median hybrid filter has averaging sub-filters that reduce the burden of sorting operations by averaging pixels in a particular filter direction, and then performing the median computation upon a smaller set of values, such as three. Thus, in a median hybrid filter, two neighboring west pixels would be averaged and the result fed to a median filter along with the average of two neighboring east pixels. The third input to the median filter is the pixel under consideration for noise removal. In other directions, a similar procedure is applied. In a three-level median hybrid filter, the first level pairs all such averaged neighboring pixels with vectors in opposing directions (north with south, etc.) and for each pair of direction averages (8 of them) feeds these into a median filter also along with the pixel of concern as a third input. The resulting median values of the first filter are again paired and along with the pixel of concern are input to a median filter. While median hybrid has been shown to work quite well in discriminating some edges, it is deficient in several respects with regard to edge detection. The median hybrid filter does not consider the noisiness of the edge itself In other words, an edge's direction, even though eight are employed, cannot be determined with exacting accuracy. For instance, an edge feature may lie at a 33 degree vector from a particular pixel, and thus the eight directions are inadequate in determining the edge feature. In other words, a single pixel may contain a portion that is edge and a portion that is non-edge in the non-discrete world that cannot be represented in the discrete world of digital images. When applied to digital images, the median hybrid filter, if applied everywhere to all pixels, may propagate noise or shift it from pixel to pixel while attempting to remove it since there is noise along the edge feature due to the non-cardinal direction of the edge. A curved edge is a perfect example of such a problem.
When an 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 . . . PA1 B G B G B G . . . PA1 G R G R G R . . .
with rows thereafter repeating the pattern.
Thus, in a Bayer pattern CFA, each pixel location has an intensity value associated only with one of the three color planes (Red, Green 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 images 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 noise, and in the case of a digital camera, where the color interpolation is most likely performed after image compression and download to a data processing system such as a computer, the intermediary steps of color resolution companding, compression (quantization and encoding) and decompression may add additional noise such that the original captured image noise may be blended with other noise to perhaps lose the distinction of being noise and gain the distinction of being an image feature. 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 a factor of 3 (since each pixel has thrice the resolution), and thus is difficult and expensive to implement 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. However, this too may propagate additional noise beyond that propagated by color interpolation and also cannot be easily be implemented in hardware.
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.