I took an image of Hickson Comapct Group 68 a couple of years ago. I never processed it because it was based on a single mission using the Canary Two telescope, so the exposure was LRGB at 50 seconds each.
The resulting image was very noisy, and here is what I came up with when I processed the image initially:
Clearly, more exposure time is necessary, but I thought that this is a good image to use to demonstrate how to reduce noise in an image.
After processing the image in PixInsight, I came up with the following image:
There are still some artifacts, but the image has improved quite a bit. While nothing beats a good source image, PixInsight can certainly help to reduce noise.
The following walks you through the process I used to process this image.
Aligning Your Images
Start with StarAlignment to ensure all of your images are aligned properly.
a. Select the Luminance image as your reference image at the top of the process’s box and then click Add Files to add the red, blue, and green files.
You do not need to add the Luminance image because that is your reference image.
b. Leave the other options at their default and click Apply Global
The process creates three new files for you using the same name as your originals, except that they are postfixed with “_r”.
Open all of the files that make up the mission – in this case, I am opening the original Luminance FIT file that we used as the reference for StarAlignment, followed R, G, and B, XSIF files.
Open the ScreenTransfterFunction process, make your Luminance image active, and press CTRL-A to activate the STF for the Luminance image.
From this image, you can see that it is very noisy. Zooming into the background reveals a lot of noise.
Let’s start by combining our R, G, and B images into a single RGB image.
Use the ChannelCombination process to combine your R, G, and B images into a single RGB image.
Select your R, G, and B files for the respective boxes and click the Apply Global button to combine the images. Press CTRL+A to apply the STF to your image.
Combine the RGB image with the Luminance using the LRGBCombination process.
Uncheck the R,G, and B checkboxes and ensure that L has a checkbox next to it.
Select the Luminance image from the dropdown in the L image selection
Check the option for Chrominance Noise Reduction:
Drag the New Instance icon over your RGB image to perform the LRGB Combination
Before we can attack the noise, we need to improve this image through several processes:
* AutomaticBackgroundExtractor
* BackgroundNeutralization
Using AutomatcBackgroundExtractor
Open the ABE process and, leaving everything at the default options, drag the New Instance icon to both the Luminance and combined RGB image:
You can safely discard the background model windows that popped up as a result of using ABE.
Using BackgroundNeutralization
Use BackgroundNeutralization to ensure the background is neutral. Open the BackgroundNeutralization process window. Press ALT-N on your keyboard and draw a box around a good sample of the background sky in your image.
In BackgroundNeutralization, select the Preview you created as the Reference Image and drag the New Instance icon over your combined LRGB image:
The image is starting to look good but it is still rather noisy:
Attacking the Noise
I want to use the ATrousWaveletTransform and MultiscaleLinearTransform processes to smooth out the noise, but I don’t want to smooth out the galaxies in the image. So to protect the galaxies and focus on the noisy background, we’ll need a mask.
We’ll construct our mask using the combined LRGB image that is stretched using HistogramTransformation to make the blacks blacker and the whites whiter. Once we have that, I’ll use the RangeSelection process to smooth out the transition between the galaxies and background.
Start by cloning your LRGB image – drag the tab on the left side of the LRGB image elsewhere onto the PixInsight screen.
Open the HistogramTransformation process and select the Track View option (the checkmark at the bottom) and Real-Time Preview button (the open circle button).
Drag the New Instance icon from the ScreenTransferFunction to the very bottom of the HistogramTransformation process window (where all the buttons reside) and note that your image becomes white.
Your image is white because we have both the SFT and HistogramTransformation process in play on your image. Press CTRL+F12 to disable the STF to reveal your image in the Real-Time Preview window.
Drag the marker on the bottom left side of the HT process window so that the background becomes as dark as you can get it:
Now that we are satisfied with the settings in HT, close the Real-Time Preview window and drag the New Instance icon over to image that you cloned earlier.
We could use this image as our mask but the transitions between black and white are pretty harsh. We can use the RangeSelection process to make the transitions smoother.
Open the RaneSelection process , click the Real-Time Preview button and adjust the sliders so that the transition between black and white are smoother – remember to adjust the Smoothness setting:
When satisfied, close the Real-Time Preview window and apply the settings to the cloned LRGB image by dragging the New Instance icon over it:
The process creates a new image called ‘range_mask’
Minimize the cloned image you stretched using HT, leaving the ‘range_mask’ active.
With the LRGB image active, from the menu, select Mask, Select Mask, and select the ‘range_mask’ and select the Invert Mask option.
Now we are ready to apply the ATrousWaveletTransform and MultiscaleLinearTransform processes.
Understanding Wavelets
Both of these processes use Wavelets to perform their work. Wavelets divide an image into structures of different sizes so that we can affect each structure separately. This division of an image into structures can be helpful in cases such as this, where you have noise at one level, but do not want to affect the other levels as much.
PixInsight includes a script called ExtractWaveletLayers (under Scripts, Image Analysis) that can help you visualize the wavelet layers in your image.
Open the ExtractWaveletLayers script and click Ok. PixInsight generates a number of new images named Layer00 to Layer04 and a residual layer.
Apply the STF to each to see what structures are visible on the various layers and note how the structures become larger as you progress through the layers. We’ll use these layers in the next couple of sections. Once you have finished looking at the images, you can safely close them.
You’ll note that Layer00 is where most of the noise in our image resides so we are going to aggressively attack that layer.
Using ATrousWaveletTransform
Start with ATrousWaveletTransform and fill in the configuration as shown in the following screenshot:
If you’re not familiar with how to configure the values, use the following steps:
a. Select Layer 1
b. Put a checkmark next to Noise Reduction
c. Enter the following values in the boxes , from top to bottom: 3, 0.25, 45
d. Select Layer 2
e. Enter the following values in the boxes , from top to bottom: 2, 0.25, 10
f. Select Layer 3
g. Enter the following values in the boxes , from top to bottom: 0, 0.25, 5
h. Select Layer 4
i. Enter the following values in the boxes , from top to bottom: 0, 0.12, 1
For the Target selection, at the bottom of the window, select RGB/K components.
Drag the New Instance icon to the combined, masked, LRGB image
The process can take some time to complete. From the configuration of the process, you can see that we put a lot of emphasis on layers one and two but a lot less on Layers three and four.
MultiscaleLinearTransform
Next, open MultiscaleLinearTransform and configure the process as shown in the following screenshot (using this is similar to the ATrousWaveletTransform process):
In case you cannot see it in the screenshot, the values are as follows:
* Layer 1: 3, 0.5, 20
* Layer 2: 2, 0.5, 1
* Layer 3: 1, 0.5, 1
* Layer 4: 0.5, 0.5, 1
Ensure Multiscale linear transform is selected for Algorithm, Dyatic selected at the top and at the bottom of the window, select RGB/K components.
We no longer need the mask because I want to apply the process to the entire image, so with the masked LRGB image active, select Mask, Remove Mask.
Drag the New Instance icon to the combined, masked, LRGB image
We have now finished smoothing out the noise in our image.
ColorCalibration
With the noise smoothed-out, we can calibrate the color. Select the ColorCalibration process.
You have to make two selections: a background reference image and a white reference image.
Press ALT+N on your keyboard and select a good background reference and a good white reference:
Final HistogramTransformation
Finally, perform a HistogramTransformation on your image:
Open the HistogramTransformation process
Drag the STF New Instance icon to the bottom of the HistogramTransformation window, open the Real-Time Preview, and press CTRL+F12 to disable the STF.
Adjust the HistogramTransformation to make the background darker. Close the Real-Time Preview and then apply the HistogramTransformation to your image.
This is the final image:
Save your image and/or export it to share with others.
Conclusion
In this article, you learned how to smooth out noise in a noisy image and learned about wavelet layers and how to visualize them, you learned about using the ATrousWaveletTransform and MultiscaleLinearTransform processes, and you used processes like RangeSelection to create a mask and used HistogramTransformation differently in two places throughout the process.
You must be logged in to post a comment.