PixInsight Standard Tutorial
Noise Reduction with ACDNR

By Juan Conejero (PTeam)
M45 image raw data acquired by Vicent Peris (Pteam) and José Luis Lamadrid


:: PixInsight Home Page

Introduction

Description of ACDNR

ACDNR Parameters

ACDNR Processing Example: M45 DSLR Image

Final Processed Image



Introduction

In this tutorial we introduce the new ACDNR algorithm and its implementation in PixInsight Standard. ACDNR stands for Adaptive Contrast-Driven Noise Reduction. We begin with a description of this important tool and its parameters, and complete the tutorial with a step-by-step processing example.

The ACDNR tool is a highly flexible implementation of a novel, high-performance noise reduction algorithm, based on advanced multiscale and mathematical morphology image processing techniques. The ACDNR algorithm has been created by the Pleiades Astrophoto development team (PTeam) and is the fruit of more than two years of continued research and development work.

As of writing this tutorial, ACDNR is available as a standard process in the public time-limited beta version of PixInsight. We hope to continue improving the ACDNR algorithm and our implementation; the feedback from our users is essential to accomplish that task.


Description of ACDNR

The idea behind ACDNR —as any nontrivial noise reduction algorithm— is to perform an efficient noise reduction work while preserving significant image structures. As its name suggests, ACDNR is able to adapt to the characteristics of the processed image by modifying its behavior as a function of detected contrast variations.

ACDNR includes two mechanisms that work cooperatively: a special low-pass filter and an edge protection device. Simply put, the low-pass filter smooths the image by removing or attenuating small-scale structures, and the edge protection device prevents significant image structures from being damaged during low-pass filtering. You can think of ACDNR as a system with two contrary forces working in opposite directions: the low-pass filter tends to simplify the image by destroying irrelevant small-scale features (i.e., the noise), and the edge protection device tries to avoid destruction of important features by stopping the low-pass filter when it encounters relevant contrast variations.

Figure 1— ACDNR filtering of a one-dimensional function. Without edge protection, the bright feature becomes blurred. The edge protection mechanism reproduces it accurately above the mean noise level.


Little automation can be used for the noise reduction task: it is a complex and extremely delicate task that requires accurate tools and their tight adaptation to each particular case. In this sense, ACDNR provides a high degree of flexibility. Both ACDNR's main subsystems, the low-pass filter and the edge protection device, can be controlled with corresponding sets of parameters that the user must define to adapt ACDNR to each particular situation and imaging context.


ACDNR Parameters

ACDNR offers two identical sets of parameters: one for the luminance and another for the chrominance of color images.

Chrominance ACDNR parameters are applied to the CIE a and b components in the CIE Lab color space. Luminance parameters are applied to the L component of Lab for color images, and to the nominal channel of grayscale images. In general, chrominance parameters are much less critical and can define a stronger noise reduction procedure than luminance ones. This is because the human vision system is quite poor in detecting image structures defined by chrominance variations: we perceive almost all of the detail through the luminance. However, this doesn't mean that we can neglect fine-tuning chrominance noise reduction parameters, since by doing so we can cause severe lacks of information, especially for relatively small structures with high chrominance contents, as stars in deep-sky images.

ACDNR performs luminance/chrominance separations, as do all standard PixInsight processes, into rigorous, colorimetrically-defined color spaces. Conversions to and from the CIE Lab space are carried out in the current RGB working space (RGBWS) of the target image. The RGBWS can be defined with the RGBWorkingSpace standard process and its interface, available under the ColorSpaces category.

For both luminance and chrominance subsets, ACDNR parameters divide into two sections: filter parameters and edge protection parameters.


