Posts Tagged ‘openFrameworks’

Evaluation of Logitech C910 webcam for Computer Vision use

Friday, April 1st, 2011

I’ve recently been using a pair of PlayStation 3 Eye’s for reading structured light patterns projected onto objects. These particular cameras have had a lot of attention from hackers due to their value/performance.

The PS3Eye is a camera built for machine vision, and can provide ‘lossless’ 640×480 RGB frames at 60 frames per second with low latency, and is therefore particularly relevant for realtime tracking applications (e.g. multi-touch, 3-phase scanning). For OSX there is Maccam driver, and for Windows there is the fully featured CLEye driver from Alexp which supports programatic control of multiple cameras with full support for all camera features and also gives camera identity (through a GUID), and is free for 1 or 2 cameras per system.

But for a recent project, it became apparent that I needed resolution rather than framerate. My first instinct was to move to DSLR’s, and I began working with developing a libgphoto2 extension for openFrameworks called ofxDSLR. This route had the following issues:

  • Relatively expensive (compact cameras do not support remote capture, meaning I would have to use DSLR’s, with the cheapest compatible options at around £350 with lens – Canon 1000D+18-55mm lens)
  • Requires external power supply / recharging
  • Heavier than machine vision cameras
  • Flaky libraries (libghoto2 isn’t really built with CV in mind, and I found it was taking a lot of time to get results. And lack of solutions for Windows)
  • Slow capture (several seconds between send capture command and receive full result)

A DSLR offers:

  • Fantastic resolution
  • Great optics
  • Programmatic control of ISO, Focus, Shutter, Aperture
  • More than 8bits per colour

Due to the above issues, I decided to explore other options. This led me to the Logitech C910 which supports continuous capture at roughly 20x as many pixels as the PS3eye but at 1/120th of the frame rate.

Without further ado, here’s the video documentation (I recommend you chose either 720p or 1080p for viewing).

YouTube Preview Image




  • UVC device (capture supported on all major desktop OS’s)
  • As of 1st April 2011, there is no way to programatically control the C910 from OSX, but this is likely to come soon (see here and here)
  • Programatic control from Windows through DirectShow. I recommend Theo Watson’s videoInput class for c++, which is included with openFrameworks or available as standalone.
  • I haven’t yet seen a way to uniquely identify a camera (Each PS3Eye can report its GUID identity, which is useful for recognising individual cameras in a multicam system)

Compression options

  • YUY2 (YUV 4:2:2) = lossless luminance, half resolution colour
  • MJPG = lossy, but higher frame rates supported than YUY2, since lower bandwidth required.

Programatic control of

  • Motorised focus
  • Shutter speed (aka exposure)
  • Gain (aka brightness)
  • ‘Hacky’ Region of Interest {ROI} (through digital Zoom, Pan, Tilt)


  • ~12 discrete focus steps (i.e. focus control is NOT continuous)
  • Furthest focus point is ~70cm, beyond this is classed as ‘infinity’
  • With sharpening turned off (i.e. getting more of the ‘raw’ image), we see a general lack of focus on surfaces other than at discrete steps
  • Closest macro focus at 3.5cm

Focus table [control value 0-255 / distance (cm)]

  • 255 / 3.5
  • 238 / 3.8
  • 221 / 4
  • 204 / 4.3
  • 187 / 5.3
  • 170 / 6.4
  • 153 / 8
  • 136 / 10.5
  • 119 / 15
  • 102 / 25
  • 85 / 40
  • 68 / 51

See also

openFrameworks <3’s VVVV

Monday, November 29th, 2010
YouTube Preview Image

Sharing graphics assets between openFrameworks and VVVV using shared memory.

Should also be possible to share DirectShow Video assets from VVVV back to openFrameworks using the same method.

Proof of concept code available at as ofxSharedMemory