Adventures With High Resolution Webcam Lunar Mosaics

How I Got Started in Webcam Astrophotography

In 2004, while I was writing the book "An Introduction to Digital Astrophotography", my publisher suggested that a webcam chapter be included as an example of how to get into digital imaging without a large cash outlay. Having come from a film astrophotography background, I was still adjusting the almost whiplash speed at which digital cameras had overtaken amateur celestial imaging. I wasn't yet familiar with webcam imaging through a telescope and had serious reservations about just how good could an image be taken with a little "toy television camera". To put the issue to the test, I bought a Philips ToUcam 840K, along with a 1 1/4-inch eyepiece adapter and thread-in Astronomik infrared filter, from the folks at Scopetronix in Florida.

Just to digress, let me say I was quite impressed with the service from Scopetronix. I ordered the camera from them in the middle of the tripple huricame whammy that clobered Florida in 2004. Storm damage from one the first huricanes forced them to abandon their store location and completely relocate their business elsewhere in the same city. Yet Scopetronix never missed a beat and my camera was delivered in quick order.


A Big Surprise With the First Imaging Session

Hi-Res Webcam At this point, let me say that I wouldn't be placing this article on my web site if my experiences with the ToUcam were anything other than the delightful surprise that I found with my initial experiments with the little camera. It only took one session with the ToUcam to convince me that for high resolution solar system photography, a webcam is not just another available tool, it is THE BEST tool, when coupled with the proper software, for imaging the moon and planets. Not only does the webcam allow the creation of high-resolution images, it is inexpensive, easy to operate, and the operational learning curve is fast. You can get excellent results quickly.

Having recently switched from 40 years of film imaging to using a digital camera on solar system objects, I was delighted at the quantum leap in image quality available using digital techniques. Now, the webcam offered yet another leap in image quality over what was available using a digital camera. Basically, under the continuously turbulent seeing conditions prevalent in my area of south Texas, the webcam is able to image greater detail on the Moon than I am able to see visually. The small field of view with the web cam is essentially like using a 4 mm eyepiece with a telescope. The seeing is so rotten in my area that I never dream of using a 4 mm eyepiece for observing anything. If I am lucky, a 9 mm may squeek by before the image becomes a hopeless blur. Thus my skepticism about any photographic success with a webcam was still high when I set it up for the first time.

Just to emphasize my telescope is nothing fancy, it is a 1975 vintage Celestron-8. Yes, a classic old orange tube special. After 30 years I jealously hang onto that old scope because not only have I seen wonderful and unique sights through it, it possesses some darn good optics. I also feel I have yet to use the instrument to its full potential, thus I feel no great need to replace it, even after 30 years. I have, however, recently replaced the original fork mount with a Losmandy GM-8 German equatorial mount because I flat wore out the old folk mount. Celestron used to advertise that their equipment was guaranteed for 25 years. Well... it made it! But last year it started to show its age and some compenents needed for good tracking were basically unrepairable. The GM-8 mount has made the old scope more versatile and I fully expect to use for many more years.


The Reality of High Resolution Webcam Astrophotography

Regardless of what we experienced "old time" film astrophotographers initially thought about doing astrophotography with a small, inherently low-resolution device like a webcam, there are two basic truths that have evolved about webcam imaging of solar system objects:

1: Webcams have a really narrow field of view when attached to a telescope.

2: When the resulting .AVI videos are processed into single .BMP or .TIF images with a program such as RegiStax, they are capable of astonishing resolution.

With that said, that fact still remains that being used to the wider lunar fields of view available with my Nikon film cameras and Olympus and Canon digital cameras, the keyhole-sized views through a webcam, as detailed as they were, left something to be desired. Assembling many of the narrow fields into a high-resolution wide-field mosaic seemed a natural thing to do. Some interesting astrophotography adventures have come from my quest to create wide-field lunar mosaics using and inherently narrow-field imaging device. In fact, working with the webcam has been quite a bit of fun. The resulting images are very reminicent of the images returned by the early NASA lunar probes from the 1960's.


