PixInsight Standard Tutorial
Planetary Image Processing in
PixInsight Standard: Jupiter Image by Chris Go


By Juan Conejero (PTeam)
Image raw data acquired by Christopher Go

:: PixInsight Home Page

0. Introduction

Source Data

1. Preparing Raw Data

1.1 RGB Combination
1.2 Channel Alignment
1.3 Initial Crop
1.4 Conversion to a Floating-Point Sample Format

2. Luminance Processing

2.1 Defining a Custom RGB Working Space
2.2 Extracting the Luminance
2.3 Previewing Wavelet Layers
2.4 The Wavelet Transform

3. Chrominance Processing

3.1 Protecting Significant Structures
3.2 Selecting a Noise Reduction Filter and Related Parameters

4. LRGB Combination

5. Additional Detail Improvement

6. Rotating, Resampling, and so on

6.1 Rotation and Mirror
6.2 Uniform Background
6.3 Resampling

Final Processed Image


0. Introduction

Under excellent seeing conditions, and armed with exquisite optics, amateur astronomers are producing today outstanding planetary images that were inconceivable just some years ago. This is possible thanks to low-cost video cameras that allow capturing thousands of frames during relatively brief intervals, which can be registered and integrated with specialized software to yield planetary images with extremely high signal-to-noise ratios.

In this tutorial, we present a step-by-step processing example with a high resolution planetary image, utilizing our new ATrousWaveletTransform process that has been included in the default set of modules of the new PixInsight Standard application. As of writing this tutorial, ATrousWaveletTransform is available in the latest time-limited public beta version of PixInsight Standard.


Source Data

We have written this tutorial around a high-resolution color image of Jupiter. Raw RGB data of this image have been acquired by Christopher Go, of Cebu, Philippines, who has kindly given us permission to use it. Chris has made a great contribution by proposing these raw data, of exceptional quality, as a processing challenge on some specialized forums.


Jupiter on June 21, 2006 12:31 UT, acquired by Christopher Go from Cebu, Philippines. Image processed by the author with the techniques described in this tutorial.


1. Preparing Raw Data


1.1 RGB Combination

Raw data for this example comes as three separate grayscale images corresponding to individual RGB channels. Each one of these images is the result of registering and integrating (also known as stacking) a large set of video frames. This initial preprocessing work has been done in the Registax application. Our first step is combining these channels to form a single RGB color image. Figure 1 shows how the ChannelCombination process can be used to perform a RGB combination very easily.


Figure 1— Combining raw individual channel images as a single RGB color image. Click on the image to see a full-size version.


To help identifying them, individual channel images can be assigned appropriate identifiers (Red, Green, Blue in Figure 1). To edit an image identifier, double-click its view selector, or right-click on it and select Identifier from the context menu.

The ChannelCombination process must be executed globally to generate a new RGB color image (identified as Image04 in Figure 1). To execute the process in the global application context, click the sphere icon () on the interface's control bar.


1.2 Channel Alignment

The three raw channel images have not been mutually registered, so we must carry out this work before going on.

At the time of writing this article, the public PixInsight Standard beta application still lacks image registration tools. A specific channel registration process will be implemented and included in the standard set of processes. However, we can use the ChannelMatch process to achieve channel registration very accurately, though this process requires some manual work. Figure 2 shows the ChannelMatch interface being used to register channels in this example.


Figure 2— Applying the ChannelMatch process to register RGB channels. Click on the image to see a full-size version.


The ScreenTransferFunction interface can be used to improve visibility of raw data, if necessary. One can also apply a rough wavelet transform to facilitate the work of aligning on a small image feature. This is what we did to derive the translation offsets, relative to the green channel:

Red offsets: dx=+7.25, dy=–2.0
Blue offsets: dx=+21.5, dy=+16.0

We have assumed that individual RGB channels are neither rotated nor scaled/distorted mutually. Perhaps a more accurate work could be done by registering the raw images in a specialized software, but our results have been satisfactory with this manual procedure.


1.3 Initial Crop

After channel alignment, the image shows colored rows and columns of pixels on some of its borders. This can be problematic because some algorithms that are based on global statistical properties can be fooled by these artifacts. For this reason, and to reduce the area of the working image, which in turn will facilitate our work, we have cropped it at this point. On Figure 3 you'll see how we did this with the DynamicCrop interface.