ACDNR Filter Parameters

  • Standard deviation of the low-pass filter
    The low-pass filter is a mathematical function that is discretized on a small square matrix known as a kernel in the image-processing jargon. This parameter controls the size in pixels of the kernel used. The kernel size directly defines the characteristic sizes of the image structures that the low-pass filter will tend to remove. For example, standard deviations between 1 and 2 pixels are appropriate to remove high-frequency noise that dominates most CCD images. Standard deviations between 2 and 3 pixels are quite usual when dealing with film images. Larger deviations, up to 4 or 6 pixels, can be used to smooth low-SNR regions of astronomical images (as the sky background) with the help of special protection masks.
  • Amount
    This value, in the range from 0.1 to 1, defines how the denoised and original images are combined. A zero amount value would leave the image unchanged, and an amount value of one would replace the image with its denoised version completely. This parameter is especially useful when the ACDNR filter is used iteratively (see the iterations parameter below). At each iteration, amount can be used to re-inject a small fraction of the image resulting from the preceding iteration. This leads to a recursive procedure that can help in fine-tuning and stabilizing the overall process.
  • Iterations
    This is the number of times that the low-pass filter is applied. The ACDNR filter is much more efficient when applied iteratively. A relatively small filter (one with a low standard deviation) applied several times is in general preferable to a larger, more aggressive filter applied once. When three or more iterations are used, ACDNR's edge protection is usually much more efficient and generally yields better results. The amount parameter (see above) can also be used along with iterations to turn ACDNR filtering into a recursive procedure, mixing the original and processed images.


ACDNR Edge Protection Parameters

We define an edge as a brightness variation that the edge protection device tries to preserve (protect) from the adverse effects of low-pass filtering. If we consider an edge as the locus of a brightness change, then for each edge there is a dark side and a bright side, depending on the direction we follow when crossing it. ACDNR's edge protection gives separate control over dark and bright sides of edges. For each side, there is a couple of identical parameters, namely threshold and overdrive.

  • Threshold
    This parameter defines the relative brightness difference that triggers the edge protection mechanism. For example, a threshold value of 0.05 means that the edge protection device will try to protect image structures defined by brightness changes equal to or greater than a 5%, with respect to their surrounding areas. Higher thresholds are less protective. Too high of a threshold value can allow excessive low-pass filtering, and thus lead to destruction of significant image features. Lower thresholds are more protective, but too low of a threshold can lead to poor noise reduction results. In general, protection thresholds are critical and require some trial and error work.


Figure 2— MouseOver: Edge protection thresholds

  • Stellar edge threshold
    Images containing relatively small, isolated bright objects, greatly benefit from a special protection algorithm that has been specifically designed to preserve stars in deep-sky images. The stellar edge protection feature is controlled by a separate threshold parameter that works in a way very similar to the normal bright sides edge protection. Not only stars or star-like image structures can be well protected with this star protection feature, but also high-contrast, bright image structures of any form on images of any kind, including non-astronomical. For the star protection feature to work, a minimum structure size of at least one pixel must be defined (see the minimum structure size parameter below).


Figure 3— MouseOver: Star edge protection

  • Overdrive
    This parameter controls the edge protection strength. When overdrive is zero (its default value), edge protection just tries to preserve the existing pixel values of protected edges. When overdrive is greater than zero, the edge protection mechanism tends to be more aggressive, exaggerating the contrast of protected edges. This parameter is rarely used. It can be useful sometimes, in very difficult cases, because it may allow using a larger threshold value, which in turn provides a better noise reduction, while still protecting significant edges. Overdrive is an advanced parameter that requires experience and must always be used with great care: incorrect overdrive dosage can easily generate undesirable artifacts.

In addition to side-specific edge protection parameters, ACDNR includes three additional parameters that control the overall behavior of the edge protection device: robustness enforcing method, minimum structure size, and prefiltering.

  • Robustness enforcing method
    When ACDNR's edge protection has to operate in presence of strong small-scale noise, it may have a hard time defining accurate edges of significant structures. For example, isolated noisy pixels can be very bright or dark, and their contributions to the definition of protected edges can be relevant. Robustness refers here to the ability of ACDNR to become immune to small-scale noise when discriminating significant image structures. Three robustness enforcing methods have been implemented: weighted average, unweighted average, and morphological median. In all these methods, for each pixel a neighborhood is defined and a robust reference value is calculated from the neighbor pixels, which is then used to command the edge protection device. Each method has its strong and weak points. The method based on the morphological median is especially good to preserve sharp edges, but it can confer a plastic appearance to some images. The averaging methods can yield more natural-looking images, but they tend to blur sharp edges. The weighted average method is a good compromise between both ends. You can try all methods and see which is best for your specific needs, according to your preferences.