The Philips ToUcam 840K

My webcam experience is only with the Philips 840K, but the suggestions here can be applied to other brands of basic unmodified webcams as applied to solar sytem astrophotography.

(left image above)

The lens unthreads from the ToUcam 840K camera body to allow installing an adapter which inserts into any 1 1/4-inch telescope focuser. The infrared filter threads into the front of the adapter and performs two functions. First, it keeps dirt off the little CCD sensor. As small as the CCD chip is, even a small dust blob will make a noticable splotch on the resulting images. Secondly, the camera is sensitive to infrared wavelengths that are invisible to human vision. This is a problem because most refractor telescope optics do not focus this infrared on the same focal plane as the "visible light" image, and thus the infrared will degrade the image focus. This is not as much of a problem with reflector telescopes, but it is a good idea to use the filter anyway to get a crisper focus.

(right image above)

With the focuser adapter supplied by Scopetronix, I noticed it was possible to thread it deep enough into the camera to actually contact the circuit board that the CCD sensor was mounted on. The adapter does not have to be installed this deeply into the camera, but if it does not "bottom out" against something when it is threaded into the camera to lock it in place, gravity will rotate to heavy end of the camera downward when it is installed on the scope. This will prevent orrienting the camera at a specific angle relative to the target, such as when aligning the field of view square with the north-south, east-west direction on the Moon, a procedure needed to allow aligning image sequences into mosaics. My solution was to use two 1/2-inch flat washers as spacers between the camera and adapter so the adapter can be tightened snugly against the camera without contacting the circuit board inside the camera.


Basic Camera Accessories

There are many ways to approach webcam imaging. To start my climb up the learning curve, I took the very direct route of only using the image capture software that comes with the ToUcam 840K. This is a very basic, but servicable, program called Philip's Viseo Lounge which contains some no-frills camera controls. For processing the resulting .AVI video files into usable images, I downloaded the freeware program RegiStax, then available as Version 2. Version 3 is now available and I highly recommend it. More on image processing later in this article.

One of the basic truths about webcam imaging is that you will need to have a computer at the telescope to run the camera and record the camera's output. Fortunately the camera is powered by the computer through the USB connection cable. The most convenient way is to use a laptop computer. But if necessary, an older essentially obsolete desktop computer can also be used for this purpose. Most webcam software works well with older Pentium II computers. The entire computer can be placed on a microwave cart and wheeled to to the telescope if you are observing from your driveway. The main requirement is that there is sufficient hard drive space to record the huge amount of video data the camera will produce. It is not unusual for a webcam to produce 200 Megabyte (yes, MB!) files for each video sequence that will be reduced to just one single VGA size image. A rule of thumb for older used computers is to get at least 20 Gb of hard drive space. Any less may prematurely end an imaging session for lack of video storage space. Another storage space consideration if imaging on multiple nights and not having time to process the previous night's videos in order to clear hard drive space for future imaging. This will not be a problem with newer laptops that have 40 Gb and higher storage capacities but older machines may not have sufficient capacity for multinight imaging.

Besides the camera to telescope focuser adapter and infrared filter, the only other accessory I would initially recommend is a six-foot USB extension cable for connecting the camera to the computer. The three-foot cable that comes with the camera will prove too short and without a USB extension cable, you will have to resort to the tricks I had to do on my first imaging session and stack my laptop on top of two boxes to be able to reach the telescope.


Focusing a Webcam on the Moon