Figure 3— Initial crop with the DynamicCrop interface. Click on the image to see a full-size version.

DynamicCrop allows you to crop, rotate and scale an image interactively, in a single operation. However we have used this process to perform a simple crop with no rotation at this initial stage. The crop size should not be too small, as we are going to work at relatively large scales in subsequent wavelet transforms. We have cropped to more than 500 pixels, which gives us room to work at scales of 128 pixels.


1.4 Conversion to a Floating-Point Sample Format

This step is not strictly required, but highly recommended. The raw images have been stored as TIFF files with 16 bits per sample. This sample format is normally sufficient to perform moderately complex processing works, but for complex operations like wavelet transforms, a floating point format is preferable.

The PixInsight Standard platform allows you to use the 32-bit and 64-bit IEEE 754 floating point formats (also known as single precision and double precision, respectively). The 64-bit format can be useful to apply some critical operations to images requiring extremely large dynamic ranges. This happens with many deep-sky objects; M42 (The Great Orion Nebula) is a paradigmatic example. For planetary images, the 32-bit floating point format is sufficient. Another good option would be the 32-bit integer format, also available in PixInsight Standard, 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.

Figure 4 shows the SampleFormatConversion interface applied to the RGB combined image, to convert it to the 32-bit floating point format.


Figure 4— Converting the RGB image to the 32-bit floating point sample format with the SampleFormatConversion interface. Click on the image to see a full-size version.


2. Luminance Processing

We are proposing here a strategy based on separate processing of the luminance and chrominance components of the image. Sharpening, noise reduction and image restoration techniques should not be applied directly to the three nominal channels of a RGB color image. This includes, without limitation, techniques and algorithms like unsharp mask, deconvolution, and multiscale processing with wavelets.

To better understand the problem here, consider that by processing a RGB image as a whole, each channel is being handled as an independent image without relations to the other channels, which is not true. Actually, pixel values on each channel have two contributions to the entire image: one for the luminance —the brightness, independent of color— and another one for the chrominance —the hue and saturation of color, independent of brightness.

Human vision has fairly poor spatial resolution when the details to be perceived consist only of color differences. Our vision system perceives detail through the luminance almost exclusively. For this reason, luminance and chrominance should always be handled separately for the tasks of detail enhancement and noise reduction.


2.1 Defining a Custom RGB Working Space

So it is clear that we need to separate the image into its luminance and chrominance components. However, such a separation cannot be done (or should not be done) without appropriate tools and implementations. In PixInsight, a different RGB working space (RGBWS) can be defined for each image. A RGBWS defines how luminance/chrominance separations are performed. RGB working spaces are colorimetrically defined and rigorously implemented in PixInsight.

Among many other aspects, the most important parameters that a RGBWS specifies are the relative weights, or luminance coefficients, used to define the contribution of each RGB channel to the luminance of the image. These luminance coefficients are expressed in a normalized way: for example, if red counted twice as green to define the luminance, we could have 1.0 and 0.5 as the coefficients for red and green, respectively.

Standard RGB working spaces are used for color management, and are associated to particular images through ICC profiles. Color management comprises color spaces and transformations to achieve consistent color through different imaging devices. While PixInsight is a fully color-managed environment, a RGBWS in PixInsight is used strictly for pure image processing tasks. By defining a custom RGBWS, luminance coefficients can be adjusted to represent as much information as possible in the luminance, where the information, under the form of image structures, is actually visible. At this point, you may want to read the documentation section on RGBWS, pertaining to the official PixInsight LE documentation, and perhaps the section about color management.

The standard sRGB color space is the default RGBWS in PixInsight. This is by no means the optimal choice, but has been set in this way by design to achieve a default behavior consistent with most imaging applications. The sRGB space defines the following luminance coefficients (relative to the D50 reference white):

Red

0.222491

Green

0.716888

Blue

0.060621

The above figures say that green counts in excess of ten times more than blue for the calculation of luminance, and some three times more than red. This can be true in terms of human visual perception, but it is clearly wrong in terms of the information contents transported by each color in an astronomical image. In deep-sky images, green is not present but on stellar images and O-III regions of some planetary nebulae. Contrarily, red and blue are essential to describe emission and reflection nebulae.