Figure 4— MouseOver: Robustness Enforcing Methods

  • Minimum structure size
    This is the minimum size in pixels of significant image structures, from the point of view of the edge protection device. Image structures below this limit will not be edge-protected and thus will be left at the mercy of the low-pass filter. This parameter is part of the robustness enforcing system of ACDNR. It is useful to avoid protecting very small and bright image structures that are actually noise, especially on low-SNR areas. For example, structures of this type are quite frequently found on the sky background and faint nebular regions in most deep-sky images. If the edge protection mechanism protects these structures, ACDNR can easily become of no use because lots of these bright things are protected to survive noise reduction, no matter the filtering strength used. By defining an appropriate minimum size for significant image structures, this problem can be easily solved in virtually all cases. When this parameter is set to zero, robustness enforcing is completely disabled, as well as stellar edge protection. Both features require a minimum structure size of at least one pixel.


Figure 5— MouseOver: Minimum Structure Size

  • Prefilter
    If necessary, ACDNR can apply an initial filtering process to remove small-scale structures from the image. This can help to achieve a more robust edge protection, for the reasons explained above. Two prefiltering methods have been implemented: multiscale and multiscale recursive. Both methods employ special wavelet-based routines to remove all bright and dark image structures smaller than two pixels. The recursive method is extremely efficient. This feature is seldomly used; it is applicable only in presence of huge amounts of noise, when all significant image structures have sizes well above the two-pixel limit.


ACDNR Luminance Mask

We have implemented an additional feature to improve ACDNR's flexibility and applicability. It is an inverse luminance mask that modulates the noise reduction work. Where the mask is black, original (unprocessed) pixels are fully preserved; where the mask is white, noise reduction acts completely. Intermediate gray mask levels define a proportional mixture of unprocessed and processed pixel values. This mask can be useful to protect high-SNR regions while applying a strong noise reduction to low-SNR ones. A typical example of this is to smooth the background of a deep-sky image while leaving bright regions intact.

The ACDNR mask is generated and controlled with the help of three parameters: midtones balance, shadows clipping and highlights clipping. These parameters define a histogram transform that is applied to a copy of the luminance that is used to mask the noise reduction process. Take into account that an inverse mask is always generated, which means that you must reverse your logic when varying these histogram parameters; with a little practice you'll find no problem with this. To help achieving a correct mask with a minimal effort, the ACDNR interface includes a special mask preview mode. When this mode is enabled, the ACDNR process simply generates the mask, copies it to the target image, and terminates execution. When used along with the Real-Time Preview interface, this mask previewing mode is particularly useful.


ACDNR Processing Example: M45 DSLR Image

M45 image by Vicent Peris (PTeam) and José Luis Lamadrid

Takahashi Epsilon 180ED Hyperbolic Astrograph

2 x 25 minutes from Teruel, Spain.

Modified Canon EOS 350D @ 200 ISO

Complete processing done in PixInsight Standard 1.0.1.228 b3

Summary of processing:
Debayerization, conversion to 32-bit floating-point format, registration, averaging, background modelization and correction, histogram stretch, small-scale noise reduction, color correction, color saturation enhancement (stars only), large-scale noise reduction.


Initial Processing Steps

This is an optics test shot that has not been calibrated: no darks or flats have been applied. Consequently, the original images have strong gradients and a number of hot and cold pixels.

The two raw images were loaded and debayerized. They were then converted to the 32-bit floating point format with the SampleFormatConversion process.

The 16-bit integer sample format is normally sufficient to perform moderately complex processing works. However, the PixInsight platform allows you to use five data formats transparently: 8, 16 and 32-bit unsigned integers, as well as 32 and 64-bit IEEE 754 floating point. Transparent here means that all processes can perform without distinction (other than the inherent accuracy differences) on any of the five supported data formats.

Important Note When feasible, a 32-bit format is always preferable, especially to perform numerically complex operations like noise reduction. The 64-bit format can be useful to apply some critical routines to images requiring extremely large dynamic ranges. This happens with many deep-sky objects; M42 (The Great Orion Nebula) is a paradigmatic example. For normal deep-sky images, the 32-bit floating point format is probably the best-balanced option. Another good choice would be the 32-bit integer format, which provides an even larger effective dynamic range. Needless to say that the 8-bit integer format should never be used with images like the present one.

After conversion to the 32-bit floating point format, the raw images were registered with DynamicAlignment, then averaged with PixelMath. We'll spare you the details of these two procedures, which are quite simple.

Here you can see how the averaged result looks like. This is our starting working image for this processing example.

As usual with all linear raw images in astrophotography, the existing data are not initially visible because the image is strongly underexposed. Almost all of the data are concentrated within a small fraction of the available dynamic range. A nonlinear transform will allow us to redistribute them appropriately. This will be done in the second processing step.


