|
Noise Reduction in Astronomical Images Using ACDNR
|
|
| Tutorial by Thomas W. Earle | |
|
|
|
| 0. Introduction
1. Changing the RGB Working Space 2. Display the Image in the Luminance 4. Remove the First Wavelet Layer 5. Removing Small-Scale Noise with ACDNR - Step 1 |
|
|
|
|
| 0. Introduction | |
| PixInsight Standard includes several noise reduction tools. The most powerful tool is ACDNR, Adaptive Contrast-Driven Noise Reduction. ACDNR uses two mechanisms, a low-pass filter and an edge protection algorithm. They work together to reduce small-scale noise and preserve the structural integrity of the image. The tool includes several parameters that determine the aggressiveness of noise reduction. The three most important parameters are standard deviation of the low pass filter (StdDev), the edge protection Structure size, and the Dark/Bright Sides Threshold. Although there are other parameters associated with ACDNR, this tutorial will concentrate on these three parameters since they have the greatest impact on the final outcome of the image. In addition, they tend to be the hardest to visualize their effect on image structure; hence, we will be going through several examples showing their impact.
This tutorial assumes processing of the image is complete with the exception of noise reduction and sharpening. |
|
![]() |
| Figure 1 - The raw image. Mouse-over the image to see a noise reduced version. | |
|
|
|
| 1. Changing the RGB Working Space | |
| After opening the image in PixInsight Standard, you will need to mouse-over or click on the Process Explorer tab and double-click the RGBWorkingSpace process located under ColorSpaces. Keep in mind, a scanned slide or negative usually has a luminance coefficient biased towards green. Since most astronomical targets are primarily red or blue, we need to change the coefficients to better match our target. Most wide-field targets are primarily red (i.e. dominated in H-alpha) so a 2:1:1 or 3:1:1 ratio of RGB works quite well. If you are unsure about the ratio or the target has a combination of all three colors, a 1:1:1 ratio is an excellent starting point. Once you have changed the ratios, drag the process icon (i.e. the triangle in the lower left) over the image and release the left mouse button. Now, we can proceed to the first step in reducing the noise in the image, removing the first wavelet layer. One final point, the RGB working space is not saved to the image. It is only used during processing so each time you close the image, you will need to repeat this step before proceeding. | |
![]() |
||
| Figure 2 - The New RGB working space. | ||
|
|
|
| 2. Display the Image in Luminance | |
| Before we start tackling the noise in our image, let's talk a little about the preferred color space when our goal is to remove unwanted noise. The luminance and chrominance channels (Lab) are the preferred layers to tackle noise; however, it is difficult to visualize how each process is affecting these layers when working with an image. PixInsight Standard offers a convenient way of "seeing" these channels by dynamically creating them on the fly through "Image/Display". Since the first order of business is to reduce the noise in the luminance channel, we need to "display" the image in its luminance form so select "Image/Display/Luminance" from the main menu. | |
|
|
|
| 3. Define Several Previews | |
| When processing an image, it is highly recommended to define several smaller "Previews" that highlight an area of interest within the overall image. Since our goal is to reduce the noise without sacrificing the fine structures within our target, we should concentrate on areas that offer distinct edges such as dark nebula contained with nebulosity or "bright bands" embedded within nebulosity. By defining several Previews with this in mind, we lessen our chances of destroying small-scale structures when setting our parameters within ACDNR. Figure 3 shows the two Previews chosen for this example. | |

| Figure 3 - The two Previews chosen for this image. | |
|
|
|
| 4. Remove the First Wavelet Layer | |
| As a general rule when working with film images, the first wavelet layer is noise and contains very little structural detail. As a result, it is safe to remove. Mouse-over or click on the Process Explorer tab and double-click the ATrousWaveletTransform process located under Wavelets. In the Layers drop-down box, choose 2. Next, double-click the check mark associated with Layer 1. The check mark should change to an X. Leave all other values set to their default values. Figure 4 shows an ATrousWaveletTransform dialog setup to remove the first wavelet layer. Once you have made the above changes, drag the process icon over the image and release the left mouse button. Now that you've removed some of the small-scale noise in the image, it's time to move onto the more powerful ACDNR.
Special note: CCD images tend to have some structural detail in the first wavelet layer, especially if the image is not oversampled. Therefore, you should "view" the first layer in ATrousWaveletTransform by selecting All Changes in the Layer Preview section. Some preparatory work on the first wavelet layer is still recommended before proceeding to ACDNR; however, I DO NOT recommend removing it completely. You should experiment with the noise reduction parameters using Previews using the first layer only. Once you are satisfied, you can then proceed to ACDNR. |
|
| Figure 4 - Properly setup ATrousWaveletTransform dialog showing the noise before removing the first layer. Mouse-over the image to see the noise reduction after the layer has been removed. | |
|
|
|
| 5. Removing Small-Scale Noise with ACDNR - Step 1 | |
| Mouse-over or click on the Process Explorer tab and double-click the ACDNR process located under NoiseReduction. Keep in mind, the default values of the three most important parameters typically cause some loss in fine structures so let's tweak them one at a time to see their effect on our Previews. We will not be making changes to the chrominance channel at this time so click on the Chrominance tab and uncheck the Apply checkbox by double-clicking it. We will first concentrate our effort on Structure size. Structure Size determines the smallest structures that will be preserved in your image. Typical values are 3-5 pixels. | |

