Advanced Stacking of Rippling AVI Frames

We have already examined the remarkable Registax software developed by Cor Berrevoets, a software package that has made the stacking of thousands of AVI frames a routine and reliable operation. However, few amateurs who use Registax seem to have the spare time or the inclination to examine exactly how it works and to assess which options are the best in different situations. However, a full understanding of Registax' strong and weak points can be of great use. As a Registax user myself, I hope that an explanation of the software from a user's (rather than the designer's) viewpoint will be of use. I would certainly have valued a Registax "Idiot's Guide" when I started using it!

One thing that needs to be appreciated from the outset is that even on the best nights of atmospheric stability a planet never just sits there, without a single quiver. In the webcam era it is now possible to video a planet for many minutes, at 0.1 second intervals, and to see just exactly what happens from split-second to split-second. This can be highly revealing. Remember, the light is traveling through 30 kilometers of the Earth's seething atmosphere. It would be incredible if the image of a planet were to remain steady and undistorted for several minutes at a time: indeed, it never happens! What does this imply for a frame-stacking program? It is important to remind ourselves why we stack frames at all. Stacking reduces the pixel-to-pixel noise by a factor roughly equal to the square-root of the number of frames stacked. In addition, on images of reasonable quality (i.e., not highly distorted) it produces an average image, not one where one side of a planet, or its rings, is deformed. Of course, a few, rare, individual frames may well be nearer to geometric perfection than the final result, but they will be far noisier. Stacking also increases the dynamic range of an image such that subtle shades and contrast differences in one noisy 8-bit frame are transformed into a smooth final result where the most subtle luminance variations are revealed. Out of several thousand frames there will always be a few single, noisy frames, where the seeing was close to perfection for that single 0.1 second period. In those frames the planet's shape may well be within an arc-second of the true shape all around the limb or rings if seeing conditions are good. Frames such as these are the master reference images that Registax needs to use to align and stack other good images onto and this is the key to how Registax delivers the goods. Needless to say, the master reference frame must be chosen with care. (In fact, when you become more experienced, a master reference image, produced using Registax' Optimizing page "Create" function can be assembled from a short sequence of 50 frames, rather than a single, noisy, frame.)

Once you have a master reference frame you will then want to align and stack as many good frames as possible, with respect to that master frame, to reduce the noise. The fact that the planet wanders around a bit at the whim of the telescope drive is not a disadvantage here (as long as it does not wander too much). A major factor enabling noise reduction is that there is often a subtle fixed pattern to noise for each CCD chip. With long exposure CCD images, a dark frame or bias frame is often taken to eliminate this fixed pattern noise. But, with planetary webcam frames, the pattern is no longer fixed if the images are stacked in a random fashion (as random as the planet's movements). Even stacking hundreds of crude 8-bit dynamic range webcam frames increases the bit depth of the image noticeably.

Of course, if you stack thousands of images the final result will look incredibly smooth. However, you really do not want to stack those images that are blurred or badly distorted. So here you have a dilemma of a sort. Where do you draw the line? From a typical webcam run on, say, Saturn, you might collect 3,000 frames in a 300-second period. Twenty of those frames might be very sharp and undistorted. Several hundred might be close to being sharp and just a bit distorted. The rest will be blurred and distorted in varying degrees. How do you (or Registax) decide whether to stack many (for a smoother result) or few (for a sharper, but noisier result). There is no simple answer to this, except to say that experience plays a big part, every planet is different, and Registax has numerous settings to help you get the pass/fail criteria correct. Excellent webcam images of the Moon can be assembled from a few dozen frames. This is because the Moon is a bright, high-contrast object and intensive image processing is not needed to bring out the smallest craterlets and rilles. Also, distortion is far more obvious across a large lunar landscape: double images of high-contrast features stand out. Distortion on a lunar image will become worse as you move further outside the Registax alignment box, unless seeing was near-perfect. With the globe of Saturn any features are usually so subtle that they will only reveal themselves when a thousand or more webcam frames (from a 10 frames per second and f/30 - f/40 system) are stacked. So, for the relatively faint ringed planet, stacking loads of frames is infinitely more important than with the Moon.

The first Registax page, or window, allows you to view every frame of your webcam AVI video (or individual bitmap, jpeg, tiff, FITS, or png images). To load your webcam AVI you simply click on "Select" and then load the AVI file. Right clicking on the best image on the center of the planet with a suitable alignment box size will set that good image as the reference. The features inside the alignment box will be used as the reference to mathematically align the other frames with respect to, for example, an entire planetary globe or a lunar crater. To choose a really good reference image you really need to open the Registax frame window and chug through a lot of frames manually until you spot a really good single frame. You can then stack hundreds or thousands of frames with respect to that one good frame (or a composite of good frames). But how, precisely, do you make the decision as to which frames to use in the stack and which to reject? Well, if you have an excellent image and really want to be meticulous (or if you are just an unbelievably sad loser with nothing else to do) you can simply plough through each AVI frame visually and tick (select) all the ones you want. Obviously, if you have thousands of frames this will take some hours to do! But, you can also get Registax to help you. In other words, give the software a few clues as to what your thresholds are and get it to check each frame for quality while you go off and do something less sad and tedious!

Let us examine this process in more detail, because it is crucial to our understanding of Registax if we eventually hope to fully master the software. When you select a reference frame you need to specify an alignment box size. Registax gives a choice of 32, 64, 128, 256, or 512 pixels for the box size. Most planetary imagers simply choose a box to surround the globe of the planet. Once the alignment process is running, if the telescope's drive causes the planet to wander completely outside the chosen box position the software will get confused and may prompt you to manually register that frame. At the start, once you have clicked your mouse on the planet or the alignment feature in the best image, Registax performs some calculations, presents you with some data, and leads you to the alignment page. A warning here: if the next few paragraphs seem totally incomprehensible that is what I would expect if you are a novice user of Registax! The finer points of what Registax is doing will largely be a mystery until you have played with the software over weeks and months. There is quite a learning curve for the beginner using this software. However, the good news is that you do not need to understand Registax in detail to get a good result. The default aligning and stacking system works well; you only need to understand the software in detail if you become a perfectionist. Anyway, to continue: at the alignment page (Figure 9.1) the data you are presented with at this stage is a colorful picture called an FFT Spectrum and a graph labeled "Initial Optimizing Run" (or "Registration Properties" in Registax versions 1 and 2). The colorful picture should show a small red circle at its center if the software's initial estimate of the shift between reference and other frames is good. The FFT alignment value in pixels can be altered and "Recalc FFT" pressed if a nice small red circle is not initially seen (although I rarely have to use the Recalc option). The Registration Properties graph on the alignment page shows a red line, which is an indication of the "Power Spectrum"; in other words the relative amount of large and small features in an image. The Quality tab (Figure 9.2) will, at this point, bring up a Quality Settings box that, in conjunction with the Quality Estimate Method, helps define the image quality assessment in conjunction with the Power Spectrum. (I can see your eyes glazing over already . . . hang on in there!) Early versions of Registax have just one method of quality assessment, referred to as the "Classic' Method" in Version 3 and later. The quality assessment methods are called "Classic," "Human Visual," "Compression," "Local Contrast," and "Gradient." In "Classic" mode, the two green lines on this graph define a quality band, which the user can alter the position and width of. In "Human Visual" and "Compression" modes the user can also alter the quality settings. Cor Berrevoets added the "Gradient" quality assessment after version 3 trials by Anthony Wesley

Figure 9.1. The alignment page in Registax after the master reference frame is selected. Note the FFT and initial optimizing run windows have appeared.

and Damian Peach. Damian, in particular, did not like the way Registax ranked the image quality more by shape than by sharpness, especially on frames taken under near-perfect seeing conditions. For really good, clean, sharp images, the "Gradient" quality assessment works best.

Confused? I would be surprised if you were not! As I said earlier, letting all this sink in will take quite a few trials (dozens!!) at using the software. In a nutshell, the Power Spectrum line, FFT Spectrum, and Quality Settings choices are all there to try to determine how to quality grade your images and ultimately accept or reject them. If we choose a Quality Setting of "Classic" as used in all the early versions of Registax, we can shift the vertical green lines left and right to choose our quality band along the red Power Spectrum curve. If we set the left-hand green line at the intersection point where the red Power Spectrum first starts to flatten out after its downward plunge, and the right hand green line at the intersection point just before the red line hits the bottom, this will do nicely. By doing this we are choosing to assess the quality of an image based on how much medium and fine scale detail is present, but not on fine scale noise (the bottom of the graph). In Registax version 3 and later versions the "Human Visual," "Compression." "Local Contrast," and "Gradient" quality assessment methods were added, although the first two do not work well for me. They seem to grade an image much more on its physical shape with respect to the reference master than on its sharpness. Using these methods might lead to less artifacts being produced in Saturn's rings or on the Moon, perhaps, but they will generally lead to less detail being seen in the final

Figure 9.2. Quality estimation in Registax. Registax has five ways of judging and ranking the quality of individual frames, depending whether geometric distortion or sharpness are the most important factors. These are called Classic, Human, Compress, Local Contrast, and Gradient. Classic, Human Visual, and Compression have extra settings that can be adjusted. A graph enables you to see the adjustment to the position of the green quality bars in classic mode, set to 3 and 12 in this example.

Figure 9.2. Quality estimation in Registax. Registax has five ways of judging and ranking the quality of individual frames, depending whether geometric distortion or sharpness are the most important factors. These are called Classic, Human, Compress, Local Contrast, and Gradient. Classic, Human Visual, and Compression have extra settings that can be adjusted. A graph enables you to see the adjustment to the position of the green quality bars in classic mode, set to 3 and 12 in this example.

image. At least, that has been my experience; although my tests are certainly not exhaustive.

Although we have been talking about image quality assessment we have not yet talked about setting the accept/reject quality threshold. This value is seen in Registax' "Quality Estimate" window. Altering the percentage value in this window tells Registax what your accept/reject threshold is, although, admittedly, a percentage on its own does not mean much to the novice. Some experience is needed before this value can be set with confidence. The default value is 80%, but if you are sad enough to have manually de-selected all the poor frames already (yep, I've been that sad on quite a few occasions), 50% works well.

Once you have set all the values you want on the alignment page it is time to actually click the "Align" button for the initial alignment of all the frames or images. Once this initial alignment has run its course, pressing the "Limit" button (which limits you to the frames above the determined quality threshold) takes you to the "Optimize" page. During alignment, Registax places the files in order of their quality and the slider tool at the base of the page stops at the quality threshold. Images to the left on the slider are high quality and those to the right are low quality. This is a new feature from version 3 onwards. You can alter this slider to the image threshold you prefer, remembering that images to the right will be rejected in the final stacking process. Once you press "Limit," the threshold that you (or Registax) set is determined and you can then proceed to the Optimizing or Stacking pages.

Optimizing (Figure 9.3) is, essentially, a precise and time-consuming optimizing of the image alignment. The "Search Area" and "Optimize Until" boxes are the ones that will most concern the beginner here. Registax does have help files for all

Figure 9.3. While optimizing the alignment process (an optional step) the master image and frame being processed are displayed, along with a graph showing the alignment errors and average pixel differences compared to the master frame.

of its features. However, my intention here is just to get the new user up to speed and this section is written from my perspective—an end-user with no knowledge of the software design. I think with all software packages the designers are rarely able to see things from the perspective of the user, i.e., from a perspective of total ignorance. In fact, I know this is the case because writing software was my profession at one time. My intention is to allow the beginner to surmount the initial learning hurdle to the point where Registax is not so intimidating that it stops the beginner dead in his or her tracks! The "Search Area" and "Optimize Until" boxes are there to allow the software to search an area of a number of pixels and to continue the iterative optimize process until the percentage change in shifts for all the images is less than a certain value. Choosing to search a larger number of pixels for a best match will take more time but may mean less iterations taking place. In fact, you do not have to optimize at all. With noisy images, and, especially, with a specific noise pattern (e.g., from having a telescope controller hand paddle close to the PC/webcam) Registax can lock onto the noise pattern when optimizing. This seems to happen often with noisy and low-quality images. In this case, optimizing leads to virtually no improvement in the planetary image but a large increase in noise. This increase is not obvious at first, until the wavelet-processing/enhancing stage, when noise can really emerge and become unsightly. I would strongly advise keeping all sources of electrical noise away from the PC webcam when imaging. Unfortunately, the PC is a major source of noise itself and some PCs appear to be better shielded than others. If you always get noise problems it may be worth trying another PC when imaging. At long focal lengths I have not experienced any significant problems when leaving the alignment stage out, if noise problems emerge due to optimizing. However, if noise problems do not emerge I keep Optimize turned on. With a slow PC, i.e., under 1 GHz processor speed, turning Optimize off can really speed things up, meaning you wait half an hour, not several hours for the aligning, optimizing, and stacking process. In the worst case, with a slow PC sorting thousands of poor frames, the optimizing process can take half a day to complete. In these instances I generally leave the PC running overnight, while I am sound asleep in bed!

After the optional optimizing process (or, as part of Optimize and Stack) we come to the stacking process, during which stage all our best images are simply stacked and averaged resulting in a supersmooth, if less-than-sharp, image. The stacked image tends to look very bright because the stacking process makes sure that the brightest point of the stacked image is just below 100% saturation. At this stage the only task remaining is to apply the powerful wavelet processing routines on the Registax Wavelet page.

Photoshop CS Mastery

Photoshop CS Mastery

Artists, photographers, graphic artists and designers. In fact anyone needing a top-notch solution for picture management and editing. Set Your Photographic Creativity Free. Master Adobe Photoshop Once and For All - Create Flawless, Dramatic Images Using The Tools The Professionals Choose. Get My Video Tutorials and Retain More Information About Adobe Photoshop.

Get My Free Videos

Post a comment