top of page
  • Ed Dozier

Sharper Moon Shots with AutoStakkert

When you want to get to the next level in getting really sharp distant object photos, like the moon, what do you do? Do you really need to get that $16,000-plus 800mm Nikkor?

There’s an enemy that keeps you from your sharpness goal, no matter how much you spend on gear. It’s called the atmosphere. So how do you minimize atmospheric “shimmer”? Here’s where software (and science) can come to the rescue.

Shooting the moon can be frustrating, for many reasons. After you get your big lens and really stable tripod, you quickly find you’re not done quite yet. You flip up the camera mirror, use a remote release, and even invoke the Electronic Front Curtain shutter. Even at a motion-freezing high shutter speed, you still aren’t getting satisfactory resolution. Evidently, elimination of subject motion and vibration still isn’t enough.

Your next step to sharpness is based on image stacking. You might think that you need a motor-driven “equatorial mount” to counteract the Earth’s rotation to successfully combine your multiple shots, but actually you don’t. The software can fix that.

The software I’m going to discuss isn’t limited to the moon or the planets. It can also help with any distant terrestrial landscape shots, as long as your subject holds still. The key to sharpness is based on statistics. Most of the time, details of your subject are in the same location, but with a shimmering atmosphere, sometimes they move a bit. If you take several shots of the same subject and look for details that are “usually” present in each of the photos, you can combine these shots into a single sharper picture.

Your camera’s focusing system is another sharpness culprit. As soon as your focus system thinks the focus is “good enough”, it stops trying to focus further. As a result, you’ll find that some shots are sharper than others. The software also recognizes this, and is capable of automatically only selecting the “best” shots it locates in a series (a ‘stack’).

The program I’m going to describe is called “AutoStakkert”, version 3.0.14 for 64-bit Windows. I’m using it on Windows 10. It’s available on other operating systems. This free program can be located here. The program author is Emil Kraaikamp.

There are other astro-stack programs available, of course. Learning their usage nuances can be really time-consuming, so I can in no way claim that this AutoStakert is the best one. I just know that it is capable of doing what I want it to.

I converted my raw photos into 16-bit TIF files to use the program, but it accepts a variety of image formats. It doesn’t accept raw formats, though.

There are many, many options available with this program, but I’ll describe a couple of recipes that work for me. Keep in mind that the intended users of this program are astronomers, not photographers.

I have had best success when using at least 20 pictures in a stack. I’ve seen extreme examples where users have processed more than 10,000 shots in a stack (frames from a video) with this program! The more atmospheric shimmer, the more shots you’ll need to counteract that shimmer. With newer cameras starting to offer 4K video, this is something to keep in mind.

Before I forget to mention it, this program can output a ‘sharpened’ photo, but I don’t like the result (totally over-sharpened with haloes). I use the un-sharpened output and post-process it with my favorite photo editor instead.

Finished stack result, after applying an un-sharp mask.

Using the Program

Run the program “AutoStakkert.exe” as an Administrator (right-mouse click on the file to do this). I believe the program author is from the Netherlands, hence the unusual program name.

This program doesn’t like raw format, so you’ll need to convert your photos into any of a variety of image formats (I use 16-bit tiff).

For my moon shots, I don’t bother to re-center the moon in the frame to counteract the Earth’s rotation. The software takes care of that, when you choose the “Planet (COG)” Image Stabilization option.

If you’re shooting distant landscapes, you need to use the “Surface” Image Stabilization option instead, where your subject isn’t moving. If you don’t use a tripod for this, then you might as well stop reading the article at this point.

For the other “Image Stabilization” options, I used the “Dynamic Background” but I honestly don’t understand its impact on the results.

Leave the defaults in the “Quality Estimator” section. These are “Laplace” delta, “Noise Robust” 4, and “Local”. The “Noise Robust” value should get increased for more noisy or dim subjects and decreased for more quality input photos. For really high quality shots, a Noise Robust value of 2 is suggested. I leave the “Expand” option alone (it will change to “Crop” if you click it). This will leave the output large if you leave it as “Expand”. The “Local” setting uses each alignment point to further assess each frame quality, versus “Global” to use the entirety of each frame.

Click the “1) Open” button, and browse to the folder with your (TIF, JPG, etc.) multiple shots to process. Use the “control” or “shift” buttons to select the desired photos to process as a stack.

After clicking on “1) Open” and selecting the 16-bit TIF photos, I press the “Play” button to see if the automatic rough alignment was successful. This rough alignment counteracts the rotation of the Earth between the shots, assuming you don’t bother to realign the moon in your viewfinder. The “Play” button starts a slide show running. Image quality grading numbers get displayed next to the “F#” (frame number) on the photo-display dialog upper left side. You can click in the “Frames” progress bar to manually step through the image stack, too.

This lets you easily compare how sharp each shot is, relative to each of the other shots. Click “Stop” to halt the slide show.

