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.

  • 4
    $\begingroup$ Show some effort, what did you try? $\endgroup$
    – 0x90
    Feb 7 '12 at 6:35
  • 1
    $\begingroup$ Actually I have a standard lena image corrupted with gaussian noise. I want to remove dis noise before applying anisotropic diffusion. I dont want to go for median filtering because edges are blurred. Give some input. $\endgroup$ Feb 7 '12 at 6:58
  • 2
    $\begingroup$ stackoverflow.com/questions/8619153/… may help you $\endgroup$
    – 0x90
    Feb 7 '12 at 9:17
  • 1
    $\begingroup$ Not really an answer, but I found this link with a variety of papers on this very subject - trying to remove noise without getting rid of edge information. $\endgroup$
    – Spacey
    Feb 7 '12 at 21:46
  • 1
    $\begingroup$ Can you post some images and output, please, so that we better understand what a (non-)satisfactory result would look like? Why wouldn't you run anisotropic diffusion to denoise the image, for example? $\endgroup$
    – Jonas
    Mar 9 '12 at 16:43

You might need to consider more advanced techniques. Here are two recent papers on edge-preserving denoising:

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., [35]), 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.

  • $\begingroup$ These papers do not specifically address edge preservation; they are about generic image denoising. $\endgroup$
    – Emre
    Apr 20 '12 at 19:47
  • $\begingroup$ Well wavelets are inherently good at preserving edges. The nature of natural images is that most of the salient information is in the edges, so discussing edges as a special case is rather superfluous. Natural images are defined by the edges. $\endgroup$ Apr 20 '12 at 21:56
  • $\begingroup$ It is debatable whether conventional wavelets are especially good at preserving edges. This problem is one the motivations behind the plethora of extensions, including ridgelets, beamlets, curvelets, and contourlets. $\endgroup$
    – Emre
    Apr 20 '12 at 22:18
  • $\begingroup$ Indeed, wavelets have their issues which is actually why I suggested using something other than vanilla wavelets. Though it might be suggested I have a bias toward the DTCWT, it's not without good reason. Both those papers show impressive edge preservation. As does this paper (see figures 8 and 9 - comparing to the noisy images). $\endgroup$ Apr 20 '12 at 22:27

While every signal processing challenge there is no one fits all solution here is an idea:

  1. 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.
  2. Dilate/Fatten the boundaries of the edges outputted from the image (maybe 2-5 pixels wide for each edge) lets call this the "mask"
  3. invert the mask.
  4. Apply the mask to your image, i.e., only let items that are NOT edges through.
  5. apply de-gaussing technique
  6. use the original edge mask to get the image pixel values where there ARE edges
  7. 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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.