Before you can begin imaging the Moon, you have to focus it. This is more of a challenge than it sounds. Remember the webcam's small field of view presents a live image on the computer monitor that is like viewing the Moon through a 4 mm eyepiece. Even a modest 8-inch F/10 telescope will operate at about 500 power using the CCD in the ToUcam 840K. At this magnification, just touching the telescope's focus knob will cause image shake. Atmospheric turbulence will cause such a high-magnification image to quiver and shake, complicating finding exact focus. One trick I found useful was to slew the field toward the lunar terminator, then raise the camera's shutter speed to a high level. This will grossly underexpose the Moon, but what we are looking for is mountain peaks protruding out of the darkness. By raising the shutter speed to where these mountain peaks are barely visible, we can use them to find exact focus. By racking the focus in and out, the faint mountain peaks will vanish completely of they are out of focus, then pop back into view when they are well focused. Once focus is acheived, the shutter speed is reset to normal.


Basic Camera Operation

The basic software that comes with the ToUcam will work for capturing the video sequences that will be converted into still images. However, for astronomical purposes, and particularly if a large number of video sequences are to taken, such as for a mosaic, the VRecord software provided by Philips is a bit clunky and will not stop you from making mistakes like accidentally recording over the previous video capture. The software of choice for doing astronomy with a basic webcam is K3CCD Tools created by Peter Katreniak. The latest version of this program has a modest price, but Version 1 of K3CCD Tools can be downloaded for free at the K3CCD Tools web site.

I strongly suggest that you test fly K3CCD Tools after working with the basic Philips program. I think you will agree K3CCD Tools is a big step up. For me, one of the biggest inconveniences with the Philps software was having ti designate a new name for each video capture or it would everwrite the previous capture. K3CCD Tools automates that process by sequentially assigning a new file name to each new video capture. This is a huge convenience late at night when fatigue tends to cloud the mind and make you loose track of such housekeeping functions.

For solar system imaging, set the webcam to its highest non-interpolated resolution. This is usually 640 X 480 VGA resolution. Do not use any video compression. All the available image data is needed to create the final image. When only a single area of the Moon is being imaged, you can often set the camera exposure settings to fully automatic and acheive good results. However, along the terminator where large areas of black may also be in the frame and mislead the camera's autoexposure function, manual adjustment of shutter speed, gain, and brightness may be necessary to bring out the best detail. Adjustments are done while watching the results on a real time live image on the computer monitor. The shutter speed is set just as in conventional photography. The higher the shutter speed the better, as fast shutter speeds freeze the image before atmospheric turbulence and smear it. The ToUcan 840K is sensitive to less than one lux light level, so shutter speeds can be fairly high compared to traditional high-magnification film photography. Depending of the lunar phase and whether a Barlow is being used, shutter speeds between 1/50th and 1/250th are normal. The gain setting is something new to those not used to video photography, but in traditional terms, gain is like the film speed setting, the higher the gain, the more sensitive the camera is. However, just as higher film speed comes with the penalty of larger film grain, so does a higher webcam gain setting because higher gain amplifies the electronic noise in the camera and creates grain-like speckles in the image. In a nutshell, more gain, more grain. A ballance has to be acheived between shutter speed, gain sensitivity, and the brightness setting to allow a normal contrast image. But in reality, these settings can be quickly adjusted on the fly while watching the live image.

For wide area mosaics, it is mandatory that the camera be manually adjusted to one setting then left there throughout the entire mosaic sequence. This in important to maintain the same image density between mosaic segments. While it is tempting to adjust the camera to fully expose the dim areas along the terminator, this will grossly overexpose the fully illuminated lunar limb resulting a garish and unpleasing image. I find best mosaic results are acheived by setting the exposure to properly record the brightest areas of the lunar limb and let the dark terminator fade out naturally.

