First Headtracking Test

Finally, after some weeks of putting it off, I manged to sit down and write some code to talk to video4linux2 drivers, in order to get streaming video from a webcam.

My motivation for messing around with webcams and v4l ioctls, was a little experiment of mine. I wanted to write a program, that given video input from a webcam, is able to detect two “markers” attached to my head. This in turn is but a step in a slightly larger experiment I’m conducting, which I’m not going to go into right now.

So what this program does, is to detect the two markers in the video stream, and draw a blue rectangle around each marker. Check out this youtube video for a demonstration of my test program. Be warned: it’s rather silly :)

Also, I wrote a nice little v4l webcam library as part of this experiment. The code is available, as usual, in my subversion repository: svn://nuclear.dnsalias.com/pub/libwcam. The test program is also available here: svn://nuclear.dnsalias.com/pub/compvis/cam_test

Posted in hacks. 4 Comments »
Follow

Get every new post delivered to your Inbox.