Processing WebCam Images

Introduction 

As long as the telescope is roughly polar aligned and has a RA motor drive, it is relatively easy to track a planet and to view the camera output on the PC screen.  The camera produces a real time image and for planetary imaging I use a window of 640 pixels wide and 480 pixels high with 24 bit colour. On screen the frame update rate is claimed to be up to 30 frames per second, but this depends on the CPU and graphics system of the PC being used.  It becomes immediately apparent that the limiting factor in trying to get high-resolution images of Solar System objects is the Earth’s atmosphere. The churning and boiling of the atmospheric air currents renders the camera image useless for most of the time.  However, occasionally the atmosphere calms for a brief moment or two and it is then that the images must be captured. The power of the system comes when the raw images are acquired and saved as an AVI video file. The acquired AVI file contains very many individual image frames. The very best can be extracted and processed further to bring out details that were hidden or difficult to see. 

Acquiring AVI Files

The software supplied with the webcam will normally allow an AVI video file to be saved to hard disc.  Each AVI file can become very large due to the large number of image frames to be saved:

For example, at a resolution of 640 x 480 and 3 bytes per frame, each image frame is 920600 bytes. Running at 5 frames per second for 10 seconds results in a file size of about 46 megabytes!  For my images I tend to acquire 4 or 5 separate AVI files each of 10 to 20 seconds duration in quick succession.  Amongst the many frames captured in the AVI files their will hopefully, be enough individual good steady images for later processing.

It must be stressed that no video compression must be employed in the generation of the AVI file as this may lose image data and cause problems for later image processing.  It is best to start with raw data that is as pristine as possible.

Frame Extraction

Once the all AVI files have been acquired at the telescope I pack up the telescope and data acquisition computer and return back indoors. All the raw AVI files are then transferred onto a CD for safety.  It is quite easy to fill one or two CD’s with raw data.

The first stage of image processing is the identification of the best image frames. A very helpful software program is called “AVI2BMP”  (see: http://avi2bmp.free.fr/ ). This program allows the user to examine each image frame and then to select the good frames for conversion to individual bitmap (BMP) files. Some additional image processing can be performed by AVI2BMP, but I tend to use it just to select the good frames.

Frame Processing

Individual image frames of the planets don’t tend to show much detail. The images contain “noise” and are of low contrast.  One way to improve them is to “stack” a number of separate images together. This will result in a marked improvement in the signal to noise ratio.  The best results come when many images are stacked, such as 100 or more.  This can be done manually using popular image processing programs such as PaintShop Pro or Photoshop, but this can be very time consuming.  Serveral excellent third party software programs have been written to perform this task “AstroStack” (see:  http://utopia.knoware.nl/users/rjstek/english/software/index.htm ) and Registax are amongst the best.

AstroStack and Registax both have a number of tools for combining bitmap images into a detailed and noise free image. Each image can be automatically aligned and combined. Additional processing such as unsharp masking, deconvolution and wavelet processing can be applied to the combined image to bring out fine detail. My preference is not to “over process” the images as they can become very unrealistic. Some examples of the processing steps are shown in below:

Image Processing Stages

The above composite picture shows the dramatic improvement that image stacking can give. Here 89 image frames were aligned and stacked together. Additional image processing operations can coax out hidden detail and the final stage is to boost the colour saturation slightly.

Mars and Atmospheric Dispersion

During August 2003, the planet Mars makes it's closest approach to Earth for 60000 years. Unfortunately for observers based in the United Kingdom, the planet barely rises 20 degrees above the horizon. As well as the turbulence and seeing problems associated with observing at such low elevations, "Atmospheric Dispersion" also causes blurring of the planetary images.  The amount by which the dispersion affects the image depends on how far from the zenith the planet is. The nearer to the zenith, then the less the atmosphere acts as a prism.

One way that the dispersion can be corrected is to "re-align" the red and blue components of the image with the green component. This can be done using Registax or by using a dedicated RGB alignment program such as AstroAlign. Using one of these tools can improve planetary images as shown below:

RGB Channel Alignment

The left hand image is a stack of several raw frames from an AVI file. The right hand image is the same stack with the RGB channels re-aligned and ready for further processing.

Image Scale

The size of planetary images at the focal plane of a telescope are normally quite small. The smaller image in the left hand image below is an image of Mars taken at the cassegrain focus of a Celestron Ultima 9.25. This instrument has a focal length of 2350mm with a focal ratio of f/10. Even at this focal length the image is small, but some planetary features can be seen. Inserting a TeleVue 2.5x barlow lens together with a True Technology flip mirror assembly, as shown in the right hand image,  increases the image scale dramatically as shown in the larger Mars image below. Measuring the relative increase in image size gives an image scale increase of about 4 times. The focal ratio thus increases to f/40 with an effective focal length of 9400mm.

Image Scale Comparison Barlow, Flip Mirror and Webcam

Home WebCam Page Index