I have a Logitech QuickCam Orbit AF (Model: V-UCC22) try to control the pan and tilt in Matlab. I try to use the following code to do so but it doesn't work:
vid = videoinput('winvideo',1);
src = getselectedsource(vid);
src.pan = 30;
src.tilt = 30;
The values of src.pan and src.tilt change but not the logitech camera.
I am using Windows 7, Matlab R2009b and logitech driver version 12.10.1110.0. Do I need to install additional programs to make the pan and tilt in Matlab work?
Thanks,
Edward
Thanks for your reply. However, the camera I have is using mechanical pan/tilt, not digital one. Therefore, it doesn't matter if I zoom or not for controlling the mechanical pan/tilt.
"Adrian " <em...@not.provided> wrote in message <i44aur$311$1...@fred.mathworks.com>...
info = imaqhwinfo('winvideo');
% note: for the SupportedFormat field, you may have many options to choose from
% but certainly, you will have at least 1, therefore this code will give you the
% first supported image format
vidobj = videoinput('winvideo', 1, info.DeviceInfo(1,1).SupportedFormats{1});
selectedsrc = getselectedsource(vidobj);
get(selectedsrc)
for my camera, I see the following:
General Settings:
Parent = [1x1 videoinput]
Selected = on
SourceName = input1
Tag =
Type = videosource
Device Specific Properties:
BacklightCompensation = on
Brightness = 128
Contrast = 32
Exposure = -6
ExposureMode = auto
FrameRate = 30.0000
Gain = 0
Saturation = 32
Sharpness = 48
WhiteBalance = 4000
WhiteBalanceMode = auto
Setting these properties allows you to control the camera. It may be that you have acess to pan and tilt video source properties this way.
For example, to get the current gain setting you can then use:
get(selectedsrc, 'Gain');
or to set the gain setting to a 'valid' value you could use:
set(selectedsrc, 'Gain', 0);