AberCam Upgrade 2 – Focus

Had the problem that AberCam’s webcam with its autofocus kept focusing on the dirty window that it was sat behind, so had a look to see if it was possible to stop the webcam autofocusing, and stumbled upon this great tool called¬†uvcdynctrl. Downloadable here (or for the pi, use apt-get install uvcdynctrl), and there are some examples and a list of functions and explanations here.

With uvcdynctrl, you can stop the camera autofocusing (uvcdynctrl -d /dev/video0 [if its the only camera - video zero] -s [set] “Focus, Auto” [param] 0 [value - zero in this case].

A good idea is to -g [param] before you set it, so you know what the parameter was set to before you changed it. Also you can -S (capital S) and save a backup of the config file.

Another feature is being able to edit the zoom! e.g: uvcdynctrl -s “Focus (absolute)” 3 [try values 1-5 inclusive].

Also just found a great feature – uvcdynctrl -vc (verbose list of controls – tells you the bounds and step sizes for each param!)

Currently playing with the pan and tilt (e.g of a zoomed in image, my camera doesn’t physically move), managed to get them to each set once, but once attempted to be set, each defaults to the value 36000 and won’t move again. Looks like it could be to do with the webcam driver – oh well, not essential.

Looking at buying a little wind speed sensor to compliment AberCam’s temperature sensor!

AberCam’s focused view:

abercam view