In our present Jupiter image, is one of the three colors more relevant than the others, in terms of the information that it describes? We don't dare to guess here, so we'll simply define a custom RGBWS where the three RGB colors have identical coefficients, and hence the same contribution to the luminance. While this may not be strictly true, it is not too wrong either. On Figure 5 you can see the RGBWorkingSpace interface with the custom RGBWS defined. Note the three luminance coefficients with a value of 1.0. This RGBWS has been applied to the RGB combined image, and will remain active for luminance/chrominance separations from now on.


Figure 5— Custom RGB working space with equal luminance coefficients, defined and applied with the RGBWorkingSpace interface. Click on the image to see a full-size version.


2.2 Extracting the Luminance

The luminance of the RGB image, as the L component in the CIE Lab color space, can be easily extracted as a grayscale image with the ChannelExtraction interface, as shown on Figure 6. This is the luminance that we'll process with wavelets in our next processing step.


Figure 6— Extracting the luminance as the L component of the CIE Lab color space, with the ChannelExtraction interface. Click on the image to see a full-size version.


2.3 Previewing Wavelet Layers

Now we are ready to start luminance processing. As we have said, the main tool that we'll use in this example is the new ATrousWaveletTransform process in PixInsight Standard. However, before applying wavelets, it is always a pretty good idea to perform a detailed analysis of the image to learn the kind of image structures that are present in different wavelet layers. This is in fact an essential preparatory step if we want to achieve a consistent and well founded processing.

The ATrousWaveletTransform interface has several layer preview modes. In these special modes, the process isolates a given wavelet layer and generates an accurate representation of its contents. An example is on Figure 7, where the first wavelet layer of the image is being isolated in this way.


Figure 7— The ATrousWaveletTransform interface working in layer preview mode. Click on the image to see a full-size version.

The ATrousWaveletTransform interface has in fact four layer preview modes:

  • All Changes. In this mode, the entire selected wavelet layer is represented. White pixels correspond to the largest positive wavelet coefficients, that is, to those pixels that will be brightened by increasing the bias parameter for the selected layer. Black pixels correspond to the most negative wavelet coefficients, hence to pixels that will be darkened by increasing bias. From white to black, intermediate gray levels correspond to the full range of wavelet coefficients in the selected layer.
  • Increasing Pixels. Only positive wavelet coefficients are represented. White pixels are the largest positive wavelet coefficients. Black pixels are wavelet coefficients that are less than or equal to zero.
  • Decreasing Pixels. Only negative wavelet coefficients are represented. White pixels are the largest negative wavelet coefficients. Black pixels are wavelet coefficients that are greater than or equal to zero.
  • Significant Structures. This preview mode represents those image structures that the integrated noise reduction algorithm will try to preserve while smoothing the selected wavelet layer. We'll review this special mode later, when we apply noise reduction to the image.

Now let's use the All Changes layer preview mode of ATrousWaveletTransform to take a survey of image structures at several dimensional scales. The result is on Figure 7a.


Layer #1 - Scale of 1 pixel


Layer #2 - Scale of 2 pixels


Layer #3 - Scale of 4 pixels


Layer #4 - Scale of 8 pixels


Layer #5 - Scale of 16 pixels


Layer #6 - Scale of 32 pixels


Layer #7 - Scale of 64 pixels


Layer #8 - Scale of 128 pixels

Figure 7a— The first eight wavelet layers in the dyadic scaling sequence, using the default 3x3 linear interpolation scaling function of ATrousWaveletTransform. Click on the images to see full-size versions.


