LRGB Processing



Image Processing Example - M81 (Bode's Galaxy)

The following steps show how I process LRGB images. An image of M81 will be used to illustrate this, beginning with calibrated image frames, and ending with a finished image ready for web display. Ofcourse this is one of the many ways to process LRGB images and probably there are beter.

This processing example uses the following software packages:

  • K3CCDTools 3
  • IRIS
  • Pixinsight LE
  • Photoshop CS2

Where links appear in the text below, it leads to another page which contains a detailed explanation of the necessary steps for this operation.
Step 1: Pre-processing raw data

These AVI's were taken with an 250mm F/6 Newtonian telescope and ATIK16IC camera.

The raw files have been calibrated (dark subtracted, flat fielded), and aligned with each other with K3CCDTools 3 and saved as 16 bit signed FIT files (monochrome). [filename_L.FIT, filename_R.FIT, filename_G.FIT, filename_B.FIT]
Luminance File.

This file is a stack of 40 sub-frames, each exposed for 30 seconds, unbinned, through a True Technology Clear filter. There's no surprise for the fact that the original raw image seems nearly black when opened for the first time. It is a normal situation when working with raw CCD images that the effective dynamic range is much smaller than the available dynamic range. In this case, a 99.9% of the total pixels are contained by a small initial segment of 2200 discrete levels in the native 16-bit range.
Red File.

This file is a stack of 20 sub-frames, each exposed for 30 seconds, unbinned, through a True Technology Red filter. There's no surprise for the fact that the original raw image seems nearly black when opened for the first time. It is a normal situation when working with raw CCD images that the effective dynamic range is much smaller than the available dynamic range. In this case, a 99.9% of the total pixels are contained by a small initial segment of 2200 discrete levels in the native 16-bit range.
Green File.

This file is a stack of 20 sub-frames, each exposed for 30 seconds, unbinned, through a True Technology Green filter. There's no surprise for the fact that the original raw image seems nearly black when opened for the first time. It is a normal situation when working with raw CCD images that the effective dynamic range is much smaller than the available dynamic range. In this case, a 99.9% of the total pixels are contained by a small initial segment of 2200 discrete levels in the native 16-bit range.
Blue File.

This file is a stack of 20 sub-frames, each exposed for 30 seconds, unbinned, through a True Technology Blue filter. There's no surprise for the fact that the original raw image seems nearly black when opened for the first time. It is a normal situation when working with raw CCD images that the effective dynamic range is much smaller than the available dynamic range. In this case, a 99.9% of the total pixels are contained by a small initial segment of 2200 discrete levels in the native 16-bit range.
Step 2: Creating RGB image in IRIS

If your run IRIS for the first time you may define your working directory in File|Settings on your toolbar. Copy your under step 1 aquired files to this IRIS working directory and rename them as [L.FIT, R.FIT, G.FIT and B.FIT]. Open de commandbox by clicking the button on the toolbar and follow below procedure, using this commandbox, in order to create the Raw RGB image.

  • LOAD L

  • COREGISTER L R

  • SAVE I1

  • COREGISTER L G

  • SAVE I2

  • COREGISTER L B

  • SAVE I3

  • LOAD I1


  • Move the upper slider of the thresholdbox to the left in order to make stars visible, this action doesn't affect the image but it only affects the display apperance. Then select a star by drawing a square around a non saturated star and type in the commandbox:

  • SCALECOLOR I J 1 3

  • TRICHRO J1 J2 J3

  • SAVETIFF RGB_COMPOSITION


  • The RGB composite image is now saved as a 16 bit TIFF file. I moved the upper slider of the thresholdbox to the left in order to make the result visible on my computer screen.
    Step 3: Processing of the luminance image

    Astronomical image data generally has most of the interesting signal in the lower part of the range of possible pixel values. While a few stars may have saturated cores, the vast majority of the nebulosity or galaxy detail is not very bright.

    As an example, the raw Luminance file is shown on the right with a screen stretch of zero to 65536 (64k), the full range of this camera. If youload the image into PixInsight in this form, this is what it would look like.
    Open PixInsightLE and load the Luminance file. First step is to do initial histogram adjustment on the raw image. Significant image data is constrained to a narrow peak around 16-bit level 2250 (for this example). By using the zoom and pan features on the Histograms window, very precise transformations can be defined. In this case, clipping a 0.8% of the total pixels at the shadows is a critical adjustment because if too high of a clipping value is used significant data will be destroyed. An extremely aggressive midtones transformation is used (0.00102).



    The initial histogram adjustment result with :

  • Result image (on the left side)
  • Histogram (upper graph is the resulting histogram)


  • After histograms, the image is far from having a reasonable brightness/contrast equilibrium. In particular, the sky background is represented by very high pixel values, and more contrasted nebular features would be desirable. The ideal tool to fix these problem is Curves.
    Next step is to do some small-scale noise reduction with wavelets. A detailed description of this rather complex processing part can be found here : Wavelets + SGBNR Tutorial
    The question now is : are we done with noise reduction for this image? There is still a lot of noise at relatively large dimensional scales that is crying to be removed. This noise is more prominent on sky background areas, where signal-to-noise ratio is weak by nature.

    We can cope with this by masked SGBNR processing. First we have to build a SGBNR mask, we do this as follows :

  • Make a duplicate of the image, this will be our SGBNR mask

  • Invert the mask

  • Blur the mask slightly (wavelets)

  • Use Histograms to adjust brightness and contrast for the mask


  • The SGBNR mask is now ready for use on the image. Select the working image. From the main menu, select Mask|Select Mask, or press Ctrl-M.



    By default, masks are shown in PixInsight but if you want to see the image as it is select Mask|Show Mask from the main menu (this has no affect on your result). Now comes the trail and error, as I call it, part. While the SGBNR mask is activated we apply large noise reduction. Normally I "play" with the "low pass filter" and the "edge protection" options in the SGBNR toolbox until I'm pleased with the result.
    At this point, the Luminance layer is ready.
    Step 4: Processing of the RGB image

    Processing the RGB image is the same as for the Luminance layer.
    Step 5: Combining the Luminance and RGB images

    Open Photoshop CS2 and load the luminance and RGB images. Activate the luminance layer and select all [CRTL + A] and copy it to the clipboard [CRTL + C]. Then activated the RGB image and paste [CTRL + V] the luminance layer on top of it and activate "luminosity" in the Layers checkbox. If necessary align the two images and flatten the layers. Finally you can do some final tweaks like color balans, contrast etc. Save your result as a PSD file for future use and as a JPG file for web publishing.

    Now you're ready with processing your carefully imaged data.
    © Copyright Rob Kantelberg