Geeks making the world a bit better.

CamKeys is a simple camera-based alternative keyboard

People with severely impaired movement often use one or two switches to control their computers and/or communication devices. Even though the switch is arguably the simplest electrical component, when it becomes an assistive technology it is likely to cost the end user hundred’s of dollars. On the other hand, a fantastically complex electronic device, the USB camera, is available at discount stores for a few dollars. CamKeys is a simple python program that makes a cheap camera emulate any number of switches. It simply generates key events when user-specified regions of the camera image change.

CamKeys was developed by UNC undergraduate student Arthur Greenside using python, wxPython, and CVtypes a ctypes-based wrapper for OpenCV. This project was supported by a grant from the Mozilla foundation.

CamKeys is simple to use. Start it up and point the camera at a background with some visual texture. We’ve used tablecloths, printed images, and wood grain successfully. Just about anything other than a featureless field will work fine. Now press the left mouse button and stretch out a small rectangle in the image. When you release the mouse button, a dialog will popup asking for a key to type that box. Repeat for each different virtual button you’d like to create. Now click on some other window to give it keyboard focus. When your hand (or anything) enters one of the watch boxes you’ll see the box outline change from green to blue and the key you entered will be virtually pressed. When you leave the watch box the key will be released. You can save and restore configurations using the menus. You can also enable a click sound on key activation.

Since CamKeys generates what look like key presses it can be used with any software that responds to key events. Later, we’ll add a direct path to communicate with Jambu enabling switch users to type on Steve Lee’s alternative keyboard. For now, we’re using it control Daniel Parker’s Tar Heel Typer to provide an alternative pencil to kids learning to write.

For now CamKeys is available only as source code you can download from cvs on SourceForge. It is known to work on Windows and Ubuntu with cameras from Logitech. I expect it to work on others OS’s and with other cameras. After I get past Maze Day on December 6th, I’ll make a proper installer.

As of 18 November 2007, CamKeys has several known limitations:

  • It doesn’t properly handle keys that require 2 events such as pressing shift then A to get a capital A
  • On Windows the OpenCV camera input seems limited to about 15 frames per second. On Linux, I have to use setpwc -f 30 to get my Logictech Pro 4000 to go at 30Hz otherwise it is limited to 10 FPS. My Logitech Pro 5000 seems to ignore our request for a small image.
  • Press and release are currently tied to entering and leaving the watch box. For some users it might be better to allow a single press and release when the box is entered.
  • We don’t yet have provisions for controlling the mouse.
  • CamKeys is a weak name. I hate naming things.

11 comments

#1 Mozilla Foundation grants and related expenditures for 2007 · Get Latest Mozilla Firefox Browsers on 11.19.07 at 4:44 pm

[...] Research into enabling commodity webcams to be used as simple switch input devices (e.g., by tracking users’ head or hand movements), for example in conjunction with software like Jambu (University of North Carolina). For more information see Gary Bishop’s blog post on CamKey. [...]

#2 Ernestas on 11.21.07 at 4:38 pm

Do you have any (video/youtube/…) demo regarding this tool ?

#3 gb on 11.21.07 at 4:40 pm

Not yet but that is a good idea. After Maze Day, I’ll put something up.

#4 Ricky Buchanan on 12.19.07 at 4:51 am

I tried to get this working on Mac OS X but couldn’t – not sure if it’s my totally non-existent Python ability or because of the different way cameras are handled.

Anyway, I came across EvoCam today -http://www.evological.com/evocam.html

It’s not free but it’s only US$25 with a 15 day free demo period so it’s not hugely expensive either. And it lets you set unlimited “motion sensitive” areas on the picture and (I think) fire off applescripts when it finds motion, and with AppleScripts you can emulate keys being pressed trivially.

I hope you don’t mind me leaving these links to non-free resources in your coments, Gary? I just want people to know about *affordable* access tech alternatives where they exist, especially for those people who don’t have the tech ability to hack up the wonderful open source stuff you write about.

Ricky Buchanan
ATMac – http://atmac.org/ – Assistive Technology for Mac OS X Users

#5 Geld Lenen on 12.19.07 at 3:40 pm

Anybody having more experiences with EvoCam? I now have a 15 day trial, pretty impressive program!

GL
http://geld-lenen.welij.nl

The Netherlands

#6 gb on 12.19.07 at 3:43 pm

I haven’t seen it. Thanks for the pointer.

#7 geld lenen on 03.10.08 at 1:58 pm

Somebody other experiences yet?
I just installed another trail version on my clean laptop (that is why I came here back haha) and look for some other experiences. Still doubting to buy :)

Best regards,

GL
http://www.lening-geld-lenen.nl

The Netherlands

#8 Nu geld lenen on 05.01.08 at 10:02 am

Thanks for the article, would love to read some more personal reactions from people with experience with CamKeys though.

#9 Mozilla Foundation grants and related expenditures for 2007 « Frank Hecker on 05.28.08 at 5:11 pm

[...] Research into enabling commodity webcams to be used as simple switch input devices (e.g., by tracking users’ head or hand movements), for example in conjunction with software like Jambu (University of North Carolina). For more information see Gary Bishop’s blog post on CamKey. [...]

#10 atool enables DDR pad or webcam input — Gary Bishop on 06.12.08 at 8:47 am

[...] is an extension to our previous CamKeys project. Like CamKeys, atool allows keyboard input based on a cheap webcam. Atool adds DDR pads (or [...]

#11 Niall Brown on 05.01.09 at 11:46 am

Hey Gary, Love what you are doing here. I run a couple of other geeky tech projects for individuals who have disabilities called creativeexpressionsweb.ca for mobility related communication issues and deafblindresources.ca for tech and strategies related to accessing information for those with combined vision and hearing loss. I really think CamKeys is a vitally important tool but as only a basic Windows/Ubuntu user I’m unsure how to get it up and running from source. Has there been any progress towards an installer for either OS? Keep up the amazing work! All of your work is really exciting.

Leave a Comment