The analysis on Figure 7a gives us crucial information about the contents of the present Jupiter image:

  • The first wavelet layer contains most small-scale noise (or high-frequency noise, if you prefer the Fourier terminology). By comparing it to the second layer, note that there is virtually no image structure in the first layer without an almost identical counterpart in the second one, except noise. If the image didn't have those ring artifacts near the limb, perhaps we could consider the possibility of extracting some edge detail from the first wavelet layer, applying also a thorough noise reduction, but those ring artifacts make the task risky. So we'll remove the first wavelet layer from the wavelet transform.
  • The second wavelet layer is where most interesting details are present. Note that the third layer does not provide counterparts to the tiny structures that we are willing to bring out, so we definitely have to pay special attention to enhance this layer. It contains some noise, which we call medium-scale noise; we'll have several opportunities to remove it by applying the integrated noise reduction algorithm in ATrousWaveletTransform. Unfortunately, it also contains strong replicas of the ring artifacts. These artifacts will force us to be more careful than usual, limiting our possibilities to extract details to some extent.
  • The third wavelet layer, at the scale of four pixels, contains many structures, but it actually does not provide anything not present in the second wavelet layer, and with much sharper edges. This means that we'll simply leave this layer untouched. There is no need to remove it since it contains no appreciable noise, and its contribution to the overall illumination is important.
  • The fourth and fifth layers, at scales of 8 and 16 pixels respectively, can be enhanced to improve contrast in the main equatorial bands and other moderately large structures. Remember that dark pixels in a layer preview correspond to pixels that will be darkened by increasing the bias parameter.
  • Layer number six, at the scale of 32 pixels, does not seem very interesting and could lead to ringing problems by enhancing it. We'll not modify it.
  • Layers seven and eight contain overall illumination patterns, especially the scale of 128 pixels. We'll use these layers to preserve the three-dimensional aspect of the planetary disk, avoiding a flat look that we don't like.
  • Finally, above the scale of 128 pixels, there are no image structures at all, so there is no need to include more than eight wavelet layers in the wavelet transform.


2.4 The Wavelet Transform

Figure 8 shows an initial try with the second wavelet layer and default ATrousWaveletTransform parameters, except the increased bias. A wonderful plethora of details and small image structures brings out easily, in a surprisingly natural way, showing us that we are facing an exceptional planetary image, among the best works of its class. A moderate amount of noise also appears, as we of course were expecting, but this is just a first contact with the image —let's continue with our pre-designed plan, and we'll see what this beast is going to afford us.


Figure 8— A first try with the second wavelet layer. Looks promising! Click on the image to see a full-size version.

Our complete wavelet transform for the luminance can be seen on Figure 9. Compare the parameters on the ATrousWaveletTransform interface with our previous plan, depicted at the end of Section 2.3.


Figure 9— The luminance wavelet transform. Click on the image to see a full-size version.

There are important aspects about the set of ATrousWaveletTransform parameters shown on Figure 9 that require a detailed explanation.

  • In first place, note the healthy effect (in our opinion) of the increased biases for the scales of 64 and 128 pixels. The planet's disk does not look flat, which always gives an overprocessed look. Instead, the natural 3-D appearance of the Jupiter's disk has been well preserved, and this has been achieved at no cost in terms of lack of detail enhancement.
  • Also note how the scales of 8 and 16 pixels are contributing to enhance contrast in the equatorial bands, polar regions, and many medium-scale dark structures.
  • The bias value of +12 that we have applied to the second layer is indeed high. This has been necessary because the luminance is quite weak, and large scales are very predominant. Think of revealing small-scale details with a wavelet transform like peeling an onion: large-scale structures are the outer layers, and small details are in the core. In the present onion, the outer layers are very very thick... still crying.
  • The residual layer has also been slightly biased. This is necessary because by biasing the seventh and eighth layers, we have caused ringing problems. This is the well-known ringing problem that is so infamous when it appears around bright stars in deep sky images, but this time occurring at very large scales. Ringing has manifested in this case as the dimmest limb regions severely burned out. Our ATrousWaveletTransform process includes an efficient deringing feature, but at such large scales it may introduce artifacts around the planet's disk. Biasing the residual layer compensates large-scale ringing effects and does not introduce any artifacts at all.

The following mouse-over figure demonstrates the roles that each wavelet layer plays in our luminance wavelet transform. Place the mouse cursor over the links at the right side of the figure.

Unprocessed luminance
This is the L component of CIE Lab, extracted from the RGB combined image.

Layer # 2 biased
Small-scale structures enhanced.

Layers # 2, 4, 5 biased
Medium and lage-scale structures well contrasted, like equatorial bands.

Layers # 2, 4, 5, 7 biased
We start recovering the overall illumination profile over the outer regions of the disk.

Layers # 2, 4, 5, 7, 8 biased
We have the full 3-D look on the whole disk.

