Tuesday, January 22, 2013
LifeCam HD-6000 autofocus fix, Raspberry Pi
Posted by Michael Shimniok
The Microsoft Lifecam HD-6000 autofocus is notoriously annoying. It refocuses unnecessarily sometimes every few seconds making the camera nearly unusable. Here's the workaround on Raspbian (Debian) for the Raspberry Pi.
The best workaround is to disable autofocus. You'd think this would just make the camera blurry all the time, but it doesn't. The camera's depth of field keeps the image in focus over a wide range of distances without autofocus. I've tested ranges from 18" to infinity and everything is sharp and clear.
Since this camera is UVC-compliant (USB Video Class), on Raspbian disabling autofocus is done with a command that interacts with the UVC driver, uvcdynctrl.
My version of Wheezy didn't have this tool installed so I issued:
sudo apt-get install uvcdynctrl
With the software installed, I listed the configurable items on the camera:
$ uvcdynctrl -c
Listing available controls for device video0:
White Balance Temperature, Auto
Power Line Frequency
White Balance Temperature
Then, I disabled autofocus.
$ uvcdynctrl --set='Focus, Auto' 0
And that's it, no more annoying autofocus. I'll be able to use this tiny, attractive little webcam for my RPi Telepresence robot.