Tuesday, November 29, 2011
Basic astrophotography image processing in GIMP - Part 2: increasing SNR (image alignment, integration and enhancement)
I thought this section deserved more attention. Leaving off in part 1, we discussed combining images - to use astrophotography jargon, stacking and aligning - more correctly, registration.
Please remember that these tutorials are intended for beginners, using very basic equipment and software. The methodology is the basics of image calibration and processing, but very much hands on, using what we have at our disposal.
Recapping, the purpose of combining images is to increase the signal to noise ratio (SNR); that is, less noise and more signal, improving the overall appearance of our combined final image - our integrated image (more jargon).
We are going to select the best light frames and combine them into a single image. But, noise reduction strategies start before uploading images to our computer. We employ a nifty method during image capture; that is, we make sure that our images are slightly offset one from the other during the imaging session (yet more jargon). The technical term for this is dithering, a science and a separate discussion altogether.
For our purposes however, we will take advantage of our fixed set up. We note that the stars move across the sky and change position from East to West at 15.0416 degrees/hour (the siderial rate), we let the stars drift across the camera sensor between exposures. Of course, after a while the object that we are imaging will drift out of view. For 6 or 10 images there should be no need to recenter our target.
In part 1 we exposed for 10 seconds. Adding a 3 second delay between exposures ensures that a few pixels separate the next image from the previous - in effect offsetting our images. Very crude dithering - effective all the same. And, furthermore, once complete, our total exposure time is 60 seconds vs 10 seconds. However, SNR increases by the square root of the number of combined images. 2 images increases SNR by 1.414 - approximating for our purposes.
So, starting where we left off in part 1, the image below shows the second and third images in our set of calibrated light images - we have already aligned the bottom and second image in the stack. In this case, the third image is selected with Mode set to Difference (and View 8:1, for clarity). This layer is transparent, showing the difference between the two images as they came out of the camera. We can use the drag tool to align the transparent (difference layer) with the image below.
And this is the result in Difference mode. The pixels have been aligned.
We then set Mode to Normal and select the image above, by selecting its ‘eye’ and highlighting the layer, setting its Mode to Difference. As before we drag the image into alignment with the image below, and so on up the stack.
Note: We loaded our images, File > Open as Layers, and need to deselect the ‘eyes’ of the images above the image that we are dragging so that it is visible.
The image below is the first of our image stack (the ‘eyes’ above it are deselected to make it visible). It’s noisy.

Lets see what happens when we average the images; that is, with Mode set to Normal for all images, (all ‘eyes’ selected), we set the Opacity slider of the bottom image to 100% - the default setting. Select the second image and set it to 50%, third to 25%, 4th to 12.5%, 5th to 6.3% and our 6th image to 3.1%.
As you proceed up the layers, note the change - dithering has been to good effect and pixels that were not removed during calibration are hidden behind good pixels. Additionally, because ambient noise is random the image is becoming less noisy. If we had 50 or 100 images, noise would be reduced even further. Still, for 6 images the result is impressive - as below - and much smoother.

Just to finish things off, Image > Flatten, to fuse all the layers together. Apply a sharpen algorithm to the luminous layer. This can be found at, FX-Foundry > Photo > Sharpen > Luminosity Sharpen. You can also use, Filters > Enhance > Sharpen (Smart Redux), or any of the available sharpen algorithms available for GIMP. Avoid the use of unsharp mask if you can. It too, tends to overdo the image (my personal view).

And here is our completed image.

For comparison, the image below is the final image from part 1, which is a single layer, as opposed to 6 layers in the image above.
Comparing the position of the constellation Orion on the frames shown, it should be evident that any one of our light images may be selected as the base or background image, framing the scene as preferred. Terrestrial objects do not align in any case, and we have to live with that.

The availability of free programs to perform calibration, registration and integration, and then using GIMP to finish off with brightness, contrast, colour and enhancement, makes the process much easier. (Keep in mind that images that contain terrestrial objects may interfere with alignment in some programs, essentially designed to align stars).
The next step perhaps, is to use RegiStax or Deep Sky Stacker (DSS) to do all the heavy lifting (calibration, registration and integration of our images) and follow up with GIMP. Now we are getting into serious amateur stuff. But, we can still use our fixed tripod/camera set up, to take beautiful shots of the Milky Way, well beyond the spectrum of the human eye.
Perhaps you need one of these.