Layers # 2, 4, 5, 7, 8, R biased
Biasing the residual layer is necessary to avoid burning the dimmest limb regions. The residual layer provides a large-scale illumination profile.

  • The default 3x3 Linear Interpolation scaling function has been used. The scaling function in a wavelet transform determines how well small structures are isolated into individual wavelet layers. A scaling function is just a two-dimensional distribution of values; for example, a Gaussian distribution (the well-known Gaussian bell) can be a pretty good scaling function. The more smooth a scaling function is, the more rough it is to isolate small structures. Oppositely, a sharp or peaked scaling function can be surgical to divide the image into many levels of small detail, but this means that it can be also more vulnerable to the noise. The default linear scaling function is a good compromise; later in this tutorial we'll have the opportunity to use a sharper scaling function.
  • With the exception of disabling the first wavelet layer, we have applied no noise reduction. We certainly could have applied it to the second layer, but we have good reasons to avoid it at this stage. The main reason is that we know that we'll apply a second wavelet transform to the luminance, to improve small-scale detail even more (see Section 5). Then we'll have much better control over the noise than now. Of course, this is possible because the original image has already very little noise —otherwise we'd have much more problems now.
  • The Dynamic Range Extension High Range parameter value allows us to perform the wavelet transform into a much wider dynamic range than the native range of the image. This is extremely important to avoid oversaturation of bright structures. Our goal must always be to yield a processed image without saturated pixels... well, a single saturated pixel is also acceptable.

With dynamic range extension
Layers 2, 4, 5, 7, and 8 biased, high dynamic range extension used to avoid saturation of bright image structures.

Without dynamic range extension
Same layer biases, but no dynamic range extension.

Figure 10 shows how the high dynamic range extension parameter value must be carefully adjusted to avoid saturation of the brightest details in the image. Under strong magnification, one must watch sample values to adjust the parameter to its lowest possible value. On Figure 10, note the 0.9920 readout being taken. I recall that in PixInsight all pixel values are expressed in the normalized range from zero to one (0=black, 1=white).


Figure 10— Obtaining pixel readouts over bright regions to adjust the High range dynamic range extension parameter. Click on the image to see a full-size version.

Finally, when we are happy with our results, the ATrousWaveletTransform process must be applied to the image. Until then, we have been using a preview to try out parameters. Figure 11 shows the luminance image just after having applied the wavelet transform.


Figure 11— The luminance after the wavelet transform. Click on the image to see a full-size version.

We want to point out that the processing strategy that we have implemented is by no means the only valid path that can be followed with images like the present one. For example, the HistogramTransform and/or CurvesTransform processes could be used to obtain the desired brightness and contrast levels.


3. Chrominance Processing

You may ask now why do we need a specific processing for the chrominance of this Jupiter image. Having processed the luminance, why not combine it with the RGB image, by direct substitution of the L component of CIE Lab, for example? The answer to this question is twofold:

  • On one hand, we have modified overall brightness and contrast of the original luminance considerably. The processed luminance cannot be merged with the original chrominance, simply because there is not enough chrominance to support it: we would obtain an almost grayscale image by doing so. At the very least, we would need to apply a nonlinear transform to the original chrominance, to adapt it to the new luminance with respect to overall brightness and contrast.
  • More crucially, we have enhanced small-scale structures of the luminance in such a way, that the original chrominance cannot give support to them, even after a global adaptation of brightness and contrast.

Fortunately, processing the chrominance in images like the present one is not difficult at all: having found a good way to improve the luminance, we'll use just the same procedure, but applying a much stronger noise reduction at small and medium scales. Since the chrominance does a very weak contribution to perception of details, we can smooth it much more than the luminance, as long as we provide sufficient chrominance support to significant luminance structures.

So the idea behind chrominance processing is to apply a wavelet transform, with strong noise reduction, to the original combined RGB image. This yields a smooth chrominance and an oversmoothed luminance, which will be discarded and replaced with the previously processed luminance.

Figure 12 shows the result of applying the same wavelet transform that we used for the luminance, but this time to the original, combined RGB image. Note that we have selected both luminance and chrominance on the Target section of the ATrousWaveletTransform interface.


Figure 12— Testing the luminance wavelet transform with the original chrominance. Click on the image to see a full-size version.

The obtained result is not bad, but don't ask now why aren't we happy applying this transform to the RGB image, because we are going to do much better than this. Shortly you'll see this point well demonstrated.