Step 1: Background Modelization and Correction

We have applied two iterations of the DynamicBackgroundExtraction (DBE) process, subtracting the generated synthetic background models with PixelMath.

Figure 6— First application of the DynamicBackgroundExtraction process.

Click on the image to see a full-size version.

First DBE application. Note the ScreenTransferFunction interface being used. It allowed us to see the unstretched image without actually modifying it. In this way we were able to generate a background model for the linear unstretched image, before applying any nonlinear transform to raw pixel values.

We began generating a grid of DBE samples automatically. DBE's statistical rejection system avoided most samples on M45 and its surrounding nebulosity. However, to minimize the contributions of true reflection nebulosity to the generated background model, we manually removed some samples around the central regions. We also added a few samples on the lower left corner, which DBE's rejection system considered too far away from the typical background of the image. The whole procedure was completed in less than five minutes.

Important Note Note that the new DBE automatically assigns statistical weights to each background sample (the Wr, Wg and Wb values), which leads to very robust background models.

Figure 7— First background correction.

Click on the image to see a full-size version.

First background correction. The synthetic background model was subtracted from a copy of the original image.

The result is quite good except for a residual gradient, visible as a horizontal stripe near the bottom. We'll try to remove it with a second DBE iteration.

Important Note Note that by subtracting a DBE model the sky background is automatically neutralized. This is a feature of the new DBE implementation.

Figure 8— Second application of the DynamicBackgroundExtraction process.

Click on the image to see a full-size version.

Second DBE application. Residual background gradients and irregularities are very weak. Note that they appear so exaggerated due to the aggressive screen transfer function used, which we have stretched to the limit.

We have taken the same DBE instance used in the previous application as the starting point for this one. This has been possible, of course, because we saved the previous DBE instance as a process icon.

This time we have manually added more samples on particularly difficult areas, as the horizontal stripe near the bottom, and some regions with relatively strong color variations.

Figure 9— Second background correction.

Click on the image to see a full-size version.

Second background correction. Again, the synthetic background model, which can be seen at the lower left corner on Figure 9, was subtracted from a copy of the resulting image after the first correction.

The result, at the lower right corner, is more uniform, though still not perfect. Take into account, however, that the images are being shown here heavily stretched with aggressive screen transfer functions. We could go further perfectioning background modelization/correction, but we think that what we have now is reasonably good for an uncalibrated DSLR image.

Important Note It is important to point out that the whole background modelization / uneven illumination correction procedure has been applied to the unstretched linear data, thanks to the ScreenTransferFunction functionality of PixInsight Standard.


Step 2: Initial Nonlinear Stretch with HistogramTransform

Figure 10— Initial nonlinear stretch with HistogramTransform.

Click on the image to see a full-size version.

Figure 10 shows the initial histogram stretch being adjusted with the HistogramTransform interface working in real time preview mode. We have been very careful to avoid clipping too many background pixels at this stage: note the shadows clipping point located just at the starting point of the main histogram peak.

The background is strongly dominated by the noise now, and setting many background pixels to zero now would largely complicate a subsequent noise reduction. By clipping background pixels, contrast is strongly increased between adjacent noisy pixels. Noise reduction algorithms, especially those based on local contrast gradients like ACDNR, may have a hard time trying to distinguish significant image structures under such situation. After having applied noise reduction, we'll be able to stretch the image appropriately, as we'll demonstrate later.

Important Note Along with an initial shadows clipping, we have applied a midtones transfer function (MTF) with this first HistogramTransform instance. This MTF is the nonlinear transform that allows us to redistribute the linear raw data in such a way that we can see them. The MTF is controlled by the midtones balance parameter of HistogramTransform.


Step 3: Custom RGB Working Space (RGBWS)

Figure 11— Setting a custom RGB working space (RGBWS) with equal luminance coefficients.

Click on the image to see a full-size version.

In our next step we set a custom RGB working space (RGBWS) with equal luminance coefficients.

This step is important because the RGBWS determines how luminance/chrominance separations are performed in PixInsight. The luminance coefficients are taken as relative weights to determine the contribution of each color to the luminance of the image. Most processes in PixInsight work separately for the luminance and chrominance components of images, and ACDNR is no exception.

With a uniform RGBWS (equal luminance coefficients) we are telling PixInsight that the three individual RGB colors have the same importance for the calculation of luminance in this image. This will allow us to gather more information in the luminance, where visible image detail is actually supported.

