The Officially Unofficial Reference Guide
ATrousWaveletTransform
(ATWT) is an extremely rich and flexible processing tool that you can
use to perform a wide variety of noise reduction and detail
enhancement tasks.
The à
trous (with holes)
algorithm of discrete wavelet transform is an elegant and powerful
tool for multiscale (multiresolution) analysis of images.
With ATWT you can perform a hierarchical decomposition of an image into a series of scale layers, also known as wavelet planes. Each layer contains only structures within a given range of characteristic dimensional scales in the space of a scaling function. The decomposition is done throughout a number of detail layers defined at growing characteristic scales, plus a final residual layer, which contains the rest of unresolved structures.
By isolating significant image structures within specific detail layers, detail enhancement can be carried out with high accuracy. Similarly, if noise occurs at some specific dimensional scales in the image, as is usual in most cases, by isolating it into appropriate detail layers we can reduce or remove it without affecting significant structures.
ATrousWaveletTransform comprises two main sets of parameters to define the layered decomposition process and the scaling function used for wavelet transforms, respectively.
Dyadic: Detail layers are generated for a growing scaling sequence of powers of two. The layers are generated for scales of 1, 2, 4, 8... pixels. For example, the fourth layer contains structures with characteristic scales between 5 and 8 pixels. This sequencing style should be selected if noise thresholding is being used.
Linear: When selected as Linear, the Scaling Sequence parameter is the constant difference in pixels between characteristic scales of two successive detail layers. Linear sequencing can be defined from one to sixteen pixels. For example, when Linear 1 is selected, detail layers are generated for the scaling sequence 1, 2, 3, ... Similarly, Linear 5 would generate the sequence 1, 6, 11, ...
Layers: This is the total number of generated detail layers. This number does not include the final residual layer, which is always generated. In PixInsight you can work with up to sixteen (16) wavelet detail layers, which allows you to handle structures at really huge dimensional scales. Modifying large scale structures can be very nice when processing many deep-sky images.
Scaling Function: Selecting the most appropriate scaling function is important because by appropriately tuning the shape and levels of the scaling function, you gain full control on how finely the different dimensional scales are separated.
In general, a smooth, slowly varying scaling function works well to isolate large scales, but it may not provide resolution enough as to decompose images at smaller characteristic scales. Oppositely, a sharp, peak-wise scaling function may be very good isolating small scale image features such as high-frequency noise, faint stars or tiny planetary and lunar details, but quite likely it will be useless to work at larger scales, as the global shape of a galaxy or large Milky Way structures, for example.
In PixInsight, à trous wavelet scaling functions are defined as odd-sized square kernels. Filter elements are real numbers. Most usual scaling functions are defined as 3×3 or 5×5 kernels. A kernel in this context is a square grid where discrete filter values are specified as single numeric elements. Here's a more detailed description of the different scaling functions offered in PixInsight's ATWT tool:
3×3 Linear Interpolation: This linear function is a good compromise for isolation of both relatively large and relatively small scales, and it is also the default scaling function on start-up. It does a better job on the first 4 layers or so.
5×5 B3 Spline: This function works very well to isolate large-scale image structures. For example, if you want to enhance structures like galaxy arms or large nebular features, use this function. However, if you want to work at smaller scales, e.g. for noise reduction purposes, or for detail enhancement of planetary, lunar or stellar images, this function is a bad choice.
3x3 Gaussian: This is a peaked function that works better at isolating small-scale structures, so they can be used to control a smoothing effect among other things.
3×3 Small-Scale: A peak-wise, sharp function that works quite well for reduction of high-frequency noise and enhancement of image structures at very small characteristic scales. Good for lunar and planetary work, for strict noise reduction tasks, and to sharpen stellar objects a bit. For deep-sky images, use this function with caution. The main difference between the 5 different 3x3 Small Scale functions ATWT provides is in the strength/value of the central value of the 3x3 kernel: 4, 8, 16 32 or 48.
5x5 Gaussian: Same as the 3x3 Gaussian but using a 5x5 kernel.
5x5 Peaked: The more pronounced the peak of a scale function is, the more surgical it will be on small scale structures and the less suitable it'll be to isolate large scale structures. As its name indicates, the 5x5 peaked function uses a rather pointy 5x5 kernel.
7x7 Peaked: The two 7x7 kernels (1 and 0.5) provide even more peakedness than the previous kernels.
See below a 3D plot comparison between the 5x5 Gaussian, 5x5 Peaked and both 7x7 Peaked kernels, as defined in PixInsight:

The window below the pull-down option to define the scaling function will show the generated layers. Individual layers can be enabled or disabled. To enable/disable a layer, double-click anywhere on the layer's row. When a layer is enabled, this is indicated by a green check mark. Disabled layers are denoted by red 'x' marks. The last layer, R, is the residual layer, that is, the layer containing all structures of scales larger than the largest of the generated layers.
In addition to the layer and scale, an abbreviation of the parameters specific to each layer -if defined - are also displayed.
Bias: This is a real number ranging from –1 to +15. The bias parameter value defines a linear, multiplicative factor for a specific layer. Negative biases decrease the relative weight of the layer in the final processed image. Positive bias values give more relevance to the structures contained in the layer.
Noise Reduction: For each detail layer, specific sets of noise reduction and detail enhancement parameters can be defined and applied simultaneously.
Threshold: The higher the threshold value, the more pixels will be treated as noise for the characteristic scale of the wavelet layer in question.
Amount: When this parameter is nonzero (and Noise Reduction has been enabled), a special smoothing process is applied to the layer's contents after biasing. The noise reduction amount parameter controls how much of this smoothing is used.
Iterations: This parameter governs how many smoothing iterations are applied. Extensive try out work is always advisable, but recursive filtering with two, three or four iterations and a relatively low amount value is generally preferable, instead of trying to achieve the whole noise reduction goal with a single, brute force iteration.
ATWT lets you define a specific transfer function for the residual layer.
Hyperbolic: A hyperbolic curve is similar to a multiplication by a positive factor slightly less than one, which usually will improve color saturation by darkening the luminance. The break point for the hyperbolic curve can be defined in the slider to the right.
Natural logarithm: The natural logarithm function will generally produce a stronger darkening of the luminance.
Base-10 logarithm: The base-10 logarithm function will result in a much stronger darkening of the luminance than the natural logarithm or hyperbolic functions.
When activated, k-sigma noise thresholding is applied to the first four detail layers. This technique will work just as intended if you select the dyadic layering sequence. The higher the threshold value, the more pixels will be treated as noise for the characteristic scale of the smaller wavelet layers.
Threshold: Defines the noise threshold, that is, it tells ATWT
Amount: Strength of the threshold
Soft thresholding: When enabled, the ATWT tool will apply a soft thresholding of wavelet coefficients instead of the default harder thresholding.
Use multiresolution support: Enable this option to compute the noise standard deviation of the target image.
Considered as a whole, when you use the ATrousWaveletTransform process for detail enhancement, what you are applying is essentially a high-pass filtering process. High-pass filters suffer from the Gibbs effect, which is due to the fact that a finite number of frequencies have been used to represent a signal discontinuity in the frequency domain.
On images, the Gibbs effect appears as dark artifacts generated around bright image features, and bright artifacts around dark features. This is the well-known ringing problem. Ringing is an extremely annoying —and hard to solve— issue in image processing. You probably have experienced this problem as black rings appearing around bright stars after unsharp mask or deconvolution.
However, ringing doesn't occur only around stars. In fact, you'll get ringing to some degree wherever a significant edge appears on your image and you enhance it, including borders of nebulae, galaxy arms, and planetary details, for example. In all of these cases, ringing is actually generating erroneous artifacts as a result of some limitations inherent to the numerical processing resources employed. Whether some ringing effects are admissible or not for a particular image is a matter of taste and common sense.
PixInsight's ATrousWaveletTransform implementation includes an efficient procedure to fix the ringing problem on a per-layer basis. It can be used for enhancement of any kind of images, including deep-sky and planetary.
Dark: Deringing regularization strength for dark ringing artifacts.
Bright: Deringing regularization strength for bright ringing artifacts.
Output deringing maps: Generate an image window for each deringing map image. New image windows will be created for the dark and bright deringing maps, if the corresponding amount parameters are nonzero.
Several operations executed during a wavelets transformation – such as a bias parameter - may result in some areas reaching the upper or lower limits of the available dynamic range. The dynamic range extension works by increasing the range of values that are kept and rescaled to the [0,1] standard range in the processed result. You can control both the low and high range extension values independently.
Low range: If you increase the low range extension parameter, the final image will be brighter, but it will have fewer black-saturated pixels.
High range: If you increase the high range extension parameter, the final image will be globally darker, but fewer white-saturated pixels will occur.
Any of these parameters can be set to zero (the default setting) to disable extension at the corresponding end of the dynamic range.
Target: Whether ATWT should be applied over to the luminance only, chrominance only, or luminance and chrominance.
The
HDRWT tool is PixInsight's implementation of the High Dynamic Range
Wavelet Transform algorithm by PixInsight's Vicent Peris. HDRWT is a
multiscale processing tool (HDRWaveletTransform) designed to control
the dynamic range of images. While wavelet transformations are able
to separate image structures as a function of their characteristic
scales, HDRWT is a step forward that further separates and isolates
individual wavelet layers and their contained structures. In this
way, local contrast of structures defined in a given wavelet layer is
not perturbed by larger structures defined in subsequent layers.
It is important to point out that the HDRWaveletTransform process must be tried out on previews that include the full range of brightness values that is present on the whole image; otherwise the obtained results on the preview won't be identical to what will be achieved for the image after applying the same instance.
Number of layers: This parameter is the number of wavelet layers to which HDRWT will be applied, using a dyadic sequence. A value of 6 for example (the default) means that HDRTW will be applied to scales of 1, 2, 4, 8, 16 and 32 pixels (the first 6 layers of a dyadic sequence). A value of 3 will only apply HDRWT to scales 1, 2 and 4.
Number of iterations: The HDRWT algorithm can work iteratively to converge to a solution where the image is completely flat above the scales where it has been applied. Here you define the number of times (iterations) you want to execute the defined HDRWT transformation.
Inverted: Enable inverted HDRWT iterations. This option can be useful to preserve shadow details.
Scaling function: Select a wavelet scaling function. Peaked scaling functions such as linear interpolation work better to isolate small-scale structures. Smooth scaling functions such as cubic B-spline work better to isolate larger scales. For a more detailed explanation of each of these scaling functions, review the documentation about the Scaling Function parameter for the AtrousWaveletTransform process.
To luminance: Apply HDRWT only to the luminance of color images.
Preserve hue: After applying HDRWT, recover the original hues.
Luminance mask: Use a luminance mask to protect dark background regions.
Small-scale: Deringing strength for small-scale ringing artifacts.
Large-scale: Deringing strength for bright ringing artifacts.
Output deringing maps: Generate an image window for each deringing map image. New image windows will be created for the dark and bright deringing maps, if the corresponding amount parameters are nonzero.
None: Don't apply a midtones transfer function.
Automatic: Apply an automatic midtones transfer function to recover the original median values.
Manual: Manually specify a midtones balance value, using the Midtones balance option (below these three options).