High Resolution Lunar Image Processing

From SkyInsight

Jump to: navigation, search

Send this article to a friend

by Tony Gondola published in AstroPhoto Insight Volume #1 Issue #2



Photographing the moon, sounds so simple doesn't it? After all, Luna is the brightest object in the night sky and is often the first object observed and photographed by beginning amateur astronomers. AS easy as it might seem the truth is, the lunar surface is extremely hard to image at the highest resolution your optics will deliver. Presented here is an outline of my own workflow that has proven to be a very effective approach. This is the result of research into basic methods and a lot of trial and error. It's certainly not the last word and much variation is possible. Much depends on aperture, seeing, optical design and quality. This work is presented as a proven baseline through which others can perfect and expand their own imaging process. Hardware

While many types of cameras can serve for lunar imaging the best choice is a video based webcam type imager. This is because the key to high resolution lunar imaging is stacking and to do that effectively you need to gather a lot of images. Only by stacking hundreds of frames can we reverse the effects of the atmosphere and create images at full optical resolution. This type of imager is also ideal because of the generally small pixel size and small image format of the sensor. This is one case where covering a large field of view isn't an advantage, 640x480 is all you really need. However, beware of low dynamic range video based cameras that do not give you manual control over gain.

On the optical side virtually any telescope can be used for this work and apertures as small as 5 inches can be surprising effective. The most important qualities of a lunar imaging scope are optical quality in combination with a long focal length. The ideal imaging scope would have a long native focal length and a diffraction limited field that's large enough to fully cover the sensor used with a bit more to compensate for slight collimation or centering error. The reason long f ratios are an advantage is the requirement to image at a scale were the pixels in your camera are smaller then the diffraction limited spot size your optics can produce. This is called over sampling and is critical to capturing the finest possible detail. 2x over sampling would be considered the minimum however, some imagers are finding that going even further can yield benefits. Most common optics will require additional magnification via a barlow lens to achieve the needed minimum image scale. However at F ratios of F/5 or lower the barlow requirements become extreme (5x or more). You'll also start running into problems with the size of the diffraction limited field at about the same point. Good work can be done below F/5 but the difficulty increases.

On mountings, any type with an RA drive will work with an equatorial being first choice. It is possible to image with a driven Alt/Az mount however field rotation will limit how many frames you can collect as well as complicate the generation of mosaics. IF your RA drive has a lot of PE then you'll need guide rate correction control to keep the image from shifting too much during the course of exposure. Beating the odds

The first step before you even begin imaging is to stack the odds in your favor. Learn how to properly collimate your telescope and make sure it's perfect before every imaging session. Also make sure that all optical surfaces are clean, including filters if used. The second step is to pick your battles. Seeing is the enemy that must be defeated here so there's no point in shooting yourself in the foot by trying to gather data when the moon is low in the sky. In general, shooting at elevations below 45 to 50 degrees above the horizon is a bad idea. Not only will the seeing be worse but below that elevation other nasty effects such as chromatic dispersion come into play. Even when the moon is well placed there will be some nights where the seeing is just so rough it's simply not worthwhile to image, especially with larger apertures. Pick your battles and learn your limits for getting good data.

Data Collection

Focus, focus, focus! This is one of the hardest aspects of shooting at long f ratios but it's absolutely critical to get it right. We're not talking about getting close but getting it nearly perfect. This is especially critical with faster F ratio instruments with their extremely small focus zone. As an example, a 6" F/8 Newtonian has a 1/8th wave focusing tolerance of plus or minus 0.04mm or 0.0016". Reduce the focal ratio to F/5 and the tolerance shrinks to plus or minus 0.016mm or 0.00059". That's a very narrow range to hit consistently, especially with an average quality rack and pinion focuser. Helical focusers are helpful but the best solution I've found is motorized focus. By giving repeatable movement and eliminating shake it has made focus just about a non-issue.

