What is the best filter for removing Gaussian noise without destroying the edges? I am using the standard Lena images with additive Gaussian noise and I want to denoise before applying anisotropic diffusion. I don't want to median filter because edges become blurred. I tried adaptive filtering but results were not satisfactory.
You might need to consider more advanced techniques. Here are two recent papers on edge-preserving denoising:
Edge-Preserving Image Denoising via Optimal Color Space Projection [in color] This paper preserves edges by decomposing the image into an "optimal" color space and performing wavelet shrinkage. The optimal color space belongs to the luminance/color-difference family (think L*a*b*, or YCrCb).
Edge Structure Preserving Image Denoising From the paper:
Our method is based on [jump regression analysis], and consists of three major steps, outlined below. First, edge pixels are detected in the whole design-space by an edge detector. Second, in a neighborhood of a given pixel, a piecewise-linear curve is estimated from the detected edge pixels by a simple but efficient algorithm, to approximate the underlying edge segment in that neighborhood. Finally, observed image intensities on the same side of the estimated edge segment, as the given pixel, are averaged by the local linear kernel smoothing procedure (cf., ), for estimating the true image intensity at the given pixel.
(Jump regression models incorporate discontinuities using step functions. The primary author has a book on this subject.)
As a starting point I would use a non-linear shrinkage technique with a some kind of wavelet transform (though they are not specific to wavelet transforms). Shrinkage rules are conceptually simple, fast and easy to implement, whilst yielding excellent results.
The premise is that your desired signal can be represented in some domain such that most of the energy is concentrated in to a small number of coefficients. Conversely, the noise is still spread out over all the coefficients (which it likely is for AWGN). You can then "shrink" the coefficients - reducing their values according to some non-linear rule - such that the impact on the signal is small compared to the impact on the noise.
Wavelet transforms are a good transform to use because they are good at compressing the energy into small number of coefficients. I personally recommend the Dual-tree complex wavelet transform (DTCWT) for its additional nice properties.
2 very good papers on the topic are this and this (both from the same authors). The papers are a real treat in terms of their readability and clarity of explanation. (also there are nice pictures of Lenna being denoised :)
There are certainly more recent papers, but they typically don't add much quantitative improvement over the very simple techniques described in those papers.
While every signal processing challenge there is no one fits all solution here is an idea:
- since you are trying to preserve the edges find out where they are in the image. Use a canny edge detector to find edges within your image.
- Dilate/Fatten the boundaries of the edges outputted from the image (maybe 2-5 pixels wide for each edge) lets call this the "mask"
- invert the mask.
- Apply the mask to your image, i.e., only let items that are NOT edges through.
- apply de-gaussing technique
- use the original edge mask to get the image pixel values where there ARE edges
- Place them back into the de-gaussed image
alternatively, you can apply your De-gaussing technique to the image as a whole and then just reintroduce the un-de-gaussed pixels back into the image.