Logitech HD Pro Webcam C910 in Linux

Cely suggested doing some kind of time lapse video project.  I have a linux box right next to my pepper growing aerogarden, and web cameras can be cheap.  Sounds like fun.  I did some linux webcam research and decided the CXXX line of Logitech cameras are all fairly new, come in a range of prices topping out at $99 USD, and are well supported by the open source uvcvideo driver.

The camera worked great for the first few basic tests and while looking around for other things to experiment with I and found hasciicam. It outputs ascii characters to represent image data and you can see a wasteful 3.7MB animated GIF below of me swigging a coca-cola...

input: Logitech USB Receiver as /devices/pci0000:00/0000:00:10.1/usb2/2-2/2-2:1.0/input/input1
generic-usb 0003:046D:C50B.0001: input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:10.1-2/input0
input: Logitech USB Receiver as /devices/pci0000:00/0000:00:10.1/usb2/2-2/2-2:1.1/input/input2
generic-usb 0003:046D:C50B.0002: input,hidraw1: USB HID v1.10 Mouse [Logitech USB Receiver] on usb-0000:00:10.1-2/input1
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
uvcvideo: Found UVC 1.00 device <unnamed> (046d:0821)
input: UVC Camera (046d:0821) as /devices/pci0000:00/0000:00:10.4/usb5/5-2/5-2:1.2/input/input6
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)

(20101119@11:27:30)(garrison@orpheus:/)$ uname -a
Linux orpheus 2.6.36-0.dmz.8-liquorix-686 #1 ZEN SMP PREEMPT Tue Nov 9 05:29:17 UTC 2010 i686 GNU/Linux
(20101119@11:27:31)(garrison@orpheus:/)$ cat /etc/issue
Ubuntu 10.10 \n \l

(20101119@11:14:09)(garrison@orpheus:/)$ lsusb
Bus 005 Device 002: ID 046d:0821 Logitech, Inc.
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 046d:c50b Logitech, Inc. Cordless Desktop Optical
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

(20101119@11:18:08)(garrison@orpheus:/)$ lsmod | grep -i uvc
uvcvideo               55029  0
videodev               65453  1 uvcvideo
v4l1_compat            12753  2 uvcvideo,videodev

(20101119@11:21:07)(garrison@orpheus:/)$ ls -al /dev/video0
crw-rw-rw-+ 1 root video 81, 0 2010-11-19 23:07 /dev/video0
(20101120@04:56:01)(root@orpheus:...elapse/20101106)$ uvcdynctrl --clist
Listing available controls for device video0:
  Zoom, Absolute
  Focus, Auto
  Focus (absolute)
  Tilt (Absolute)
  Pan (Absolute)
  Exposure, Auto Priority
  Exposure (Absolute)
  Exposure, Auto
  Backlight Compensation
  White Balance Temperature
  Power Line Frequency
  White Balance Temperature, Auto

This ascii stuff is all good fun but what kind of picture quality are we talking about here?  The logitech product page boasts some features that caught my eye:

  • Full HD 1080p video capture (up to 1920 X 1080 pixels)
  • Carl Zeiss® optics with autofocus
  • Photos: Up to 10 megapixels

I lauched the gnome based Cheese webcam application and took a 2592x1944 jpeg picture of the aerogarden while freehanding the camera.  If you click on the main image in this link you can see the full resolution 451Kb result.  I plan on mounting it on a tripod and may need to fiddle with the brightness and contrast.  In terms of image quality I feel this camera isn't awesome compared to DSLR cameras or HD video cameras but its great for the price.

My general plan is to try and take a decent quality picture of a real bhut jolokia plant growing from seed at a regular interval for hopefully 6-7 months and then compile it into a few seconds of video.  I hope to repeat my previous success with the caribbean red habanero. Next up is figuring out exactly what resolution, time interval, the storage requirements that will be needed for the next 6-7 months, and aquiring real bhut jolokia seeds.  The actual picture taking will be done by some command line app and probably glued together with perl and cron.