If you have selected “Planet (COG)”, the stack of photos should already be roughly aligned with each other.

If you’re trying to stack a landscape and selected the “Surface” radio button instead of “Planet”, you might want to alter the “Image stabilization anchor” location and window size (green X with green rectangle). While in the right-hand dialog showing you one of your photos, you should probably press the “9” key to get the largest “anchor point” area (a green rectangle) The smallest anchor rectangle uses a value of “1”. Smaller number selections will decrease the anchor rectangle selection size. Hold the control button and click on the desired anchor center, which should include a detail that exists in every shot of your (landscape surface) stack.

If your rough alignment doesn’t succeed, then unfortunately further stacking operations will likely fail as well. You can delete any shots where the subject moved too far and then try again.

Screen shot after photo stack analysis, before clicking “Place AP grid”.

Click “2) Analyse”. This will perform an initial quality assessment of the selected pictures, and then decide which are the best ones. It generates a plot of the shot quality as well. The program will place your shots in order of decreasing sharpness. The gray line in the plot is in the same order as the input file stack, and the green line is the sorted order of the frames.

Click on the “Frames” button to switch between sorted or original input frame order, and use the slider to switch from frame-to-frame (or else type in the desired shot number). The “Frames” button turns green when this feature is available. If you hover the mouse pointer in the slider area, the tool-tip text will indicate the active sorting order (“The frames are now sorted by quality”).

“Frame” slider/input box to view stack images and their quality rating

Note the “F# below the slider, such as “F#2 [9/24]”, which indicates the 9th frame of 24 is the ninth sharpest photo, and the second shot (file) in the stack. This example frame is in the “top 34.8% ” of the entire stack, and has a quality rating of “Q 59.9%”. You generally want a photo quality rating of 50% or better in your final stack.

There is a zoom slider and horizontal/vertical sliders to magnify and shift the view of the selected photo in the stack.

This is an under-appreciated program feature. You might have hundreds of photos, and it would be a terrible chore to manually figure out which ones are the sharpest. This feature automatically finds them and sorts them.

You’ll get an error (!#@Anchor) if your shots aren’t aligned well enough for analysis. You’d probably get this error if you did a whole moon shot but selected “Surface” instead of “Planet (COG)”, and the moon was in a different location in each shot. I presume “!#@Anchor” is some form of Dutch swearing.

If the Analysis looks good (view the graph for a nice continuous plot showing gradual decrease in image quality of the sorted shots), you’re ready to select the final alignment points. For quality input images, select a “small” alignment point size (AP Size) of 24. For lesser quality images, select a larger number. I have experienced alignment mistakes when using larger alignment point sizes.

I’d suggest you use the automatic alignment point creation, which will put many points on your image (see the little blue rectangles with red dots in the image below). Lots of points are needed for quality alignment of the shots in the stack. There’s a manual placement option (“Manual Draw” checkbox), although I haven’t had good success with it. After Analysis, there will be a red rectangle over your displayed photo. If you want to try placing manual alignment points, don’t put any points outside of this rectangle, since some of your shot details go outside of this rectangle.

Click “Place AP grid”. This is the automatic way to get the alignment point grid added to your displayed photo. This is fast, easy, and lazy, which I’m all for. It will put a grid of points over the entirety of your subject, but avoids the black background (if you’re shooting moon shots).

There’s an “Alignment Points” “Clear” button, if you decide you’re unhappy with your detail selections (and you want to start over). You can try changing the alignment point size, if you wish to experiment with that option.

In the left-hand dialog above, I have a value of “30” (green box) for the “Frame percentage to stack” in the section labeled “Stack Options”. This will cause the program to only use the best 30% of the shots in the final processed shot, and it will throw out the worst (most blurred) shots. Use the “Quality Graph” and “Play” results to help you decide on the percentage of sharp shots you want to retain for the final stacking process.

The “Normalize Stack” option will enforce a consistent brightness level for each shot, and isn’t typically needed unless you have a non-black sky with your moon.

The “Drizzle” option was originally developed for the Hubble telescope. It is intended to take under-sampled data and improve the resolution of the final image. This option doesn’t seem to help my shots any. It will really slow down the stack crunching if you select it.

I selected “TIF” for the output format of the final processed shot (under “Stack Options”), which will be placed in this case into a folder next to your input photos, and called “AS_P50”. This folder name indicates it was created by AutoStakkert, and has the results of selecting “50 Percent” of the input shots.

I left “Sharpened” un-selected and “Save in Folders” selected. I’m not a fan of the sharpened results from this program, but it can still be a useful evaluation tool, even if it’s not good “art”. You’ll get an extra output file with “_conv” add to its name if you select “Sharpened”.

Autostakkert after “Analyze" and “Place AP grid” is done

Notice in the screen shot shown above that the program automatically added 1002 alignment points onto the photo after clicking the “Place AP grid”, and added the text “1002 APs”. When I have used less than 300 points, I have noticed occasional alignment errors in the final results.

Now, click on “3) Stack”. And wait. Then, wait some more.

