Webcam Algorithm Input Method 5
by Joel R. Voss aka. Javantea
jvoss@altsci.com
jvoss@myuw.net
Sept 16, 2006 - Oct 26, 2006
Webcam Algorithm Input Method 5 0.1 Source
[sig]
Webcam Algorithm Input Method 5 Beta Source
[sig]
Webcam Algorithm Input 1 0.1 Source
[sig]
For many projects, using a webcam hooked up to a Linux-based PC is an
excellent input method. Since many laptops also contain serial and parallel ports, a program can be written that uses a USB webcam and serial port for input and serial ports and parallel ports for outputs.
The simplest way to get webcam input is from a program that is already good at getting this input. For the first alpha versions of webc5, I used Transcode, but others are available. With
Transcode, I was able to get input properly. However, latency between Transcode and my program was enough to require a rewrite. Luckly, Transcode is open source, so I was able to copy the source, modify it, and rerelease it GPL. It ends up that the v4l interface is actually pretty straightforward. Using this method, I can import frames and do mathematical functions on them at 20 fps average on a fast computer with a fast camera (a lesser camera gets 8 fps average). This version 0.1 is a simple motion tracking system that simply shows a double buffer system and the output of the function td(p) = threshold(diff(p[n], p[n-1]));
The modified import_v4l.c opens the v4l driver and grabs a frame, diffs it, and displays it.
To get the modified export_ppm2 working, do the following:
cd ~/src tar xzf ~/programs/webc5-0.1.tgz cd webc5-0.1/ configure && makeThen, you can run webc5
src/webc5Press the Start Capture button to start the capture and display.
If you are interested in developing Webcam Algorithm Input Method 5, feel free to
e-mail me.
Back
-
Leave a Reply
Comments: 0
Leave a reply »