| Figure 5 - Mouse-over: Choosing the best Structure size. | |
|
|
|
| Figure 5 shows the subtle decrease in fine structures as you increase the Structure size from 3 to 5. Although difficult to see in this image of IC1848, you need to watch your smaller stars. As you increase the size, you will reach a point where the smaller stars begin to disappear. In addition, if you have a high resolution image with subtle nebular details, they will begin to disappear too. At this point, you have gone too far. When you start to see features disappear you need to decrease the value by one to reach your final goal. After viewing the high resolution Previews of M16, a Structure size of 4 was found to be an excellent choice. Let's now move on to Dark/Bright Sides Threshold. | |

| Figure 6 - Mouse-over: Choosing the best Dark/Bright Sides Threshold. | |
|
|
|
| Figure 6 shows the subtle difference in fine structure loss as you increase the Dark/Bright Sides Threshold from 0.010 to 0.030. We will concentrate on the dark and bright region in the upper center. Note how we begin to loose fine detail in light region as we go from 0.010 to 0.030. Obviously, given our three Previews, any value above 0.020 is too much. Knowing that the threshold of 0.010 is quite similar to our RAW image, we should shoot for a value between 0.010 and 0.020. After iterating through several more values (not shown), a value of 0.013 seems to be the best choice. Let's now move to the last parameter, StdDev. | |

| Figure 7 - Mouse-over: Choosing the best StdDev. | |
|
|
|
| Figure 7 shows the smoothing of the image as the StdDev varies from 0.5 to 1.5. Again, we will focus our attention on the Eagle. From the 200 percent Previews, it should be intuitively obvious we've lost a lot of structure when StdDev is set to 1.5. In addition, the background is beginning to show a waxy look which we should avoid at all costs. With a value of 0.5, the result looks very similar to the RAW image. A StdDev value of 1.0 looks very promising so after several more iterations around this value (not shown), I settled for a StdDev value of 1.1. For removing high frequency noise, StdDev values of 1-2 work well for CCD images and 2-3 work well for film images. For low frequency noise (e.g. background), StdDev values of 4-6 are preferred.
After deriving these three values, it's a good idea to tweak the number of Iterations the ACDNR cycles through. For small-scale noise reduction, I keep my iterations between 8-12. Generally speaking, the more iterations the smoother the result. Keep in mind, when changing the number of iterations, you need to adjust the Amount value too. Since we are doubling the number of iterations, we should generally divide the Amount value by two. I choose values around 0.40-0.60. To ensure your new Iterations and Amount values do not remove the fine scale features in the image, you should test these new values on your Previews. DO NOT forget to reset your Previews each time you try a new value. Figure 8 shows the final results of Step 1. |
|

| Figure 8 - Luminance channel showing the final derived values used in first step using ACDNR. | |
|
|
|
| 6. Removing Medium to Large-Scale Noise with ACDNR - Step 2 | |
| Smoothing the sky background calls for medium to larger scale noise reduction techniques. Since our goal is to smooth our sky background, we need some means of protecting our areas of interests. The protection mechanism is called a mask. ACDNR makes the process of creating mask easy. This is probably a good time to save your hard work since you never know when your going to lose power. After saving your work, click on the Luminance mask section in ACDNR, then click on Preview. Click on your main Image tab and click the icon near the bottom that looks like an eye. This will give us a live preview of our Luminance mask as we adjust the Shadows and Highlights. Ideally, you want to darken the targets of interest while moving towards a completely white background. Figure 9 shows the values chosen for the Shadows/Highlights and the resulting luminance mask. This step will take some experimentation. If you darken the areas of interest too much, the over-protection results in an obvious grainy-look to the areas of interest; however, if you offer too little protection, all the time spent on protecting their fine structure will be lost in this step. Once you are satisfied with your Luminance mask, turn the Preview mode off by clicking the Preview box and then click on the Luminance mask box located at the top portion of the ACDNR dialog box. This will make your luminance mask active. As a first guess, I generally double the StdDev parameters used in the small-scale noise reduction found in an earlier step. Next, you need to set the Amount value to 1.0 and Iterations to a 3 or 4. Once these values are set, I begin iterating through several StdDev values (e.g. 2.5, 3.0, 3.5, etc.) until I get a smooth background. You should continue working with the Previews created earlier. In fact, you should also create a few more Previews in different locations of your background. This will give you an idea when you've gone too far with the StdDev value (i.e. waxy look). It also allows you an opportunity to catch a poorly created luminance mask if fine structures start to disappear in your deep-sky objects. | |

