The X-Cam and ISPS Projects

Overview Webcams Software Results
Overview PERT Optical Math
Olin-NASA Research Olin College NASA Goddard Space Flight Center Constellation-X

X-Cam Project Overview

Our goal is to construct an inexpensive device that will be capable of detecting X-ray events and displaying them in an useful manner to scientists at NASA. Our original tack on achieving this was to analyze the workings of a webcam and its interactions with its software at the USB level. After making little progress in this manner, we eventually switched over to a video processing solution that proved equally useful and far easier to implement. This video processing portion can be further broken down into streaming video and batch processing solutions.



We used three different webcam models for this project: the Sabrent SBT-WCCK (left) and the Fieon Digital HYV-302B (middle) and the Dynex DX-DTCAM (right).

All of these webcams are quite cheap - they weigh in at a rough total of anbout $65. Some specifications for the webcams can be found here. These were all modified in a similar manner to allow x-ray detection: their lenses were removed and a protective piecec of glass in front of the CMOS chip was carefully removed. A word of caution: the protective glass is extremely difficult to remove and the circuitry beneath it is extremely fragile - we found that it was substantially easier for the slightly more expensive model (the Dynex webcam).



The Sabrent and Fieon webcams were first studied using a USB analyzer. We placed the cameras in a room at four degrees Celsius (to reduce noise from heat) and took data for each webcam in total darkness and with a laser pointer shining directly at the lens.

Sadly, we were unable to discern any useful information from the raw USB data that we obtained from the USB analyzer. We found out several things about how the camera works (isochronous transfers) and changes settings (eg resolution), but this did not help us with the goal of detecting and displaying x-ray events. After a long time gainlessly attempting to understand the USB data, we changed our approach to working with video.


Streaming Video

The first thing that we tried on the video processing side of things was a program called vvvv. This open-source program allows the manipulation of video in a huge variety of ways and can be used for things such as face recognition. We used it to do a couple of functions relating to x-ray data. In particular, we made a patch (vvvv's lingo for a program) with a renderer that displayed a running average of a number of frames together (to reduce the effects of noise) and a renderer that would reduce an image to gray and black based on the brightness of a certain pixel being either above or below a threshold that is set in the patch. Sweet. Now we can see x-rays pretty welll in realtime. The issue? vvvv's compression doesn't seem to work correctly; thus, any video that we want to save ends up being massive (~1GB in 2 minutes). Also, we were unable to come up with a way to output the x-ray event data to an ASCII file. To fix these problems, we turned to an old friend: Matlab.  Nevertheless, our work in vvvv can be downloaded by clicking here.


Batch Video

Now we were in endgame mode. nds up being massive (~1GB in 2 minutes). Also, we were unable to come up with a way to output the x-ray event data to an ASCII file. To fix these problems, we turned to an old friend: Matlab. With this approach one takes a video with the camera's prvided software and saves it as an .avi file that is then imported into Matlab. Now that Matlab has a hold on the video, it can do all sorts of useful things. Apart from the same averaging and thresholding functionality implemented in vvvv, Matlab allowed us to output x-ray events to an ASCII file. Additionally, we have a data export that only takes the centroid of the events that show up on the camera above a threshold - this should make it much easier to parse the data in many cases.

Sweet. Mission accomplished. And some extra functionality to boot. Hooray!