Wednesday, March 25, 2009

Video - Somewhat...

My latest endeavor with the Overo Earth (micro-beast) is to connect a Logitech
QuickCam® Orbit AF Camera to obtain snapshot images from the camera and to control the vertical and horizontal position of the camera remotely. To that end I have met with some limited success.

In order to obtain images from a web cam or USB camera you need a driver for the device so the kernel can communicate with the hardware. Luckily for me, since I am terrible at programming, others have created kernel driver software which communicates with different types of USB camera hardware - the Logitech Sphere is one such device with a kernel driver already written for it. My second stroke of luck is the fact the specific kernel driver source code is already in the Overo Earth software respository and downloads when you setup a development environment for compiling software for the micro-beast (whew).

Now - even having the kernel software driver to communicate with the camera is just the first part needed. You still need software to act as an intermediary between an application that will access the camera and the kernel software driver for the camera. Again, luck is smiling on me and there exists such a software package for the Overo Earth system. The name of the software package is Video for Linux version 2, or more known as V4L2 and is a part of the linux kernel package for Linux version 2.6 and forward. Having the V4L2 already a part of the Linux package makes interfacing with different video cameras much easier for applications programs as the programmer writing the application only has to access the V4L2 API (Application Programming Interface) instead of different video camera hardware through the individual camera drivers directly - this makes the application much more portable than it would be otherwise and allows the same application to work with newer video camera hardware as new drivers are developed.

Great! I know have a method to get video snapshots from the Logitech Sphere but still need an application to do something with them. There are numerous applications that can do different things with video or video snapshots but I am looking to just capture a video snapshot from the camera and display it on a web page. One such application that lends itself very well to this application is called fswebcam.

FSwebcam talks to V4L2's API so can work with different video cameras and other video sources supported by V4L2 which makes it rather easy to configure and get working. Of course, in writing this article I look back at all of the different stumbling blocks I ran across getting video to work on the Overo Earth and hopefully some of the information contained here will be of some use to others going down the same path (grin). Working on the bleeding edge of technology requires bandages!

My next entry will describe how I setup a web server (Apache2) on the Overo and configured FSwebcam to place the images in the web server directory so you can access the image from a web browser... don't want the posts to get too long you know (grin)...



  1. Hi, I am doing a similar exercise but with an Overo Air. At the moment I am having trouble getting the webcam connected -- I see the Logitech device listed with lsusb, however I don't see any video modules loaded using lsmod, and also noticed that /dev/video0 does not exist. Did you come across this issue - if so any advice? Thanks in advance.

  2. Hi, I would like to know more about this project, I'm very interested in using fswebcam with my over earth and the summit board...


  3. Hi,

    i suggest you to use usb camera with pwc chipset and connect to zoneminder through qt apps