Open Source Deep Sky Stacker (OSDSS)

Introduction

One of my great loves is space, I have always been in awe of it, and have spent countless hours staring in the sky, when I'm lucky enough to not be somewhere full of light pollution.

One day I'd like to get a telescope, but poor visibility and low funds prevent it from now.

As such, most of experience with what I see is with my eyes, and with my DSLR, which is a Nikon D60.

A constant problem you come across when taking photos is noise. Noise is random particles which hit the CCD of the camera when the photo is being taken, resulting in a very speckled image.

The hotter the ambient temperature of the CCD, the more noise you get. Cooling the CCD itself is possible, but requires modification of the camera, which I don't want to do.

The alternative I settled on is noise reduction using stacking.

The idea being that noise being random, each time you take a shot it will be different. As such it should be easy to filter out by comparing the images and only keeping the bits that stay the same.

Surprisingly, there didn't seem to be an open source deepsky stacker, that would work under Linux. There are many good programs out there, many are freeware, some commercial, but they all seem to be Windows only.

Having an interest in image processing, I thought I'd have a go at writing my own :)

This page chronicles my attempts so far.

Attempt 1

The first attempt makes use of off the shelf tools (specifically, panotools). Normally used for stitching images (most notably using the GUI Hugin) this little commandline script uses the tools for stacking images.

There are two stages. Stage one involves taking all your images, then cropping, resizing and positioning  them so everything is aligned correctly.

The second stage then takes the aligned images, and merges them together, enforcing areas that are similar, and reducing areas that are different.

Example

This example is of Orion's belt, which was taken with my Nikon D60 with a 15-105mm lens at iso1600. Nothing particularly special in optics and CCD.

The left is the original photo, while the right is a stack of 12 photos, merged together.

The reddish colouring is due to the light pollution, I took this on the outskirts of the city so it wasn't as bad as usual, but still a little tinted.

As you can see, the right image has far less noise than the left. The stars can still be seen well, but the noise was reduced. Indeed some extra stars seem to be visible in the right photo.

When I get clear skies and a bit of time, I'll try taking more photo's to see how the above program fairs (and what tweaks would help get it better).

 

 Source code

You can find the source code of my attempts so far at: github.com/ZivaVatra/OSDSS