Important Note At this point you may want to review a more in-depth discussion about RGB working spaces, pertaining to the official PixInsight LE documentation.


Small-Scale Noise Reduction: Before/After Comparisons

Below is a series of mouseover comparisons that will help you in evaluating our noise reduction results with ACDNR. We are quite satisfied, but no image processing technique yields perfect results, and of course our implementation is no exception.

On these comparisons, please note that all small-scale noise has been virtually suppressed, while significant image structures have been well preserved in both luminance and chrominance. This must be the goal of any serious noise reduction procedure.

Bright stars show colorful diffraction spikes on the original image, which our noise reduction process has left mostly discolored. Note that this side effect has been intentional, as we don't like colorful spikes (we do like spikes, but when they are colorful, we think that they steal protagonism to the astronomical subjects).

Figure 12a— MouseOver:
Small-Scale Noise Reduction Comparison

2:1 zoomed crop near the center.

Figure 12b— MouseOver:
Small-Scale Noise Reduction Comparison

2:1 zoomed crop near the center.

Figure 12c— MouseOver:
Small-Scale Noise Reduction Comparison

2:1 zoomed crop near the top.


Step 4: Defining an ACDNR Luminance Mask

Figure 13— Building an ACDNR luminance mask for small-scale noise reduction.

Click on the image to see a full-size version.

An efficient noise reduction is not the easiest task for this Pleiades image. What makes it a difficult target is the fact that fine details are defined by very subtle contrast variations, but at the same time, relatively high amounts of noise are present on the background and larger areas covered by faint nebulosity.

Normally, ACDNR doesn't need the help of a mask to work very efficiently. This is true for most deep-sky and diurnal images. However, there are difficult cases, like the present one, where a protection mask is necessary to achieve the appropriate noise reduction strength for all image areas and features at the same time. For this reason we have implemented a specific luminance mask generation tool in the ACDNR interface.

As can be seen on Figure 13, the generated luminance mask will limit noise reduction on the brightest regions of the nebulas, where the signal-to-noise ratio is relatively high, and delicate structures need extra protection.

Important Note On Figure 13, you can see how the luminance mask can be quickly adjusted with the Real-Time Preview interface. The Preview option on the Luminance Mask section of ACDNR must be activated. ACDNR masks work in the usual way: black mask pixels protect the image completely, and white mask pixels permit full processing. Intermediate (gray) mask values yield a proportional mix of original and processed pixels.


Step 5: Defining Luminance and Chrominance ACDNR Parameters

As we stated earlier in this document, ACDNR provides two identical sets of parameters: one for the luminance and another for the chrominance components. Each set must be defined separately for color images.

Important Note Note that on each page of the ACDNR interface (Luminance, Chrominance), there is an Apply check box. If we uncheck Apply, the corresponding set of parameters will not be applied. This is very useful to concentrate on each set separately, saving a lot of processing time.

This is the step-by-step practical procedure to work with ACDNR for color images:

  • Select the Chrominance page and uncheck its Apply check box.
  • Select the Luminance page and ensure that its Apply check box is checked. Try out luminance ACDNR parameters until you achieve a satisfactory noise reduction for the luminance. Use the CIE Luminance display mode (Image > Display > Luminance, or Ctrl+Shift+L) to see the luminance of the image represented as a grayscale image.
  • Uncheck the luminance Apply check box. Select the Chrominance page, check its Apply check box, and work with chrominance parameters until you're happy. The Chrominance a/b display mode is very useful (Image > Display > Chrominance, or Ctrl+Shift+C) to see the chrominance of the image isolated from the luminance. In this special display mode, red and green are used to represent the CIE a and b components of the CIE Lab color space, respectively.

Figure 14— Adjusting luminance ACDNR parameters.

Click on the image to see a full-size version.

We start with the luminance. On Figure 14, you can see how our luminance ACDNR parameters are being fine tuned with the separate technique explained above.

Figure 15— Adjusting chrominance ACDNR parameters.

Click on the image to see a full-size version.

Once luminance ACDNR parameters have been accurately defined, we proceed with the chrominance. Again, we use the separate technique explained at the beginning of this section. On Figure 15, note the Chrominance a/b special display mode. This mode is being used to see the chrominance of the image isolated from the luminance. This is the most effective way to work with ACDNR for the chrominance. Remember that in this mode red and green are used, respectively, to render the a and b components of the CIE Lab color space.

