How does image stacking work for astrophotography? If you were to stack the photos onto each other, then surely they would be out of line, due to the stars moving, right? Even if you take pictures straight after another surely when stacking them they wouldn't look right.

I've heard about a star tracker; would you have to use one every time you did astrophotography stacking? If not then how does this work?

Also how many photos would you normally take when performing for photo stacking? 50, or more?


  • 2
    \$\begingroup\$ Did you do a web search on the terms "astrophotography" and "stacking"? Is there is anything left that the search results don't answer? \$\endgroup\$ Feb 8 at 8:15
  • \$\begingroup\$ Welcome to photo.stackexchange.com! Please have in mind, that this site works best with concrete questions that can have a direct answer. It is less suited for discussion type questions or bouquet questions where it is not one but a whole bunch of questions. \$\endgroup\$ Feb 8 at 11:24

4 Answers 4


The stacking method depends on the subject of the image.

Dim objects such as nebulae, galaxies, etc. are very dim and require long exposures (often many minutes) and these images will also contain numerous stars.

Bright objects such as the Moon or planets require very short exposures which are so brief that stars are usually not visible (unless the image is over-exposed).

Software that handles stacking for deep-sky (faint) objects, align the frames (image "registration") based on aligning the position of the stars in each frame so they neatly stack.

Software that handles the moon or planetary image (no stars visible) will align the "disk" of the object and will also look for areas of contrast that can be used to further help align the image.

If using a PC, "Deep Sky Stacker" is very popular (and free). AutoStakkert is very popular for lunar, solar, or planetary imaging. Registax is another popular stacking application on the PC (and free). Registax can do a bit more post processing (not just stacking) and some photographers will stack with AutoStakkert (which tends to do a bit better) and then take it into Registax for any additional tweaks.

The main difference in stacking is whether or not there are stars to help with image registration. (BTW, I use an advanced application designed specifically for astrophotography called PixInsight but it has a steep learning curve. I'd recommend starting with one of the simpler free options to learn the basics and avoid letting things get too complicated too quickly.)

When imaging deep-sky objects (faint objects), exposure times are often many minutes long and this means the objects are moving throughout the exposure. It is necessary to have a camera or telescope mount that can "track" the object. Classically this would be an "equatorial" mount (not an altitude/azimuth mount) because alt/az mounts can exhibit field rotation issues (the object will appear to rotate over the exposure duration -- how much depends on where the object is located in the sky) but this isn't a problem with equatorial mounts (often called "GEM" mounts for "German Equatorial Mount" to refer to the general design of the mount regardless of brand.)

If you are not using a telescope mount or camera attached to a telescope mount that can track, there are a number of tracking heads that can be used with an ordinary tripod and camera. The Sky Watcher "Star Adventurer" heads are popular, as are the iOptron "SkyGuider". There's also the Move-Shoot-Move "Nomad" tracker (a little less beefy and suitable mostly for lighter camera/lens combinations). There are others but these are a few examples of the popular models.

Astrophotographers refer to something called "total integration time" which is a complicated way of saying ... if you add up all the minutes of exposure (spread across all your images) ... how much time would that be? E.g. if you took 10 images and each image was a 5 minute exposure then your total integration time would be 50 minutes.

I prefer to have not less than 1 hour of total integration time but things improve noticeably if you go to 2 hours or 4 hours (on just one object) and I know astrophotographers who will shoot 40 or even 80 hours on just one object. But I recommend starting with a small number just to get an understanding of the process involved in image acquisition, image calibration, image integration, and image processing. Once you get the basics ... then you can up your game by collecting more image data per object and you'll find that you get better results.

You didn't ask, but I should offer ... I did mention "image calibration".

Astrophotography images need extra data to help improve the data. This includes dark frames (exposure identical to your normal exposures ... except with the lens covered so no actual light is collected). These result in capturing a profile of how your camera builds up "noise" including pattern noise, stuck pixels, and random noise caused by read-noise or even a problem called "amp glow". There are even quantum effects that cause noise. You would typically capture about half as many "dark" frames vs. the number of "light" frames you capture. It is important that these be captured using the same exposure values and the same ambient temperatures because those factors will alter the noise.

You would also capture a series of flat frames. A flat frame is an image of a plain white target free of any variation in light. A rather cheap way to do this is to point the camera into the sky in the direction opposite the sun, wrap a clean white t-shirt over the front of the lens (make sure there are no wrinkles) and take some "middle" exposures such that the histogram shows the most of the data is "middle gray" (neither white nor black). This allows the software to detect the vignetting pattern of your lens AND ALSO detect any dust-bunnies on your sensor. These do not need to be the same exposure as your lights ... they are usually very short exposures and you'll capture a couple dozen (it's a very fast process since they are short exposures).