If you look at the full-size screenshot of Figure 12, you'll notice the presence of noise. Most of this noise is chrominance noise, which we are going to suppress now.


3.1 Protecting Significant Structures

Our new ATrousWaveletTransform process includes a powerful noise reduction algorithm that works on a per-layer basis. If you are accustomed to the wavelet noise reduction that we implemented in the PixInsight LE application, then prepare to see a completely different, much more efficient and accurate noise reduction in this new process.

The new noise reduction works with the help of a sophisticated significant structure detection algorithm. For a given wavelet layer, significant structures are detected and isolated as a protective mask used to avoid degradation of significant details during the low-pass filtering applied to remove noise. The significant structure detection algorithm performs most of its work in a completely automatic way; it just needs two simple parameters to be adjusted by the user: Threshold and Range.

  • The threshold parameter says where to start considering structures as significant, as a function of their relative brightness in the wavelet layer they pertain to. The lower the threshold parameter, the more structures will be considered as significant. However, too low of a threshold value can cause the algorithm to start considering some noisy structures as significant, which degrades noise reduction performance, due to overprotection.
  • The range parameter controls the strength of significant structure protection. The lower the range parameter, the higher protection. Too low of a range value can yield somewhat artificial results, if the transitions between protected and unprotected structures become too hard. Too high of a range value can lead to insufficient significant structure protection, which in turn leads to oversmoothed results.

To help the user in the task of finding the optimum values of these two parameters, which is actually very easy, the ATrousWaveletTransform interface provides a special layer preview mode, namely the Significant Structures preview mode. In this mode, white pixels are being fully detected as pertaining to a significant structures, while black pixels are completely outside any significant structure. Gray pixels correspond to partially significant regions. An example can be seen on Figures 13 and 14.


Figure 13— Previewing significant structures for the second wavelet layer of the combined RGB image, using the default Significant Structure Protection parameter values. Click on the image to see a full-size version.

On Figure 13, we have used the default set of parameters for significant structure protection (Threshold=1, Range=3). Note that many bright regions of the image are being considered as significant, and hence they will be protected during noise reduction. This includes many regions where the chrominance should be fully smoothed —remember that we can apply a heavy noise reduction to the chrominance without problems. On Figure 14, we have adjusted significant structure protection parameters to more reasonable values.


Figure 14— Previewing significant structures for the second wavelet layer of the combined RGB image, using custom Significant Structure Protection parameter values. Click on the image to see a full-size version.

We probably could have used even more restrictive parameters for the chrominance (less protected structures).


3.2 Selecting a Noise Reduction Filter and Related Parameters

As of writing this tutorial, the new ATrousWaveletTransform process includes three noise reduction filters (more filters have been planned and will be implemented in future releases):

  • Recursive Multiscale Noise Reduction. This is not actually a noise reduction filter, but an independent noise reduction algorithm that is very well suited for deep sky images. It basically works by iterating wavelet transforms applied to the coefficients of a selected wavelet layer. By successive iteration, the process converges to a solution where coefficients corresponding to noise have been removed or attenuated.
  • The Morphological Median Filter is well suited for planetary and lunar images with high amounts of noise at scales where there is little or no detail. Although this is a somewhat brute force filter, with the help of significant structure protection it can provide a very efficient noise reduction.
  • Directional Multiway Median Filter. This morphological filter is the best choice for high-resolution lunar and planetary images, as well as non-astronomical images, when the noise coexists with significant structures in one or more wavelet layers.

In all cases, it is generally preferable to use a lower value of the Amount parameter and many iterations, instead of a single iteration with a high filtering amount. By iterating, the filtering process leads to more consistent results and achieves a more efficient noise reduction.


Figure 15— Trying out chrominance noise reduction on a preview of the combined RGB image. Click on the image to see a full-size version.

Figure 15 shows the result of our chrominance processing. Note the noise reduction parameters for the second wavelet layer. Four iterations of the directional multiway median filter have been applied with a kernel size of seven pixels. This defines a strong noise reduction in this case, but we can afford it for the chrominance. Finally, we see on Figure 16 how we have applied the wavelet transform to the combined RGB image, after a good trial work on a preview.


Figure 16— The combined RGB image after the chrominance wavelet transform. Click on the image to see a full-size version.


