2.3 Stack Back | Up | Next

Video

Combining many individual sub-exposures into one image is generally called "stacking". This term comes from the days of film astrophotography where the process was invented. Two film images were literally stacked on top of one another, registered and then printed. This yielded an increased signal-to-noise ratio.

The same thing can be accomplished digitally. Individual pixel values can be added together and averaged to increase the overall signal-to-noise ratio in a digital image.

The following example has already been non-linearly stretched and the sky background has been neutralized so that we can see the improvement from stacking multiple originals. Normally we will do these steps in the next sections, but we've done them here first just for this comparison example because it is difficult to see how much stacking helps when you just look at a stacked linear image before it has been stretched.

Mouse Over
Star clouds can be seen in the spiral arms of galaxy M33 in this image. Hold your mouse cursor over the image to see a comparison between a single 10 minute exposure, and a stack of 6 frames with a total exposure of 60 minutes. These examples are enlarged 200 percent so the background noise is more visible.

In the mouse-over example above, we can see the dramatic improvement in the stack of 6 images with 60 minutes total exposure compared to a single image with 10 minutes of exposure. This example has been enlarged to 200 percent so the differences in the images are more visible.

Note how much smoother the sky background is in the stacked image. Also look at how much easier it is to differentiate true image detail, such as in the star clouds in the spiral arms of M33, from the background noise. The large blue blob at upper left is a reflection nebula in M33.

Both of these images have been calibrated with dark frames, a non-linear stretch applied, and the sky background color has been neutralized so that the differences could be seen. We will also apply these adjustments to our example image stack in the next sections.

Here in this section we are going to stack our six aligned light frames that have been calibrated.


Stack the Calibrated and Aligned Light Frames

In digital astrophotography, there are many different ways that sub-exposures can be mathematically combined into a master light frame:

  • Average
  • Add or Sum
  • Median

The most common is a simple average where the frames are all added together and then divided by the total.

Straight addition can also be used, but care must be taken not to clip data if the working bit depth is not large enough to handle high pixel values that can result in some images.

Averaging and adding yield the same results in terms of the resulting signal-to-noise ratio. Median combining yields lower signal-to-noise ratios in the final image, but can greatly reduce the effects of rouge pixels in a single exposure, such as from satellite trails.

Addition must be performed in 32-bit floating point math or images may be clipped and data lost. This means you really can't use Photoshop to do addition because Photoshop is limited to 16 bits.

Recommended

It is usually easier to use average, or a variation on averaging such as min-max exclude in Images Plus, as the stacking method.

There are many other methods of combining pixels, but adding, averaging and median combining are the most popular.

Specialty methods such as min-max exclude and Sigma apply special algorithms that examine the image and exclude pixels that are very far from normal, such as cosmic ray strikes and hot or dead pixels. These methods should be used with a minimum of 6 frames, and work better with the more frames that are used. Ray Gralak has written a freeware program called Sigma that works with FITS images that offers sophisticated variations on Sigma combining.

Median combining is also useful for dark frames and flat-field frames to eliminate cosmic-ray strikes, but more frames must be combined to equal the signal-to-noise ratio achieved with the average or add methods.


Stacking Images in Images Plus v2.8

We will now take the 6 images that we have been working on that have been calibrated and aligned, each a 600 second exposure of M33 at ISO 1600, and stack them together in Images Plus v.28.

You can do this automatically under the Process tab in v3.75 by checking the Combine box under the Process Tab in the section at the bottom called Perform After Calibration and Color Conversion.

Go to File > Image File Operations > Combine Files.

Initially a file open dialog box will open and you can select the image files to be stacked from where they are located on your hard drive. Then, the following dialog box will open:

Click the Standard Methods tab in the Combine Files dialog. This allows the choice of different mathematical methods of stacking, or combining, images.

1. Select Min Max Excluded Average as the combination method.

Image 1. Combine Files Dialog, Standard Methods Tab

Images Plus help file says that with this method, "the minimum and maximum of each stack of corresponding pixels is first calculated. The average of all pixels from the stack between the minimum and maximum value is calculated and assigned to the corresponding pixel in the combination image."

Average could have also been selected as the combination method, but Min Max Excluded Average does a very good job of eliminating rogue pixels.

You can experiment with using different mathematical combinations such as average, add, and median to see the results that these different methods produce.

Click the File Control tab in the Combine Files dialog.

2. Select the Output Directory.

3. Name the resulting stacked image.

4. Click the combine button.

Image 2. Combine Files Dialog, File Control Tab

The 6 calibrated and aligned images are now averaged together into a file called MasterLight_Min_Max_Exc_Avg.tif that looks like this:

Image 3. MasterLight_Min_Max_Exc_Avg.tif. This is a stack of 6 original sub exposures of galaxy M33, each 600 seconds long at ISO 1600. The 6 images were stacked in Images Plus using Min Max Excluded Average as the mathematical combination method.

Note that the file is a 16-bit linear file. It appears very dark and red/brown colored. All of the data is there, and the signal-to-noise ratio really has been improved by stacking, it is just hard to see right now.

Stacking using an averaging method will not make the image brighter, but it will improve the signal-to-noise ratio. We will make the image brighter and make faint details visible when we stretch the image with a Non-Linear Stretch in section the section 3.2. We will also correct the color by white balancing in section 3.1 and neutralizing the sky background in section 3.3.




Back | Up | Next