When processing the video file into a single finished image, the more video frames there are, the better the final image will be (up to a point, recordeing thousands of video frame approaches the point of diminishing returns). This is because the image processing programs that stack multiple video frames into a single image will throw out images that are degraded below a certain threshhold by atmospheric blur and poor seeing. Just for the sake of argument with myself, I choose capturing 900 frames per video as my baseline. This figure was arrived at from several factors. First, there needs to be lots of frames available for processing. Under my usual seeing conditions, out of the 900 frames captured, only about 300 or so pass the quality threshold for staking into the final image. Also, the frame capture rate has to be fairly slow or image quality will suffer. Viewing a live image of the Moon at 30 frames per second is fine for casual viewing and focusing the image, but a frame rate of 10 per second is better for capturing a higher quality video sequence. The slower frame rate lengthens the video capture time, but a practical time limit has to be used or a mosaic requiring a large of image segments will take a long time to record. And time is something I don't have a lot of when imaging from my back yard. The Moon is continuously visible for only a certain time through the gaps in the many trees in my yard and it is inpractical to move a telescope halfway through a mosaic sequence. Thus a 90-second video at 10 frames per second is my standard to ballance all parameters. Fortunately, camera control software like the Philips VRecord and the more advanced K3CCD Tools allow capturing timed video sequences that terminate after a programmed time. As long as the telescope is well polar aligned, capturing a video sequence is as simple as aim, fire, and forget.



Image Processing on the Cheap

There are a number of processing options to turn a series of .AVI videos into a single high-resolution mosaic. Which path you chose may be dictated by software you already have, such as Photoshop or a mosaic making program. For those who do not have Photoshop, there are free software packages that will allow you to assemble a mosaic. In fact, using the freeware described here makes it actually easier to create mosaics than doing so with Photoshop. But if you already own Photoshop and are comfortable with it, use it. The mosaics shown below were all assembled using the Layers function in Photoshop. However, following the suggestion of Jan Timmermans, I later tried his mosaic method using several freeware programs and was amazed to see they acheived similar results. How I applied these freeware programs is described in the next few paragraphs. For another tutorial about assembling lunar mosaics be sure to visit Jan's lunar tutorial website, then click on the "full write-up" link. Also, for tons of insight and advice about electronic astrophotography in general, be sure to browse through the rest of Jan's excellent website at The Firmament.

Regardless of how you assemble the mosaic, the conversion of an .AVI file into a single still picture should begin with RegiStax. This wonderful program created by Cor Berrevoets is avilable from the RegiStax website. Version 3 of this excellent program has recently been released and the program has a number of features that speeds the processing of multiple .AVIs that were taken under similar exposure conditions. For instance, Version 3 has options that allow the program to remember not only the image stacking parameters, but the wavelet processing settings so they can be automatically applied to the next video processed. Once the first video is processed, the remaining videos can be processed into still images with as little as three mouseclicks per video. RegiStax is an amazingly powerful program and very easy to operate. Tutorials on the RegiStax website will have you up and runing in no time.

Because slight tracking errors and unsteady seeing way cause the target to shift slightly during the video capture period, after the video frames are stacked there may be a narrow gray or white border around the edge of the completed still image. A means is needed to crop this border from mosaic segments or they will appear on the moasic. For this task, I recommend Irfanview, available from the Irfanview website. I have used Irfanview for years and consider this jewel created by Irfan Skiljan to be one of the most underated Windows programs available. Not only is it an image viewing program that runs circles around the native Windows image viewing program (assign it as the default image viewing utility in the Windows folder options), it is an excellent image processing program that can crop, rotate, resize, change brightness and contrast, sharpen, etc.

Once all the mosaic images are croped and complete, it is time to assemble them into a finished mosaic. The tool for this task is iMerge, a mosaic- making program created by Jon Grove, and available from the iMerge website. In today's era of rampant bloatware, it seems a little odd downloading a Windows program that is only 36 Kb in size and expecting it actually do something. But Grove has learned his programing skills well and this small program produces big results. Well, I didn't intend to make a pun, but its true. The program is simplicity in itself. Simply drag and drop mosaic segments into place then save the completed mosaic as a single image.



And It Doesn't Cost One Darned Dime!