4. LRGB Combination

Now that we have the luminance and the chrominance well processed, we obviously want to merge them. This can be done very easily in PixInsight with the ChannelCombination process, working in the CIE Lab color space, and extracting the CIE a and b components from the processed RGB image.

But once again, we have a much more powerful tool: the LRGBCombination process. With this process, we can:

  • Replace the luminance of the processed RGB image with the processed luminance, without requiring an intermediate conversion to the CIE Lab color space —LRGBCombination does all necessary color space conversions automatically.
  • Apply a dramatic color saturation enhancement with no chrominance noise increment, thanks to a high-performance chrominance noise reduction algorithm.
  • If necessary, apply a midtones transfer curve to the luminance, to fine tune its adaptation to the chrominance.
  • Optionally, apply linear color corrections by assigning weights (also known as combine ratios) to individual RGB color channels.

For a detailed description of the LRGBCombination process and a complete processing example, you can read this tutorial on LRGB combination in PixInsight Standard.

Figure 17 shows the LRGBCombination process being tested on a preview of the processed RGB image. Figure 18 shows the result and LRGBCombination parameters in more detail.


Figure 17— Trying out LRGBCombination on a preview of the processed RGB image. Click on the image to see a full-size version.

Note that we only have to specify the luminance source image, since the chrominance channels are those of the target RGB image. In this example, we are quite happy with the existing chromatic balance, so we haven't used different weights for any of the individual RGB channels.

We have applied a slight correction to the luminance (see the Transfer Functions group box on the LRGBCombination interface). This correction has darkened the image, but we definitely like the resulting overall contrast. Of course, we have increased also color saturation. You may think that we went too far in this sense, or perhaps you would have saturated it more than us; this is a matter of personal preferences.


Figure 18— A more detailed view while working with the LRGBCombination process. Click on the image to see a full-size version.

The chrominance noise reduction algorithm included in LRGBCombination is perhaps one of our best creations. It makes it possible to apply even brutal color saturation increments without chrominance noise amplification. Only two parameters govern this algorithm:

  • The number of smoothed wavelet layers determines the scales where the algorithm will remove noise in the chrominance of the image. More layers means more noise reduction. A value of 2 or 3 layers is appropriate for most high-resolution planetary images.

  • The number of protected wavelet layers defines a set of scales where the algorithm will pay special care to preserve small chrominance structures. More protected layers can help in preserving the color saturation of small structures, but can result in a comparatively less efficient noise reduction. This parameter usually gives good results when it is set to S-1 or S-2, where S is the number of smoothed wavelet layers.

To find the optimal parameter values, the best way to evaluate chrominance noise is by inspecting the image using one of the chrominance display channels in the PixInsight application. Figure 19 shows how the image looks like under the "CIE a=R b=G" display mode. In this mode, the CIE a component is mapped to red and the CIE b component is represented as green. Note that in this mode the luminance of the image is not represented at all.


Figure 19— Inspecting chrominance noise in the "a=R b=G" display mode. In this special mode, the CIE a component is represented as red and the CIE b component is represented as green. Click on the image to see a full-size version.

You can also select one of the CIE a, b, c and h components for display, and even the "L=0.5" special mode. In this mode, the image is represented with its luminance replaced with a constant value of 0.5, which isolates the chrominance in true color. The "L=0.5" mode is not very efficient to evaluate chrominance noise, though.


5. Additional Detail Improvement

The image looks pretty good now, but we think that it still has many small structures that could be greatly improved. An additional wavelet transform can be applied to the second wavelet layer, where we know that most small-scale structures are contained (see the discussion in Section 2.3). However, this new transform must be applied very carefully, since the noise is at this point awaiting us to make just a small mistake.

On Figure 20 you can see our additional wavelet transform, being tested on a preview of the LRGB combined image.


Figure 20— Additional detail enhancement with a wavelet transform applied to the second wavelet layer of the luminance. Click on the image to see a full-size version.

