A Comparison of Noise Reduction Algorithms

Tutorial by Juan Conejero (PTeam)

This document is an adaptation of several tutorials posted by the author on PixInsight Forum in May of 2013.
Original forum thread.


There are plenty of comparisons on the web for different image processing tools and algorithms, and neither PixInsight nor noise reduction are exceptions. Usually such comparisons consist of attempts to process image data from uncontrolled sources with different tools and techniques applied by users with varying levels of expertise. While these exercises may be of popular interest, they should not be taken into account, in general, to draw valid conclusions about the applied tools and techniques.

In this tutorial we are going to compare all noise reduction tools available in PixInsight in a more rigorous and formal way. We'll use synthetic images that pose well-known difficult problems for noise reduction: the double gradient image, and a sample of large-scale simplex noise. My intention is to expose the strong and weak points of each algorithm by evaluation of the achieved noise reduction results under two main criteria: preservation of significant image structures and efficiency of noise removal.

The Double Gradient

Figure 1— The double gradient image.

The double gradient consists of two concentric squares filled with opposite linear gradients. It can be generated very easily in PixInsight with the following PixelMath expression, executed either globally to generate a new image, or locally on an image of the desired dimensions:

iif( X() < 0.25 || X() > 0.75 || Y() < 0.25 || Y() > 0.75, X(), 1 - 2*(X() - 0.25) )

When synthetic noise is added to this image, the result is an ill-posed problem for noise reduction, and is particularly well suited to show the weaknesses—and comparatively, the strong points—of different noise reduction algorithms. Figure 2 shows the double gradient with a 25% of uniform noise added with the NoiseGenerator tool in PixInsight. This is the initial image that I have used in this test.

Figure 2— The test image: the double gradient with additive uniform noise.

I have tried all the noise reduction tools available on the PixInsight platform as of writing this tutorial (May 2013), trying to do my best by fine tuning parameters to achieve the best possible result in each case. The next two figures show the denoised images enlarged 2:1 without interpolation.






Figure 3— Noise reduction results.

This is my interpretation of these results:

  • TGVDenoise is the absolute winner. It has been able to recover the original gradients almost perfectly with minimal generation of artifacts. Its superior result is clear and admits no discussion.
  • The result of ACDNR has been a nice surprise for me, since I designed and implemented the ACDNR algorithm back in 2005.
  • The multiscale median transform (MMT) is a powerful tool for denoising and ringing-free sharpening of linear and nonlinear images, but it has two main limitations: Our implementation of MMT is not particularly good at reproducing sharp corners because it uses circular structuring elements to preserve isotropy, and median filters are not very good at reproducing smooth gradients. The next generation of MMT that we'll implement during the 1.8 version cycle combines the à trous wavelet transform for smooth regions and the MMT for significant structures, taking the best from each algorithm, so it will pass this test much better.
  • The GREYCstoration algorithm yields a decent result, but it generates significant artifacts around the edges of the inner square (also at the right border of the image), and does not remove the noise on smooth regions as efficiently as the preceding tools. I spent a long time trying to improve this result, but this is the best one I was able to achieve. Perhaps somebody with more practice—admittedly, I don't use this tool very often—would be able to get something better.
  • The à trous (with holes) wavelet transform, also known as starlet transform recently, is a fundamental processing workhorse of great efficiency where isotropy and smoothness are two characteristic properties of the data, as happens with most deep-sky astronomical images. The inability of ATWT to isolate strong small-scale structures—something that MMT can do much better—becomes evident in the double gradient problem: When enough wavelet coefficients are removed to yield a smooth result, the edges of the inner square cannot be preserved because they penetrate the whole transform as a gun shot.

At the end of this tutorial you'll find links to PixInsight projects that you can download to reproduce these results.

Simplex Noise

This is a completely different noise reduction problem, this time with a synthetic image generated with the SimplexNoise tool in PixInsight.

Figure 5— A sample of large-scale simplex noise.

Simplex noise is a texture generation algorithm created by Ken Perlin in 2001. It is similar to Perlin noise, but much faster. I implemented a barebones simplex noise generation tool in PixInsight back in 2007. If you are interested in this topic, this slide show from the author is very interesting to understand how all of this stuff works, with some historical background. By all means, exploring Ken Perlin's website is obligatory if you are interested in anything related to computer graphics.

Despite the fact that PixInsight's implementation of simplex noise is very basic, one can do quite interesting things with this tool in two minutes, as the fancy planet rendition shown in Figure 6.

Figure 6— A rendition generated with SimplexNoise, CurvesTransformation and the Spherize script.

Returning to the subject of noise reduction, the image in Figure 7 is the simplex noise sample of Figure 5 with a mix of Gaussian and Poisson noise added with the NoiseGeneration tool, enlarged 2:1 without interpolation.

Figure 7— The simplex noise sample of Figure 5 with additive Gaussian and Poisson noise.

The noise has been added masked with the image itself. The result is an attempt to simulate the distribution of noise in a typical deep-sky image, with the purpose of testing the noise reduction algorithms on a smooth target. This simulation lacks small-scale image structures such as stars and ionization front edges, but my purpose is to provide a complementary test to the first one with the double gradient image. The next figures show the achieved results.






Figure 8— Noise reduction results.

Again, all the tools have been applied without masks (not even ACDNR's built-in mask), trying to achieve the best possible result in each case.

The clear winner is TGVDenoise again. You may have to download the images and inspect them zoomed 4:1, or zoom in your browser window, to properly compare the results. As expected, ATWT performs extremely well for smooth targets. GREYCstoration also yields a very good result, but the strongest points of MMT and ACDNR definitely don't shine on smooth images without any edges like this one.

As happens with the double gradient image, this is a difficult target that tends to expose the weakest points of the most specialized algorithms. Some of these algorithms perform well for the double gradient and poorly for the simplex noise image (ACDNR), and vice versa (ATWT, GREYCstoration).

Bottom Line

I hope this will give you a more complete picture of the noise reduction tools that we have currently in PixInsight. The bottom line is that TGVDenoise seems to outperform everything else that we have implemented in a variety of contexts. Does this mean that TGVDenoise will replace all of the other noise reduction tools? Well, not actually, since the other tools, especially MultiscaleMedianTransform and ATrousWaveletTransform, can be very efficient and controllable for specific applications, but definitely TGVDenoise is the best general-purpose noise reduction tool that we have seen so far.

Test Project Files

Use the following links to download PixInsight project bundles (.xosm project files and their corresponding data folders) with the images and processes that you can use to reproduce the comparisons in this tutorial. If you manage to improve what I have done with some of the algorithms tested here, please let me know.