So what's the bottom line? After purchasing the camera, telescope adapter, infrared filter, and a USB extension cable (and hopefully you already have the computer) , what does it cost to create NASA-like high-resolution lunar mosaics? Nothing! As demonstrated here, the camera control, video processing, image processing, and mosaic making software is all free. All that remains is investing time in learning these easy programs and getting out under the night sky and capturing some video. Even for an old film astrophotography veteran like me, the transition to webcam imaging was downright fun. Give it a try!



terminator

Lunar Terminator on November 5, 6, and 7, 2004

Click here for full size image (2172 X 3132 pixel 613 Kb)


These initial mosaics of the terminator were limited to just a few frames by the small 4
Gigabyte hard drive space in my wife's old Dell laptop. It was only laptop I had access
to when starting to use a webcam. It was a good machine in its day, but now it just
serves as an email and web surfing computer. However, it does illustrate the need
for large hard drive space when webcam imaging.

Webcam imaging of solar syatem objects, by the nature of its combining hundreds of
individual frames into a single image, and the amazing image processing power of
programs like RegiStax, allow images of the Moon and planets acheive much higher
resolution over a given area of the target than that acheived with film or digital still
cameras. But if the seeing is really bad, horrible actually as in the November 5th mosaic,
resolution will still suffer.

The technique for making simple mosaics of the lunar terminator is to simply advance the
field of view about 75% up or down the edge of the Moon. It is best to orient the camera
with the north-south directions on the Moon. If the camera orientation is not square with
the lunar cardinal dirrections, the mosaic takes on a sawtooth pattern as displayed in
most of these terminator mosaics.


terminator

Lunar Terminator on December 18, 20, and 21 2004

Click here for full size image (2888 X 3276 pixel 642 Kb)


After more than a month of rotten weather, I secured some
more mosaics of the terminator just before Christmas.
By now I was unsatisfied being limited to just the terminator
and wanted to exapand the mosaics to include the entire
Moon. Fortunately, about this time I inherited (rescued
from a trash can) another laptop that had suffered hard drive
failure. Installing a new 20 Gigabyte hard drive and reloading
Windows brought the machine back to life and gave me a dedicated
webcam computer with sufficient hard drive capacity to
image the entire full Moon with up to 50 individual video
sequences.


pattern

Mosaic Segment Pattern

This partial image of the full Moon mosaic at the bottom of this page
shows the mosaic pattern used to image the entire Moon. Initially,
the camera's wide axis is aligned with the northern edge of the Moon
by slewing the telescope back and forth in right ascention wile adjusting
the camera mounting angle until the northern edge of the Moon travels
parallel with the edge of the camera field of view. Once the camera is
aligned, strips of overlapping images are made by advancing the
camera about 75% of the field of view until one strip of images is complete.
The the field of view is slewed downward about 75% and the next strip
of images is taken. With a 2000 mm focal length, the polar regions
usually require four overlapping images wheil the equatorial regions
use up to six images.

The upward creep of sucessive images as the mosaic segments move
from west to east is a bit of mystery to me since I try to track the Moon
as well as possible. It appears to be more movement than can be
accounted for by the orbital motion of the Moon. However, each strip
of images creeps up at the same rate, so they all overlap anyway.


crescent

Waxing Crescent Moon

Click here for fullsize image (2404 X 3160 pixel 309 Kb)


The images shown in this sequence of mosaics is displayed in order
of increasing lunar phase. Therefore, this first image is not really the
first taken. This thin crescent was imaged on February 13, 2005 and is
a mosaic of 22 separate video sequences. Individual segments
were processed with RegiStax 3, then assembled using the Layers
function in Photoshop 7.0.


crescent

Waxing Crescent Moon

Click here for fullsize image (2400 X 3400 pixel 446 Kb)