Lastly, you usually want to capture something called bias frames. All exposures contain something called "bias data". You have a digital camera. In order for it to function, it has to "power up" the sensor and then capture the image. You might think that if you take the shortest possible exposure and the lens cap is on (no light can be collected) that every pixel will be completely black (pixel value = 0) ... but that wont be the case. Merely powering up the sensor causes pixels to have some positive non-zero value and this is the "bias" level of your camera. The bias frames are the shortest possible exposure your camera can take and you leave the lens cap on ... but DO set the ISO (or gain) to the same value you plan to use when capturing your normal photos. You'll have a few dozen of these but because they are extremely short exposures it only takes a few minutes to capture everything you need.

The stacking software will ask you to feed it all the bias frames and it will use these to create a "master bias" frame. It will also ask for the flat frames and will produce a "master flat" and it will ask for the dark frames and it will make a "master dark".

It will then calibrate each "light" frame to create a "calibrated light" by subtracting the master dark, bias, and flat.

These "calibrated light" frames then get aligned (registered) to a key frame that you select (all other frames will be nudged or rotated as needed to match the star pattern to the master/key frame). This produces "registered-calibrated-light" frames.

Ultimately, the "registered-calibrated-light" frames are combined (integrated) to produce a single "master light".

There are numerous choices for the integration algorithm... everything from simple "averaging" to more sophisticated "sigma clipping" algorithms (those are my favorite variations as they do the best job and finding and eliminated statistical anomalies in the data -- such as a plane flying through the field while you were capturing data -- and it only shows up in one frame but not the others.)


Most astrophotography applications include the ability to auto or manually align the stacked images so that the motion of the sky is compensated. Sometimes it works better than others. The degree of geometric distortion your lens has is one of the factors that will influence how well stacked images will align. The less the better. Any lens or sensor based image stabilization should also be turned off, as each of those can affect geometric distortion.


Also there are so-called 'barn door trackers' that align a bearing or hinge with the earth's axis and then use a geared motor to slowly rotate the camera and telescope to match the rotation of the sky.


A really really complicated topic and there are many different ways of doing it depending on what sort of astro-photography your doing to be honest. In my experience (and I'm sure there is going to be lots of people jumping on me here)..

For basic wide-field imaging, at beginner level, with a DLSR, then no, there is no real need to stack multiple exposures if you have a decent tracking mount; so no need to 'track and stack'. I asked this very question when I started out in a Q&A with a very well respected astro-photographer, and he said he'd not bother doing that.

If you use a well aligned tracking mount (and depending on your focal length of course), then you might get say a good 2-3 mins single exposure, rather than probably 20-25 sec with just a DSLR. You could still take multiple exposures to ensure you get a good one without periodic shake or gear misalignment though.

If you want longer than that you are probably looking at a PC guided mount and a guide scope to be honest.

Alternatively if you want to stack lots of individual images without a tracker you can do, and there is software that will auto-align your multiple images for you (PC and Mac both have software available to do this). But that might require additional 'dark frames', which are images taken at the same time, temperature and settings but with the lens cap on. I was taught 60+ light frames if possible, 15-20 dark frames and don't bother with bias frames. There is lots of you-tube content on this.

If you are looking at deep space imaging, nebula or planets then a whole different game. Hope this helps.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.