Notes on Using a Webcam for Planetary and Lunar Imaging and Registax for Processing the Images (Updated May 2012)
By Alan Jefferis
In my view the method of using of a webcam for capturing still images of planets and the Moon is hard to beat from the points of view of both quality and cost. You don't need an expensive telescope and it doesn't need any clever guidance system or automation.
The method can be summarised as capturing a short video sequence in the webcam and then using software to separate out the individual frames, align them, pick out the ones having the best quality and combining the best frames into a single image. I use the Phillips Toucam Pro 2 but this has now been superseded (by the Phillips SPC900 I think). Some other small video cameras marketed specifically for astronomy (such as the Celestron Neximage) have very similar characteristics. You will also need an adaptor to connect the webcam, with its lens removed, to the telescope. These are available from several of the main astronomical equipment suppliers. The software I use is Registax, available as a free download.
Section 1. Capturing the image sequences
I'll talk about the relationship between image size and telescope characteristics, how to work the capture software and how to get the planet image on the sensor.
The sensor is small but the image of a planet will be very small. The size of the image depends only on the focal length of the telescope and the use of any multiplier such as a Barlow lens. For example, Mars has angular diameter of 13 arc-seconds (written 13") at its 2012 maximum, increasing to 24" at the 2018 maximum. With a 1000 mm focal length telescope the 13" image will occupy only 11 pixels, which doesn't leave much room for any details in the image. Saturn will typically reach nearly 20", excluding the rings, and Jupiter 48" but you'll still be missing detail if you don't use a Barlow. Sometimes the degree of amplification required is expressed in terms of the f-number of the telescope plus Barlow combination (eg. f20, f30 etc.) I think the appropriate measure should be arc-seconds per pixel because the finest detail visible, with the absolute best seeing conditions likely to be experienced from the UK, is probably of the order of 0.25". So 0.25" per pixel or better should be aimed at. For reference, here are the values achievable with typical telescope types.
Telescope focal length 1000 mm with no Barlow gives 1.2" per pixel
Telescope focal length 1000 mm with x2 Barlow gives 0.6" per pixel
Telescope focal length 1000 mm with x3 Barlow gives 0.4" per pixel
Telescope focal length 2000 mm with no Barlow gives 0.6" per pixel
Telescope focal length 2000 mm with x2 Barlow gives 0.3" per pixel
The conclusion from this is that for planets it's always worth using a Barlow for telescopes up to 2000mm focal length.
There's one other factor that can have a significant effect on the quality of the image. Make sure the telescope is well collimated.
Working the Capture Software
Connect the camera to the computer and open its control software (Phillips VB Lounge for the ToUcam).
Set the capture file. Name the file and select the folder in which it is to be saved. If the software enables a sequence of files choose that. My ToUcam software does not so if you capture a second image without giving a new file name it will overwrite the previous one - very annoying.
Set the video properties to use maximum resolution - for ToUcam 640x480.
Set the camera properties - disable any auto features, set frame rate (eg 15), exposure (eg 1/25), gain (eg mid range) - these will usually need to be changed when your image is on screen.
Check the camera is working by pointing at the computer screen or other light source.
After you have the image on screen (next paragraph) reduce the gain as far as possible to give an image bright enough not to let the brightest part reach full white. Low gain means low image noise. One might think shorter exposure would improve the image if it is varying or moving about rapidly, but I've found it doesn't have much effect beyond about 1/50 sec. For the Moon you might need to use faster exposure, even with gain at minimum.
Getting the Image on Screen
This can be the most difficult part. Centre the image in the eyepiece field of view then replace the eyepiece by the camera. Your first problem may be finding the image. This may be (1) because it is outside the field of view of the camera (which is much less than an eyepiece), (2) because it is a long way out of focus or (3) because it has clouded over. To get better focus go back to the eyepiece but withdraw it as far as possible in the eyepiece holder. Readjust the focus control and go a bit further in the same direction. The image should now be focussed closer to where the camera sensor will be. Replace the camera but wiggle it up/down and left/right before securing it to see if the object is off screen. If so note in which direction. If you still have difficulty and the Moon is available use that for focussing, and if necessary for alignment too (see where the crater in your image comes relative to the crosswires in the finder. Then go back to the planet you want to image.
Adjust the telescope controls to get the planet roughly central and focus it as well as you can. For a telescope with no motor drive position the image so it will drift into the picture.
Capturing the Video Sequence
When you have positioned the object and focussed as best you can then click Start Capture and leave it for at least 500 frames before stopping capture. If the image is drifting across the screen don't worry. Registax can handle that.
Section 2. Processing with Registax
This version of these notes has been updated to correspond with Registax V.5-1. At the time of writing Version 6 is also available but I have not started using it because one feature that is valuable to me seems no longer to work in Version 6. I'll mention what it is when I get to it.
Load an avi file recorded by the webcam by clicking Select Input.
Accept the default parameters in the boxes on the left, except the size of the alignbox. Choose one large enough to include the whole planet, or a significant area of your moonscape. The minimum quality percentage can be left until a later stage as I will describe.
At top left you'll see that the green underlined box is Align. Click it.
When the green underline moves to Limit this is where you can change which actual frames are used. There are two ways to do this. One is to use the thin slider bar under the image. Move the slider to scroll through the frames which are now in quality order. Stop at the point where you consider the quality is starting to fall off and the stacking process will choose only the frames above it. Try to choose at least 100 frames. You'll see how many frames have been selected underneath the image. The other method is to use the frame list. Click the Frame List box at the top. The list will show the frames in their sorted order. Starting at the first one you can scroll down the list with the down arrow key until you feel you've incuded enough frames. The difference here is that if you think a particular frame looks to be too poor in quality (because Registax didn't do its job very well) then you can remove it by clicking its selection box - or more simply just press the space bar. This last feature is what doesn't seem to work in Registax 6.
When satisfied with the stack size click Limit. Then click Stack.
When the stack process is finished click the green Wavelets box. Wavelets needs a bit of explaining but even before you use the wavelets function there is another useful function that is available at this point - that is RGB Align.
RGB Align - Once you are at theWavelets stage a set of functions are available in a block at the right of the screen. If the block is not visible then click the double arrow symbol at top right. RGB Align is useful for images made at low angle, eg about 30 degree altitude and below. The light from the planet will have travelled through a large amount of atmosphere and the density gradient causes the red end of the spectrum to be bent by less than the blue, giving colour fringing which amounts to blurring. Click RGB Align and study the top and bottom of the planet to detect the fringing. You may neet to increase the brightness a bit to detect this. Now use the up/down nudge controls to get rid of the red and blue fringing.
The wavelet processing is primarily a way of sharpening features in the image. This does much the same as the unsharp-mask sharpening function available in Photoshop and all similar image-processing programs. You may decide to skip the wavelets stage and leave sharpening until later. Or you may decide to use a little bit of each. I shall describe only a simple use of wavelets processing. It seems it may be a very much more powerful tool than I have explored and if you wish to pursue its capabilities I would refer you to the Registax website and the Registax 5 User Manual. Using wavelets for the simplified processing proceed as follows.
Keep all the default parameters except where stated otherwise. Check that Step Increment is set at 1. With that setting Level 1 will sharpen fine detail (equivalent to one pixel approximately). Level 2 will sharpen slightly larger detail (twice that of level 1) and so on. You apply the sharpening by dragging the appropriate slider to the right. I can only say try each one and find a group of settings that improve the image in the way you want and without introducing noise. For me, I'll often stick with using only a modest amount of the Level 1 filter and do all other processing in Photoshop.
When you are satisfied with the image click Do All and save the image, preferably as BMP or TIF.
Section 3. Subsequent Processing
What I describe will be based on Photoshop but can also be done in Photoshop Elements and PaintShopPro, and probably other image processing software. The most important functions to have available are Unsharp Mask, Gaussian Blur and Curves
In Photoshop it is under Filters/Sharpen. In PSPro it is in Effects/Sharpen.
There are three parameters. Amount is self explanatory. – set it to give best result which is normally between 80% and 120%. Go too high and your image will look over-processed or too noisy. A small amount of noise can be tolerated because it can be removed by applying a bit of Gaussian blur. Radius sets the size up to which features (edges etc) are sharpened or enhanced. Increase it to the point at which edges are not over-enhanced. – typically use from 1 up to 3 pixels. The best figure will depend on the starting quality of your image. Threshold sets the number of levels at the bottom of the brightness range below which the unsharp mask doesn't act, thus reducing the enhancement of noise. It is normally set at 0 to 1.
After unsharp mask there may be benefit in reducing noise that has been enhanced. Do this using Filter/Blur/Gaussian Blur at between 0.5 and 1.0 pixel radius. Judicious use of small amounts of both Unsharp Mask and Gaussian Blur can often produce the best overall results.
Curves give the most effective way of enhancing contrast and brightness. When you start you are offered a straight line which represents the brightness levels of the image before (horizontal scale) and after (vertical scale]. You can click on the line and drag the point to create a smooth curve. A typical curve that improves contrast will pull the line upwards near the top and stay on the original line near the bottom. You just need to experiment to get the final image you want. You may decide to apply it in two or more stages. Essentially, the slope of the cuve determines the change in contrast for the relevant section of the brightness range - steeper equals more contrast, less steep is compressing the brightness scale.
Other functions you may wish to use are Colour Balance and Colour Saturation but for these you really need to know what colours your object should be, which can be difficult.
Revised May 2012