The following important aspects of this additional wavelet transform must be pointed out:

  • The 3x3 Gaussian scaling function has been used. This is a more peaked function than the default linear interpolation, and hence it is able to separate small structures with higher accuracy.
  • A careful, moderate bias value has been used for the second layer. A much larger bias here would add very little in terms of detail enhancement, but could boost noise very easily.
  • Noise reduction has been applied for the second wavelet layer, along with the bias parameter, to avoid noise intensification. This is one of the most powerful features of our implementation: bias and noise reduction can be used together for selected wavelet layers, to adapt them mutually. Note that many iterations have been used with a small amount.
  • Significant structure protection is essential in this transform. Note that the threshold and range parameters have been carefully adjusted.
  • Of course, this transform has been applied to the luminance of the image exclusively. There is absolutely nothing that the chrominance could do to improve details at this stage.
  • High dynamic range extension has been adjusted to ensure that no pixel becomes saturated.

The next mouse-over comparison can be used to evaluate the result of this additional wavelet transform. Of course, there is room for more improvement of small image features, but we like the obtained compromise between detail visibility and natural look. As happens so many times in astrophotography, this is a matter of preferences and common sense.

After the additional detail improvement
The LRGB combined image after applying the wavelet transform shown on Figure 20.

Before the additional detail improvement
The LRGB combined image.



6. Rotating, Resampling, and so on

We are now at the very final stages of our processing work. What remains to be done is usually thought of as a set of cosmetic adjustments, more than as true image processing, when compared to the complex procedures that we have implemented. However, these final steps are no trivia, and failure to apply them properly can ruin our efforts to some extent.


6.1 Rotation and Mirror

We have found that by rotating the image some 67.5 degrees counter-clockwise and mirroring it horizontally, Jupiter's disk is shown with its equator horizontally aligned, and with its north pole facing up. Figures 21 and 22 show these operations.


Figure 21— After rotating the image 67.5 degrees counter-clockwise with the Rotation process. Click on the image to see a full-size version.

On Figure 21, note that we have selected the bicubic spline interpolation algorithm for rotation. This algorithm provides higher numerical accuracy than bicubic interpolation, and is well suited when one wants to ensure that there will be no detail lost during rotation. With the selected block size of 5 pixels, the bicubic spline algorithm will interpolate each pixel from its 25 neighbors. After all, this image has required too much effort to degrade it now with a so simple operation... well, rotation is actually not so simple!


Figure 22— After horizontal mirror with the FastRotation process. Click on the image to see a full-size version.

The FastRotation process provides rotations by 180 degrees and 90 degrees clockwise or counter-clockwise, along with horizontal and vertical mirroring. This process never interpolates pixels: it performs its actions by copying and swapping pixel values, so there is no image degradation at all.


6.2 Uniform Background

Achieving a uniform background is actually a must for a planetary image —the spectator would be given a bad impression if we'd present this image over an irregular background. By rotating the image, we have introduced a nonuniformity, because the rotation algorithm has filled the four corners of the image with a constant value. In addition, wavelet transforms and other image restoration techniques can produce irregular backgrounds that are perceived as ugly artifacts.

The PixelMath process is the perfect cure in PixInsight for all these irregular background problems. With PixelMath you can define an expression that is applied to a set of images, pixel by pixel. Explaining the full syntax and capabilities of a complex process like PixelMath exceeds the scope of this tutorial, but you can review a PixelMath reference document if you are interested.

In our present case, we'll use the following PixelMath expression applied to our final image, after rotation and mirroring:

Max( $target, 0.03 )

This expression will replace every pixel below 0.03 (in the normalized range 0=black,1=white) with that value. This is simple but pretty efficient. The 0.03 value has been chosen after looking at the statistics of the image to verify that the whole background was below this number. In this way we have achieved a constant density of about a 98% of black over the entire background, which is very dark, but not pure black —a pure black background confers an unnatural look, in our opinion, and should be avoided.


Figure 23— Using PixelMath to achieve a uniform —very dark, but not black— background. Click on the image to see a full-size version.


6.3 Resampling

If the image has to be shown at different sizes, the Resample process is the tool of choice in PixInsight. Resampling can become a critical procedure, especially when downsampling extremely detailed images like this one. One must use a high precision interpolation algorithm to ensure that small structures will survive after downsampling, to the maximum possible extent.

Figure 24 shows how we obtained a half-size version of the image in this example, by applying Resample with the bicubic spline interpolation algorithm.


Figure 24— Downsampling with the Resample process and the bicubic spline interpolation algorithm. Click on the image to see a full-size version.



:: PixInsight Home Page