Color Photometry with a Webcam

***Under Construction***

Donald F. Collins
Warren Wilson College

M37 (NGC 2099) photographed with modified Philips webcam.
Note the contrasting colors.


Dr. Geoff Chester of the US Naval Observatory has  recently published stunning planetary and deep sky images made with a simple modified webcam.  This page has introduced me to QCUIAG - Quick Cam and Unconventional Imaging Astronomy Group and to the relatively simple modification of a Philips Webcam camera developed by Steve Chambers.  The Steve Chambers (SC) modification allows the computer to completely control the exposure time and to photograph deep sky objects.

It has long been a desire to develop a simple method to measure color temperatures of stars, especially for Introductory Astronomy classes which I teach at Warren Wilson College.  Our equipment consists of a portable 8-inch SCT, a LynxxPC CCD camera, and filter wheel.  Color photometry with a filter wheel and a monochrome camera requires much time, record keeping, and computer analysis.  Survey students are soon bored analyzing photos of single stars (not very interesting compared with textbook deep-sky photos), and soon lose interest with many computer spreadsheet steps, only to get a couple of abstract graphs.

The advent of low-cost webcams, which produce digital color images, has inspired the development of a color photometry laboratory for the introductory astronomy course at Warren Wilson College.  The advantages of this tool include:

This development has not been without its problems, however:  [postpone the discussion of problems.]

Black Body Radiation

The figure below plots the intensity of radiation from a black body according to the Planck black body law:

Figure:  The Planck radiation curve for objects at different temperature.  The sun (~6000 K) has its peak radiance output at about 500 nm.  Visible light ranges from about 400 nm to about 700 nm with the blue and red bars representing the approximate blue and red light regions in the visible spectrum.

Stars are extremely hot incandescent sources whose general spectral characteristics follow the black-body radiation curve.  As can be seen in the figure above, different temperature stars exhibit peak intensity at different wavelengths as a function of temperature.  Stars like the sun  (G-type) (6000 K) peak at about 500 nm, and the intensity is about evenly distributed in the visible spectrum between 400 and 700 nm .  Hot B-type stars (10,000 K) peak in the intensity at about 300 nm.  The intensity of blue light from such a star is greater than the intensity of the red light, thus such B-type stars appear blue-white.

On the other hand, for cooler stars (5000 K and cooler) the blackbody curve peaks in the red end of the visible spectrum.  as shown in the graph below.  Because the red intensity (600 nm region) for the cooler stars is greater than the blue intensity (400 nm region), these stars appear red.

Figure .  The Planck radiation curve plotted on an expanded vertical scale to show the radiation curve for cooler stars.  Note that the red intensity is greater than the blue intensity for stars cooler than about 5000 K.

Thus if the camera gives good separation in the spectral sensitivities of the red, green, and blue images, the temperature of a star may be obtained from the ratio of any two colors: blue/red, blue/green, or green/red as indicated in the graph below:

[graph of color ratio vs. temperature from the black body spectra]

Astronomers usually plot the color index similar to the magnitude scale rather than the color ratio.

Color index = -2.5*log(Blue/Red)

and is equivalent to

Blue magnitude - Red Magnitude

Development Methods


A Philips Vesta 690K (similar to the 675 recommended by Steve Chambers) was obtained and modified to allow for long exposures (greater than 1/25 sec).  An inexpensive 1.25 inch adaptor is purchased from Steven Mogg.

Spectral Sensitivity.

A slit was formed on a window blind, the camera focused on the slit from a distance of 1 - 2 meters, and a holographic diffraction grating from Learning Technologies Incorporated, was placed directly in front of the camera lens.  When the camera is aimed to one side of the slit, the visible spectrum of the daylight appears on the image as shown in the figure below:
[spectrum of daylight]

A profile of the intensity of each of the respecive colors is shown below:
[Intensity of red, blue, and green images of solar spectrum]

As can be seen in the spectral sensitivities for the webcam, there is considerable overlap of the different spectral sensitivities, even between the blue and the red.  Ideally, the blue response should be zero in any of the red region of the spectrum.  To improve the color separation, a magenta filter (Kodak Wrattan No. XX) was used for all color photometry.  Magenta is a "minus green" or green-blocking filter.  This filter dramatically improved the color separation.

Figure .  The calculated color index produced by the Philips webcamera as a function of temperature of a black body.  The direction of the temperature scale has been reversed to be consistent with astronomy plots.  The color index has been shifted to match real stars.  This should be unnecessary if the camera were calibrated using direct sunlight rather than landscape scenery.

Response vs. exposure

[Graph of the red response vs. exposure time for default gamma]

To test the camera for linearity, the camera with lens or telescope was aimed at a flat featureless wall (similar to obtaining flat field response).  A series of exposures was made for exposure times ranging from 1/25 sec to 40 sec.  Corresponding dark frames were subtracted.  As can be seen from the graph above, there is considerable non-linearity of the camera response.  The amount of non-linearity can be controled somewhat by the "gamma control" provided by the camera driver.  This control is qualitative only, and the camera is made most linear if the gamma control is all the way to the left on the control window.  For all images and stars, the white balance is set to "sunlight" and the camera gain has not been touched.  The following graph is the result.

[graph of red response vs. exposure time for minimum gamma]


Figure .  The observed color index (-2.5log(blue/red)) as a function of star temperature.   The star temperature is inferred from the spectral classification.  The heavy blue dots represent stars observed for Astronomy class activity using the magenta or "minus green" filter.  Note that the results with the magenta filter exhibit better color sensitivity to temperature than the preliminary results.  The red curve represents the ideal results assuming  standard Johnson filters, a uniform sensitivity vs. wavelength for the CCD, and no atmospheric effects.

Figure .  The calculated color index as a function of spectral class for various bright stars recorded during a one hour class session in November, 2002.  A small value of color index indicates a blue or hot star.  Stars that saturated the detector are not plotted.

Figure .  Color index measured from the webcam data compared with published values (Henden/Kaitchuck, 1990) of the color index for selected stars in the Pleiades.