| Figure 9 - Screen shot showing the final values used to build a Luminance mask. | |
| So far all our changes have been to the luminance channel. Now, it's time to decrease the noise in the chrominance channels. First, we need to switch our display "view" to Chrominance by select "Image/Display/Chrominance(CIE a*=R/b*=G)" from the main menu. Next, we will need to deselect the Luminance channel by double-clicking its Apply checkbox. Now that we've turned off the luminance channel, we can concentrate our effort on the Chrominance channels. Generally speaking, the chrominance channels do not have many details. In fact, you will likely only see a few of the brighter stars in the image. As a result of this lack of structure, you can be pretty aggressive with StdDev and Structure size values without affecting the structural integrity of your image. A good starting point for StdDev is 3 and Structure size should be double the Luminance value found earlier. There is usually a lot of noise in the Chrominance channels so it takes a large Structure size to remove it. Outside these two parameters, I've found most of the remaining default values in the Chrominance tab produce favorable results; nevertheless, you will still need to work with a Preview or two to find the ideal values. I typically iterate through a few whole numbered values of StdDev watching the results in a Preview. Figure 10 shows an example of the process. For this image, I found a StdDev value of 5 to produce the best results. Once you are satisfied, we need to turn the Luminance channel back on by double-clicking the Apply button on the Luminance tab. Note, it is generally unnecessary to use the Luminance mask on the Chrominance channel since there's no important detail to protect.
When determining your values for the Chrominance channels, I've found that it is very easy to "smooth away" your star colors. If after running through a few previews, you find your star colors are disappearing, you will need to separate your Luminance and Chrominance noise reduction into two steps. At this stage, our goal is protect our star colors so we must create a "Luminance" mask for the Chrominance channels. Keep in mind, the Luminance mask we created earlier will not be aggressive enough to protect the smaller stars; hence, the importance of breaking the noise reduction into two steps. First, create a Luminance mask to protect the stars in the Chrominance channels. I try creating a mask the leaves nothing but stars; however, you will need to experiment with the three slider bars to get the best result. I recommend using Live Previews for this step so you can be sure you're protecting the fainter stars. Since the Chrominance channels contain very little detail, you can be pretty aggressive with your mask. Once you have your mask, test your values on a few Previews to ensure you are protecting most of the stars. I find it helpful to change the Display to RGB during this step. Once you are satisfied with the mask and ACDNR values, save this as a process icon with the Luminance channel tab turned off. Now, go back to your previous large-scale Luminance icon and turn off the Chrominance tab. Each of these steps should be saved as separate process icons. Now that you have separated the medium-large scale noise reduction into two steps, you should test them on a few RGB Previews. Since PixInsight Standard smooths the Chrominance channels first, I tend to do the same; however, you should do them in the order that produces the best results. |
|

| Figure 10 - Mouse-over: Choosing the best StdDev value for Chrominance. | |
|
|
|
| Figures 11 and 12 show the final ACDNR values in the Luminance and Chrominance tabs. Finally, it's time to remove the medium to large-scale noise in the image by drag the ACDNR process icon over the image and releasing the left mouse button. Reducing the noise in an image typically lightens the overall image so it's necessary to make a few minor adjustments to the image. | |
![]() |
||||
![]() |
||||
| Figure 11 - Final ACDNR step 2 values for the Luminance channel. | Figure 12 - Final ACDNR step 2 values for the Chrominance channels. | |||
|
|
|
| 7. Final Adjustments | |
| As mentioned previously, reducing the noise in an image typically decreases the overall contrast. As a result, it's necessary to make a final Curves adjustment. In addition, PixInsight Standard offers a plethora of sharpening techniques to bring out all the subtle details "hidden" in your image. Sharpening is a necessary step, especially after noise reduction, and should be the final step in any image processing workflow. | |
|
|
|
| 8. Credits and References | |
| I would like to thank Alan Voetsch for giving me permission to use his M16 image in this tutorial.
"Noise Reduction with ACDNR" by Juan Conejero |
|
| Image(s) may not be used or reproduced without written permission from Thomas W. Earle. Copyright © 2007. | |