Monday, December 4, 2006

DirectShow fun

Yesterday, I bought a webcam from Fry's. Originally, the proposal said that an iSight would be used, but I realized a few things:
  1. Fry's doesn't seem to carry them in the store.
  2. Newer Apple computers come with an iSight built-in, so finding a new iSight may be difficult. (Actually, it seems like you can still buy them from the Apple Store...)
  3. The iSight requires Firewire. As the primary development machine will be an IBM Thinkpad--which doesn't have any Firewire ports--the camera will be unusable without additional equipment.
Luckily, one camera in particular caught my eye--Logitech's Quicktime Orbit MP. It has built-in pan/zoom/tilt capability and a 1.3 megapixel image sensor. The specs said that live video's limited to 640x480, just like the iSight, but I figure it'd be fun to play with. And best of all, it uses USB.

I installed the software that came with the camera and played around with it. The included software seems to come with a built-in face tracker. My informal tests showed that it wouldn't really track all that well; the camera wouldn't pan sometimes when my face disappeared from the picture. But no matter--I don't believe we're going to use this functionality in the software we'll be writing.

I also discovered something else--it turns out that video support doesn't cap out at 640x480. There's an additional "HD" mode--960x720--that seems to provide more information. There are two disadvantages to this mode, however. One is that pan/tilt doesn't work; the built-in software simply ignores any requests to move the camera. The other is that there is obvious lag; it doesn't operate at 30 frames per second like the 640x480 mode. Perhaps we can test the operation of our software in both modes.

Anyhow, I should study for finals and such. Good luck with yours also!

BTW: I also played around with DirectShow a bit and put everything I have so far up on Subversion. Using TortoiseSVN, access svn://svn.lifeafterking.org/cse190/. You'll need DirectShow .NET and Visual Studio 2005 to compile. Now I'm gone for real...