Once perfect focus is locked down and your target is acquired you can start recording your frames. The optimum number of frames you'll need for a good result will depend on the quality and nature of the seeing. For my 6" F/8 500 frames seems to be the practical minimum on an average night, 1000 frames or more is even better. Unlike planetary imaging where there's a time limit due to rotation the moon imposes no such limit so let the imager run. Also keep in mind that the moon is a very high contrast object. Be sure and monitor your exposures to avoid blowing out the brighter areas. The processing we'll be applying downstream from here will tend to raise contrast so give yourself a little headroom by under exposing slightly. I generally look for a highlight value of no more then 230 on an 8 bit histogram. If you're making mosaics then expose for the brightest areas you'll be covering and let the terminator fall where it may.

Alignment and stacking

My preferred program for alignment and stacking is Registax so my comments here will be specific to that program. Other programs such as Iris also do a good job and much of what I'm about to cover can be applied. My first step before getting into stacking is to run the original AVI through VirtualDub and increase the size of the original 640x480 AVI by a factor of 2 to 1280x960. For my process this is a critical step that pays dividends all the way through the process. It does greatly slow some of the following processing steps but it's well worth it. A fast computer with a large hard drive is a definite help here.

Before loading the resampled AVI into Registax you're going to have to settle on an alignment strategy. One would think that simply going in and aligning the whole frame with the largest alignment box would do the trick. This works to a point but because of the nature of seeing effects this often will not deliver a sharp image across the full frame. This is because even though the imaging area is very small ( 3.3 x 4.5 arc min. in my case) seeing effects will still vary from place to place within the frame. If you watch your AVIs carefully the effect is easy to see as some areas of the frame distort or blur while other areas are sharp. The only way to offset this is to break the frame up into sub-frames, align the sub-frames separately and then reassemble back into the full frame. How many sub-frames depends on your final presentation size and the nature of the seeing. I've found that anywhere from 3 to 9 subs is a good starting point however for critical single frame images you might even go beyond this. It's also not uncommon to go in again and add more sub frames for specific features. It's simply a balance of time and computing power verses result.

For our demonstration I've selected a 517 frame AVI of the Plato area taken on the morning of 7-27-05 in average seeing. Telescope used was a 6" F/8 Newtonian with a 3X barlow. Camera was an Atik 2HS. Here's a single unprocessed frame:

To make the sub frames simply center a best fit alignment box in the center of the sub frame area and align and stack the full frame as usual. Be sure and use the same stack size for all the sub frames, in this case the stack depth was limited to the best 200 frames. Save the resulting stacked image without any processing or adjustments and repeat for each remaining sub frame, being careful to use a naming convention that keeps the images organized.

Slice and dice, dealing with sub frames

The next step is to crop out the proper areas from each full frame to create your sub frames. The easiest way I've found to do this is via the Canvas Size command in PhotoShop. As an example, to make the top-left sub frame, select the upper left anchor button, use percent as the measurement mode, set width to 40% and height to 55%, This will give you some overlap as an aid in reassembling the full frame later.

Repeat for each sub frame making sure to select the proper Anchor point for each one. Once all the sub frames are created I bring them into iMerge for reassembly back into a single frame.

And finally, the reassembled full frame.

If you carefully compare this to the original single frame near the top of this page you'll see how much was gained from stacking and sub framing even before any further processing has been applied. Much of the gross XY distortion is now gone. The frame still looks soft but image quality is fairly uniform across the full frame.

Image enhancement

Now that we have an stacked final frame that has been optimized via the use of sub frames it's time to start working on bring out the detail that's hiding in the raw stacked image. The first step is to apply a gentle maximum entropy deconvolution filter using Cadet. For my 1280x960 raw frames I generally use a Gaussian PSF, 10 iterations and a PWHM level of 5. You're not trying to pull out all the detail in this single step but rather should be going for a general improvement in apparent sharpness without pushing the highlights too hard. Here's a half-size A-B comparison showing the improvement that properly applied deconvolution brings. The original frame is on top.

The effects is fairly dramatic with the entire frame looking as if it's been refocused. There has been a general increase in contrast but the highlights have been well preserved.

