In this Instructable I'm going to show how a little statistics-based magic can help you get outstanding star photos, even with a regular compact digital camera. All you really need are a camera and a computer, although a remote control for the camera and a tripod will make your life much easier.
Step 1: Why Stacking?
Firstly, the stars move around the sky, so on any exposure above about 15 seconds the stars will stretch out into curved streaks. This is a cool effect if it's what you're after, but if you want a picture of the sky as it appears to your eyes it's not helpful.
The second problem is that digital cameras pick up stray radio signals, cosmic rays, thermal vibrations and all sorts of other things which aren't starlight.
Thirdly, most cheap digital cameras will only take single exposures for a maximum of 15 or 30 seconds. An SLR with bulb mode will happily leave the shutter open for as long as you want, but this is a guide that will work with any camera. Fortunately, stacking images can get rid of all of these problems and increase the amount of detail visible in return for a little effort.
My examples will be taken from a set of photos I took of Cassiopeia and the surrounding sky. The image above shows a comparison of just Cassiopeia between one of my raw photos and the finished stack.
Step 2: How Does It Work?
Roll a dice once and you might get any result from 1 to 6. Roll it a thousand times, and you can be pretty sure the results will average out to about 3.5. If the results average to a different value, you can be fairly sure your dice is loaded. There's no way you could know that from a single roll, but by taking the average of lots of rolls you can see the pattern of behaviour. Your camera works the same way. If you take a single photo in the dark, it will look speckly. This is because of the random signals, or noise, the sensor picks up. This noise obscures the actual subject of your photo and means you can't tell what is a speckle and what is a dim star.
Taking lots of photos is the equivalent of rolling a dice a lot of times- you are taking a lot of samples of each individual piece of sky and taking the average brightness to eliminate random variations. The average value of a pixel that was pointing at a star will tend to be slightly brighter than a pixel that was pointing at dark sky, but this difference might be smaller than the random variations on any single photo.
In general, the more photos you take, the more uniform the background noise becomes after averaging and the more detail you can pick out. A statistician would say that the averaged photo contains more information than a single exposure- there's more meaningful detail.
Once you've got a composite made of the average of many photos, you can tweak the levels with image editing software so the background is the black you expect from the night sky and the stars stand out.
Step 3: How Do We Do It?
Point it at an interesting patch of sky, and take lots of photos. I use a tripod but you can just lie your camera on its back on a flat surface or prop it up. Ideally, take these photos using a remote so you don't have to touch your camera and risk jogging it. Even more ideally, use an intervalometer- there will be more on the intervalometer I made at my intervalometer Instructable. You can make one that works with many digital cameras with an Arduino and an IR LED.
For the best results, now put the lens cap on your camera or somehow block out all the light, and take more photos. You'll want to take the same number as you took of the sky, with the same ISO and shutter speed, with the camera at the same temperature. These are called dark frames, and they are used to improve the job of removing noise from photos. You don't need to do this if your camera has digital noise reduction (a feature where the camera takes a dark frame and subtracts it from the image for you).
Step 4: Get Processing
Well, if you're using software like RotAndStack or DeepSkyStacker, download your photos to your computer, remove any you don't want (if they have clouds on them, trails from aeroplanes flying overhead or other things you don't want) and open them with the software. It does all the tedious alignment, stacking and other bits and pieces for you. All you will have to do is to tweak some settings for the best results, and edit the levels once the stacking has been done for the best brightness balance.
The software is doing a few tasks that you can do by hand, but it's incredibly tedious. First it aligns all the photos so that the stars are in the same place. Good stacking software will save copies of your photos once it's aligned them so you can play with them in Photoshop if you want to by opening all the photos as layers.
Next, it does dark field subtraction. Sensor noise isn't entirely random- your camera's sensor will have a pattern to where the noise appears. On my camera, the noise tends to be brighter in the middle, fading to darker at the sides with a brighter patch at the bottom- see the image. Your stacking software will work our your camera's noise profile from the dark photos you took with the lens cap on. Subtracting this from the image means that whatever is left should be truly random noise distributed evenly over the image, so your end photo won't have brighter and darker regions.
Lastly it stacks all the photos up and takes the average of each pixel. This is the statistical wizardry that finds stars too dim to make out in any single exposure by reducing background noise. It may also save an image showing the brightest value seen for each pixel- this is usually a compromise, more speckly than the averaged image but with more faint stars visible.
At this point you have an averaged image which contains as much detail as you are going to get from your raw photos. It's now up to you to tweak the light levels of your stack to make your image look better. Tthe aim is to adjust the levels so that the background grey in the image is just darkened to black, and all levels above that are lightened to make the stars more visible. You can do this in your favourite image editor, where the Curves operator comes in very handy, but it's out of the scope of this Instructable to explain that.
Finally, I can't leave out a mention of GuiltyPixel's instructable on astrophotography. He goes into way more detail than I have here, and if you want to know more about the subject it's well worth a read. Incidentally, I was just about to publish this Instructable last November when his was published first, and I was so dispirited by how much better it was that I put off publishing mine until now :)