Using a webcam for infra-red sensing
Let's say you want to use live video as an input source for an installation, multi-touch screen, or some other purpose. You've got software, such as Processing [see the Computer Vision libraries], Lingo [the TTC-Pro XTRA by Dan Rozin], or Actionscript [Adobe technote], which can do video analysis, "blob detection", brightness tracking, etc. Now you need a good video source.
Older webcams like the one I hacked had much less resolution than newer cameras. So consider how much detail you really need for your application. If you're tracking amorphous blobs, low-res should be fine.
Another issue, older webcams may not be automatically recognized by your computer. New Macs need help detecting units like this Quickcam. I found this great app and component to be the answer. All my video software was able to find this old webcam using the "macam" driver. (Processing did sometimes need to be restarted while I was editing the code, however.)
You will want to control the area viewed by the camera to give you only the motion information you need. [This fantastically detailed site by Thomas Brand explains a particular way of using IR LEDs for detecting finger-touches on a plastic screen.] Sometimes using infrared light is the best solution. You'll need a camera that sees in infrared, and a source of infrared light.
The steps:
1. Remove the built-in infra-red filter, present in most cams. [See my description here.] OR... Purchase a camera designed for infrared vision. [This manufacturer has a good selection of modern, compact firewire camera boards and lenses.] [One place to buy them is here.]
2. Add a filter which blocks visible light. This will keep stray illumination in the scene from confusing your software. A double or triple thickness of fully exposed color negative film is amazingly effective.
OK this is pretty temporary, but you get the idea.
3. Find an infrared illumination source. [See my links for some IR light sources and cameras.] I found this supplier who has an inexpensive kit for a small "spotlight". It took me a couple of hours to solder the parts. Not bad. But I found this creates an intense narrow beam, and I wanted something broader, so after trying various materials, I found the diffused plastic of a miniDV case pretty effective.
4. Experiment with the space. You will notice that daylight and some forms of lighting do contain some infrared. Aim the light from the infrared LED array to brighten the area where you need to detect motion.
Here's the same illumination through the IR-only webcam:
Turning on the IR illuminator does brighten the wall 8 feet away somewhat:
The beam from the illuminator helps distinguish nearby objects.
Have fun and be patient!
- peterM's blog
- Login or register to post comments
- Printer friendly version
