Philippe Bernhard has kindly uploaded a set of six linear images (http://pixinsight.com/forum/index.php?topic=5606.msg38424#msg38424) for us to test TGVDenoise out. In this first example I'm going to show how easily we can achieve a very good noise reduction when the data are excellent.
The original image is an integration of 20 light frames of the Gamma Cygni region:
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/01-tn.jpg) (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/01.jpg)
Click to view a full size version (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/01.jpg)
The six images that Philippe has uploaded are of excellent quality, as you'll see in the next screenshots. This is the linear output of the ImageIntegration process, so we need ScreenTransferFunction (STF) in order to see the image on the screen. For newbie users, the STF tool in PixInsight applies a histogram transformation to the data that are sent to the screen, but does not change the actual image. This way we can work with linear images without stretching them. This is very important because data linearity is necessary for some essential image processing algorithms and techniques, such as color calibration, background modeling and deconvolution. There are also some tools that can be applied to both linear and nonlinear images, but perform much better with linear data.
For noise reduction of linear images, it is very important to carefully adjust STF settings, so that we can see the background, and at the same time, bright areas without saturation. Usually the automatic STF stretch is too aggressive for this purpose. The next screenshot shows the original image enlarged 4:1 with the custom STF that I've used in this example.
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/02-tn.jpg) (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/02.png)
Click to view a full size version (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/02.png)
And without more preambles, this is the same area after TGVDenoise:
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/03-tn.jpg) (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/03.png)
Click to view a full size version (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/03.png)
As you probably have already discovered if you have tried out this tool, the default TGVDenoise parameters have been optimized for nonlinear images. For linear images, the default parameters are way too aggressive, and usually have to be lowered by one order of magnitude or even more.
Something that will cause some surprise is the fact that I haven't used a local support in this example. This will give you a better idea of the power of TGVDenoise: For images with relatively high SNR, this tool is able to remove virtually all of the noise, preserving significant structures remarkably well without any help from external data.
Once you get some experience with the tool, finding the correct parameters becomes very easy, especially for high-quality data. It has taken me about five minutes to achieve the noise reduction that I was looking for with this image. I'll show you the result on two additional previews for comparison.
Original image:
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/04-tn.jpg) (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/04.png)
Click to view a full size version (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/04.png)
After TGVDenoise:
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/05-tn.jpg) (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/05.png)
Click to view a full size version (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/05.png)
Original image:
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/06-tn.jpg) (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/06.png)
Click to view a full size version (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/06.png)
After TGVDenoise:
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/07-tn.jpg) (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/07.png)
Click to view a full size version (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/07.png)
And as usual, some crops of special interest zoomed 3:1 (left: original image, right: after TGVDenoise).
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/crop01-original.png) | (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/crop01-final.png) |
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/crop02-original.png) | (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/crop02-final.png) |
(http://forum-images.pixinsight.com/20130516/TGVDenoise/01/crop03-original.png) | (http://forum-images.pixinsight.com/20130516/TGVDenoise/01/crop03-final.png) |
Now this image can be printed at a size of 1 meter by 80 cm at 300 dpi without problems (about 40 x 30 inches), and navigating through it onscreen zoomed 4x is a real joy.
Thank you Philippe for allowing me to work with your nice data.
Hi Philippe,
For noise reduction of linear images, the STF is critical. In your tests, you've used a much more aggressive STF than the one I used in my example. It's not that your STF is incorrect, by no means; it's just that it reveals much more noise in low-SNR areas of the image, as a result of a stronger nonlinear stretch.
I have tried to emulate the STF you've used, and have repeated my example using it:
(http://forum-images.pixinsight.com/20130517/TGVDenoise/01/01-tn.jpg) (http://forum-images.pixinsight.com/20130517/TGVDenoise/01/01.png)
Click to view a full size version (http://forum-images.pixinsight.com/20130517/TGVDenoise/01/01.png)
The image shown above represents a heavy nonlinear stretch that would require some dynamic range compression (IMO) with the HDRMultiscaleTransform tool.
On this screenshot you can also see the TGVDenoise parameters that I've used in this second example. This time I've enabled the local support, using the target image and the same midtones balance and shadows clipping point values that I have set for STF. In other words, the local support is just what you see on the screen.
Also note that I have decreased the smoothness parameter to 0.3. This has allowed me to control the degree of smoothness on low-SNR regions.
As for the number of iterations, beyond 200 iterations or so the results don't change visibly with these parameters, so the process converges quickly.
I think the results are very nice with this configuration. Here are three comparisons zoomed 2:1 without interpolation.
(http://forum-images.pixinsight.com/20130517/TGVDenoise/01/crop01-original.png) | (http://forum-images.pixinsight.com/20130517/TGVDenoise/01/crop01-final.png) |
(http://forum-images.pixinsight.com/20130517/TGVDenoise/01/crop02-original.png) | (http://forum-images.pixinsight.com/20130517/TGVDenoise/01/crop02-final.png) |
(http://forum-images.pixinsight.com/20130517/TGVDenoise/01/crop03-original.png) | (http://forum-images.pixinsight.com/20130517/TGVDenoise/01/crop03-final.png) |
In my opinion, all of the nebular structures that can be seen on the denoised images over dark regions are real, in the sense that they have been recorded in your data set. The noise reduction process just makes them more visible, which is a very nice result. You can verify this visually by comparing the before and after crops.
As for mixing the original and denoised images with a mask, it's clearly an option, but I think it isn't necessary with advanced noise reduction algorithms such as MultiscaleMedianTransform and TGVDenoise. A drawback of reinserting some of the original noise in the denoised image is that it creates staircase artifacts, i.e. relatively hard transitions at the edges of low-SNR structures. Personally, I lost the need for comfort noise (http://en.wikipedia.org/wiki/Comfort_noise) long time ago (that happens when you design noise reduction tools :) ), and definitely prefer smooth gradients.