You’ll get some progress messages with little green check marks and how much time each of them took as they complete. Expect several minutes to elapse before the stacking is complete. The finished output files will be in TIF format if you matched my TIF output format selection.

The result pictures include an unsharpened image and also a sharpened image (with “_conv” at the end of the file name). As I mentioned, I don’t like how this program does sharpening, so I post-process the unsharpened stacking result in another photo editor. The finished result (TIF) file has “_lapl4” and “_ap1002” as a part of the file name, because in this example I used the “Laplace” delta, noise robust 4, and created 1002 alignment points.

Stacking has completed.

Note in the shot above that you can see green checkmarks with timing measurements. This section gets filled in as the program progresses. Finished results (TIF files here) go into the “AS_P50” folder, since 50% percent was selected for the “Frame percentage”. If you had chosen 70 percent, you’d have an “AS_P70” folder instead.

You’ll find that the program is smart enough to not only shift your photos for accurate alignment, but it also applies rotation correction! Impressive.

Single (sharpened) shot example detail. NOT a stacked photo.

The picture above is the best single-shot photo I had to work with, which has been post processed. It is actually missing some subtle details and also has some ‘false’ details, all due to (minor) atmospheric shimmer. It’s pretty good as-is, but can still stand some improvement. The un-cratered “mare” are particularly noisy and contain some misleading ‘false’ detail.

I shot this picture with the moon higher in the sky to avoid atmospheric effects. Cold air and higher elevation would have helped, too.

Autostakkert final processed shot detail, no sharpening.

The shot above shows the result of using the best 50% of my stack of 24 original shots. It still needs post processing (contrast adjust and an unsharp mask). If I had shot many more photos for the stack, the quality would improve even more.

Autostakkert final processed shot detail, sharpened

Shot detail using Registax wavelet processing

If you compare the details between the “single shot” and the finished AutoStakkert stacked (and sharpened) result, you can see several extra details that show up in the stacked picture. Note the smooth surfaces are starting to show subtle shading, which is missing in any of the single shots. The Registax program with layered wavelet sharpening can enhance details slightly better, as well, although it starts to look artificial to me. I added this shot just for fun; I don't think the Registax results look enough like "art" to be useful to me.

Autostakkert really does work. If I had shot many more photos, then the results would improve even more. I’m certainly not an expert at using this program, but it’s clear to me that stacking photos can absolutely increase the level of detail that moon (and general landscape) shots contain. It’s almost like getting a better lens than you really have.

You could, if you’re inclined to do so, switch to Live View and even shoot a movie (4K or 8K, please) of your subject (converted to AVI) and Autostakkert can use that as input, too.


If you photograph a distant subject, especially on a warm day, heat shimmer can be severe. Using the “Surface” option (instead of “Planet”), you can dramatically improve subject detail if you use a tripod and take at least a few dozen shots for stacking.

Distant landscape “Surface”, with many alignment points

The screen shot above shows the selected options for processing a stack of distant (about ½ mile!) landscape shots. Unlike moon shots, you must keep your subject framed exactly the same shot-to-shot for “Surface” processing. If you look carefully, you’ll notice that the auto-alignment grid shows about 27,000 points (!).

Just like moon shots, you can “Play” the stack of frames to evaluate sharpness and alignment. Try to stack only the frames that have a quality rating of 50% or better, and rid any frames that don’t align well relative to their neighboring frames.

My best single shot in the stack, sharpened, 100% magnification, 600mm

The shot above shows more dramatic heat shimmer, due to the extreme distance. This is actually the best of many frames I shot. Fine branch details are obliterated.

Stacked result detail, sharpened, 100% magnification

Comparing the above pair of detail shots, you’ll notice that the stacked result brings out really fine details that no single shot can deliver. This example used 10 shots of the stack; more would have been better. If there had been more atmospheric shimmer, the differences between single shots and the stacked result would have been more substantial.

You'll need to crop the edges of your finished stack result, much like when you do macro focus-stacking. Keep this in mind when framing your landscape shots.

Two miles away, 600mm

Sharpest single shot detail. LOTS of heat shimmer at 2 miles

Stack of sharpest 40% from 106 total shots. HUGE difference!


If you’ve got the time and motivation to get the very best out of your gear, then give this program a try. You might just find Autostakkert becoming a welcome part of your tool kit. Don’t hold your breath for Photoshop or Lightroom to include features like these. If you’d like to read more explanations of this software, here’s a handy link.

The moon photos in this article were made using a Sigma 150-600mm Contemporary at 600mm f/8.0 1/500s ISO 3200 (VR off) using a Nikon D500 with Electronic Front Curtain shutter. I converted the raw shots into 16-bit TIF, with noise reduction, for Autostakkert to use. I’ll bet you didn’t think this lens was as good as it is, did you?

Once again, photos and science make a perfect blend for your art.

Recent Posts
bottom of page