Figure 16— Testing the whole ACDNR parameter set on a preview.

Click on the image to see a full-size version.

Finally, we must try the whole ACDNR process with several previews of our image. Both luminance and chrominance parameter sets have been activated (Apply check boxes checked), and the normal composite RGB display mode has been selected.

Important Note A good noise reduction can never sacrify image detail. This is the reason why we have invested huge amounts of work and knowledge in achieving an advanced noise reduction tool like ACDNR. What we are trying to say is that the noise reduction task must always be done with sufficient care, appropriate tools, and sparing no trial/error work, which is often necessary in large amounts. Some experience and practice are also required, as happens in all fields of image processing.


Step 6: Histogram Stretch After Noise Reduction

Figure 17— Clipping shadows after noise reduction, with the HistogramTransform interface.

Click on the image to see a full-size version.

After an efficient noise reduction work, no part of the image is dominated by the noise now. This is particularly evident on the sky background and other dark areas, where the signal-to-noise ratio was very low. A direct consequence of this is that the histogram shows now a nice unused portion at the shadows end. We call it nice because it allows us to increase the overall contrast of the image without losing any data. In other words, now we can use the histogram to stretch the image as necessary, because the histogram is no longer dominated by the noise, but only by significant data.


Selective Color Correction and Color Saturation: Before/After Comparisons

Figure 18a— MouseOver:
Color Correction / Color Saturation Comparison

Figure 18b— MouseOver:
Color Correction / Color Saturation Comparison

Full-size crop near the left border.


Step 7: Building a Mask for Selective Color Correction

Figure 19— Building a mask for selective color correction, with the HistogramTransform interface.

Click on the image to see a full-size version.

In the next step we are going to apply a color correction to enhance the blue color of reflection nebulosity.

However, we want to apply that correction to the most illuminated areas of the image exclusively, not to the background. The background is nicely neutral now, and we don't want to change this by no means.

So what we want is to apply some processes selectively, limiting their effects to appropriate areas of the image, and to achieve that a mask must be used in PixInsight.

Important Note To build this mask, we start by extracting the luminance of the image with the ChannelExtraction process. The we apply a histogram transform to clip (i.e., set to black) background pixels. On Figure 19, the HistogramTransform interface is being used in real-time preview mode.


Step 8: Selective Color Correction

Figure 20— Applying a selective color correction with the SCNR process. The mask built on Figure 19 has been activated for the target image.

Click on the image to see a full-size version.

As we have said, we want more blue reflection nebulosity. It is too cyan, in our opinion. The excess of green can be fixed in several ways. One quite obvious is a set of transfer curves applied with the CurvesTransform process. That would work for sure, but we want to try something new here.

The SCNR process (Subtractive Chromatic Noise Reduction) has been designed to remove green noise in deep-sky images. You can read more about the SCNR algorithm on a specific section of the official PixInsight LE documentation.

The implementation of SCNR that we have included in the default set of processes for PixInsight Standard adds new features, with respect to the version included in PixInsight LE. One of them is a new protection method, namely minimum neutral, that can be used in cases like the present one with great results. We have to say that this use of SCNR is not quite orthodox, but it works very well indeed. We always want to have our mind open to discover new processing strategies, and this is just one of those cool things that bring out of our imagination.

On Figure 20, you can see how a correct dosage of minimum neutral SCNR achieves the exact blue color that we were looking for. Of course, the luminance mask that we built in the preceding step is essential here to avoid altering the background, whose neutrality must be preserved.


Step 9: Building a Star Mask for Selective Color Saturation Enhancement

Figure 21— Building a star mask with the ATrousWaveletTransform process.

Click on the image to see a full-size version.

How about improving the colors of the stars? There are many red stars in this image that contrast beautifully with the dominant overall blue. This is just the kind of things that we pursue when we process an excellent astrophoto like the present M45 image.

We indeed can't resist the temptation to increase star color saturation, but this isn't a simple task. If we'd just increase color saturation for the whole image, we'd get a complete disaster: the bright nebulas would become severely oversaturated, and a lot of chrominance noise would be originated on the background.

So once again, a special mask is required to apply the necessary color saturation transform just where it is needed. We need a mask that comprises only the stars of the image. Furthermore, we don't want to saturate the brightest stars of M45, since they are already highly saturated in brightness.

