Image rotation and stacking

"Why is it that if someone tells you that there are 100 billion stars in the galaxy you will believe them, but if they tell you a wall has wet paint you will have to touch it to be sure ?"
On this page:


This program is similar to many astronomy programs in that it is meant to take several images and merge them. This process is used mainly on dark images to remove the noise level. The difference between this program and more professional ones are the following: it's free, it works with jpg (and png) format so you can use it with images taken with digital cameras, and finally it's much simpler. With this program you can for instance set your camera on a tripod, take a bunch of 30s exposures of the night sky (more time will lead to star trails) and stack them to enhance the contrast.

v1.0 — 2005/07/15 — Original release
v1.1 — 2005/08/12 — Minor modifications and bug fixes. Expanded destination image
v1.2 — 2012/12/29 — Added optional dark frame removal, file exclusion, wheel actions and a few user interface improvements. Increased possible image size (although that depends on underlying libraries)

RotAndStack in action, two stars have been selected. The original images are very poor: too dark and only a few stars are barely visible


Here are the steps of the alignment:

The program determines the rotation to apply to each image for an optimal alignment. It optionally saves each aligned image in the same directory with Aligned in the name. Then it merges all the images and it produces several images based on statistical computations:

The program doesn't display the resulting images, it only saves them as png files. You will want to open the resulting images in your favorite graphic program and try to enhance them further with various tools, among which the histogram adjustment and multiple layers are the most useful. The computation is not particularly fast but the number of images has no practical limit.

With version 1.2, I've added the ability to subtract a 'dark' file. The program can also try to estimate the dark file by itself if not available, but that's pretty experimental. See the [Advanced] button.

As usual, [right-clic] on a user interface control to get a short help about that control.

You can also use this program for enhancing normal dark images. Imagine you have a camera with exposure time limited to 15 seconds for instance. Put it on a tripod, take several shots, load the images in RotAndStack and just press [Rot'n'Stack]. No need to indicate alignment points for terrestrial images.

The result of stacking a bunch of the above images, after rotation, stacking and histogram maximization

Right: The result of stacking a bunch of the above images, after rotation, stacking and histogram maximization. Yes, this is the Milky Way as seen from the southern hemisphere.

Support my site: make a donation, buy images, use associate services
Download: Yes ! Yes ! Yes ! Where is it ? I want to download RotAndStack now (8Mb) !

Note: the source code is available on gitlab.

This freeware written with LabWindows/CVI.