The next step in the process is to apply wavelet sharpening in Registax. This will sharpen the image further and bring out all the detail that the deconvolution step has made available. wavelet sharpening is a mystery to most people. The easiest way to think of it is, the smaller the ratio, the smaller the detail that will be enhanced. Since our lunar image at this point is rich in small details the adjustments will be confined to layers 1:1 and 2:1. The actual amount to apply simply takes trial and error and good judgment. Don't over do it! If you see the highlights starting to blow out or artifacting become dominant, back off to a lower level. I can't stress this enough. You want to enhance the detail but you also want to preserve a natural looking image. For our test image 1:1, 20 and 1:2, 5 is about right, here's the result:

The effect of wavelet processing is even more dramatic then deconvolution but remember it's building on the detail that the deconvolution step pulled into visibility. That actual amount of wavelet processing that needs to be applied at that point is actually rather low. Contrast has increased yet again but the overall total range is still well controlled.

Now it's time to look at the frame with a critical eye and decide if further work is needed. even though we used 6 separately aligned sub frames there are still a few areas that look a bit soft. Specifically the hills to the upper right of Plato, Mons Pico to it's lower right, the lower left corner and the highlighted crater wall in the upper right corner of the frame. To deal with these details we'll go back into Registax, place an alignment box completely over the area we want to enhance, align, limit and stack as you did with the sub frames. Then apply deconvolution and wavelet sharpening to the full frames using the same values you used for the original sub frames. At that point you can crop out the detail, copy and paste the enhanced area directly onto the full master frame. Here's the result (image in upper right corner of page):

This is looking pretty good now with no obvious areas of soft detail.

Noise reduction and final adjustments

Although our original stacked frame was very smooth all of the sharpening steps have introduced a certain amount of noise and sharpening artifacts into our image.

There's a lot of small detail that's just on the border of being resolved. Most of the noise is at the pixel level. This is where the 2X enlargement of the original AVI file really pays off because the smallest real details in the image are larger in size then the average pixel level noise and artifacts. That makes it possible to remove the noise without killing the smallest real details in the image My preferred noise reduction tool is the Community Edition of Noiseware but any good NR program will work. Simply zoom into the image until the pixel nose is clearly visible and apply just enough reduction to smooth it out, here's the result:

Here's the resulting full frame image at 50% reduction with noise reduction applied:

Now for final tonal adjustments. The original stacked image was somewhat flat and dark. Sharpness processing has raised the contrast a but the overall tonal range it still needs adjustment. Generally It's just a matter of playing with levels and curves until you get a result that looks right. A slight stretching of the mid-tones often is all that's needed All our demo image needs is a slight adjustment of the mid-histogram point to bring up the mid-tones.

You may also find that some images can benefit from a very slight amount of post process sharpening. Experiment with unsharp masking or my current favorite, high pass filtering. At this stage it helps to work in layers, applying the filtering and blend with the original to get just a bit of extra enhancement. Sometimes it helps, sometimes it doesn't but it's always worth a try. Also give some thought to presentation size and orientation. For me, this image as a greater sense of depth and feels more natural turned clockwise so that the shadows fall from left to right.

For the final version, resampling down to a presentation size larger then the original 640x480 would show more detail at the expense of general photographic quality. The craterlets in Plato for instance are easy to see in the original 1280x960 format however the overall tonal quality suffers. Some images will look good resampled down to 0.60 or even 0.70 (of 1280x960) but this one really looks best at it's original in camera size of 640x480.

That's it, as the following shows we've come a long way from our original collection of fuzzy single AVI frames. To recap, here are the steps again in workflow order:

  1. Collect good data by optimizing optics, methods and conditions.
  2. 2X resample the original AVI
  3. Align and stack using sub-frames
  4. Enhance spot details with additional sub-frames
  5. Sharpen with maximum entropy deconvolution
  6. Sharpen with wavelets
  7. Apply noise reduction
  8. Adjust levels and curves for best tonality
  9. Apply final sharpening with usharp masking or high pass filtering (optional)
  10. Rotate, crop and resample for final presentation size.

As a last comment please remember that this is a work in progress. The workflow presented here is presently the best I've found for my combination of optics, camera and conditions. Yours may very well be different in many respects so feel free to experiment. I don't believe any of my lunar images have given up 100% of the data they actually contain. I would encourage anyone reviewing this process to continue the search for better methods and results.