After waiting for months after getting my webcam for good weather, I was
finally rewarded with the best resolution image of the full lunar
disk I have ever taken through my own telescope. This image is
a mosaic of 20 separate video sequences taken on January 15, 2005.
Individual segments were processed with RegiStax 2, then assembled
using the Layers function in Photoshop 7.0. The mosaic is far from perfect,
with a few segment borders visible here and there, but as far as
resolving surface detail, it my best lunar image to date
taken from my south Texas home where the air is NEVER
steady.


crescent

First Quarter Moon

Click here for fullsize image (2000 X 3200 pixel 455 Kb)


After waiting another month for good weather, I was able to
image the first quarter moon on March 17, 2005. The seeing
was poor, and frankly I botched the camera brightness and gain
settings, resulting in a compressed image tonal dynamic range.
This is evident in the washed out appearance of craters on the
limb of the Moon that are detailed in the previous crescent shots.
25 separate video sequences were were processed with RegiStax 3,
then assembled using the Layers function in Photoshop 7.0.


waxing gibbous moon

Waxing Gibbous Moon

Click here for full size image (3056 X 3152 pixel 562 Kb)


This is my first attempt at a full Moon mosaic. It is a
combination of 42 separate images taken over about a
two hour span. On this mosaic I discovered a possible
problem with using the basic camera operating program
the comes with the ToUcam. The program requires that
each successive video sequence be named in advance
or the next video sequence will overwrite the previous
one. Out of 42 repetitive videos, one mistake is likely
to happen and it did with this image. I forgot to designate
the file name of a video about halfway through the series
and thus lost a segment along the eastern edge of the
equator. Essentially, there was a hole in my Moon.

Fortunately, Jan Timmermans had imaged the Moon using
a similar camera and focal length about 24 hours after
I made my mistake. He was kind enough to allow me to
"borrow" a chunk of his Moon to patch the hole in mine.
The libration angle was different even after only one day,
but after a little Photoshop work, only experienced lunar
observers can spot the slightly out-of-kilter area on the
eastern equator. Thank you Jan for saving my mosaic!

Notice the Maruis Hills visible along the terminator to the
west of the bright crater Kepler (full resolution image).

full moon

Full Moon

Click here for full size image (3132 X 3188 pixel 629 Kb)


This image is of the January, 2005 full Moon. It was
assembled from 48 individual segments taken during
two hours of imaging. Two things are noticable on the
full-sized version. First, you can see amazing detail
in the southern regions because libration and the tilt of
the Moon's orbit allowed us to see "under" the Moon.
Numerous mountain peaks stand in stark detail. Second,
a close look at the Oceanus Procellarum area reveals the
effect of the wildly variable seeing in my area. Most of the
Moon is sharp, but for a while the seeing degenerated into
a massive blur. Fortunately, this happened while I was
imaging the more bland area of the globe so it is not as noticable.



3rd quarter moon

3rd Quarter Moon

Click here for full size image (3132 X 3188 pixel 629 Kb)


This image is of the August 26, 2005 3rd quarter Moon. This
image is slightly smaller than the previous mosaics
because I switched to an Atik IIhs camera. This camera
has the same number of pixels in a 640X480 array like
the ToUcam 840 used ealier, but the pixel size is 7.4
microns instead of 5.6 microns. The camera thus has
slightly less resolution over a given area of the Moon.
But the bigger pixels are more sensitive and the camera
produces excellent images.



3rd quarter crescent

Wanning 3rd Quarter Crescent Moon

Click here for full size image (1287 X 2279 pixel 201 Kb)


This image is of the Septembert 28, 2005 3rd quarter crescent
Moon. This is close to as low as I can see the Moon above
the eastern horizon because of tall trees.



3r quareter crescent

Wanning 3rd Quarter Crescent Moon

Click here for full size image (2400 X 3000 pixel 219 Kb)


This image is of the September 29, 2005 crescent Moon.
I had to wait for the Moon to rise above the trees so
twilight was beginning to be a factor as well as poor seeing
which degraded the image compared to the previos morning.



Back to ------------------ Table of Contents