The ideal tool to build star masks is the ATrousWaveletTransform process in PixInsight. With wavelets, we can isolate image structures within a given range of scales. We have devised many techniques based on multiscale processing to build star masks. One of them is pretty simple and very efficient in most cases. You can see it in action on Figure 21. Pay special attention to the following aspects of the wavelet transform (please see the full-sized Figure 21):

  • The residual wavelet layer (the 'R' layer) has been disabled. In the case shown on Figure 21, this removes all image structures with characteristic sizes larger than or equal to 16 pixels. This is because we have used four wavelet layers. If larger structures have to be included in the mask, more wavelet layers must be defined.
  • The first wavelet layer has been disabled. This is not actually necessary, but it ensures that no small-scale noise will be included in the mask.
  • The third and fourth wavelet layers (scales of 4 and 8 pixels) have been biased, especially the fourth one. This will give more importance to the structures with characteristic sizes between 4 and 8 pixels. In this case, these scales support the stars that we are interested in. Again, different layers and biases may be necessary, according to the characteristics of the image and the requirements of the task being carried out.
  • Finally, but very importantly, the k-sigma noise thresholding method is being used. This technique provides robustness to the mask generation procedure by making it immune to the noise and other spurious image structures. Without it, our mask would include many undesired structures that are not stars, but other much fainter features within the selected range of scales. Usually the Amount parameter of k-sigma thresholding must be set to its maximum value. The Threshold parameter must be varied to isolate the desired stars; usually quite high values are necessary, between 4 and 8.

Finally, the mask can be stretched with HistogramTransform, if necessary (for example, to clip faint nonstellar features if they have been included in the mask), and a further wavelet transform can be used to remove small-scale layers, which smooths star edges.


Step 10: Selective Color Saturation Enhancement

Figure 22— Applying a selective color saturation increment with the CurvesTransform interface, to improve star colors.

Click on the image to see a full-size version.

Figure 22 shows the applied saturation curve. It defines a very aggressive color saturation increment for pixels that are poorly saturated. Of course, without the help of a special star mask, such an increment would be completely impossible.


Large-Scale Noise Reduction: Before/After Comparisons

The mouse over comparisons below clearly show what we call large-scale noise, and how we have managed to remove it with ACDNR. Large-scale noise affects low signal-to-noise ratio areas, especially the sky background and the dimmest nebular regions. ACDNR with a large filter and an appropriate protection mask can deal with this type of noise efficiently.

Figure 23a— MouseOver:
Large-Scale Noise Reduction Comparison

Full-size crop near the bottom left corner. Midtones increased to facilitate noise visibility.

Figure 23b— MouseOver:
Large-Scale Noise Reduction Comparison

Full-size crop near the center. Midtones increased to facilitate noise visibility.


Step 11: Defining an ACDNR Luminance Mask for Large-Scale Noise Reduction

Figure 24— Building an ACDNR luminance mask for large-scale noise reduction.

Click on the image to see a full-size version.

On Figure 24, note that the ACDNR mask for large-scale noise reduction is very restrictive. This is because this type of noise exists only on low-SNR areas, which correspond to the least illuminated image areas: the sky background and the dimmest nebular regions. Hence, only those regions must be left unprotected by large-scale noise reduction masks. Remember that unprotected areas are those where the mask is white.

On the other hand, a large ACDNR filter is necessary to deal with this type of noise, because it is characterized by relatively large structures. The aggressivity of the required filter would destroy small-scale structures and delicate nebular features without appropriate protection.

Important Note On the large-scale mask above, note that dim areas of the reflection nebula are neither white nor black, but have smoothly decreasing gray values. This is very important to ensure smooth transitions between protected and unprotected areas. Hard transitions (i.e., hard white/black transitions on the mask) must always be avoided because they yield visible differences between protected and unprotected areas.


Step 12: Large-Scale Noise Reduction with ACDNR

Figure 25— Applying large-scale noise reduction with ACDNR.

Click on the image to see a full-size version.

On Figure 25 you can see the applied large-scale noise reduction procedure. The filter used is large and aggressive: standard deviation of five pixels and three iterations. Figure 25 shows luminance ACDNR parameters; chrominance parameters are very similar. The luminance mask that we built in the preceding step has been activated for both luminance and chrominance ACDNR parameter sets. This ensures that only those regions with very low signal-to-noise ratios are being smoothed. In addition, note that ACDNR's edge protection is working flawlessly even on unprotected areas with such an aggressive filter.



:: PixInsight Home Page