>> info=imaqhwinfo
info =
InstalledAdaptors: {'winvideo'}
MATLABVersion: '7.0 (R14)'
ToolboxName: 'Image Acquisition Toolbox'
ToolboxVersion: '1.5 (R14)'
>> win_info=imaqhwinfo('winvideo')%
win_info =
AdaptorDllName: [1x60 char]
AdaptorDllVersion: '1.5 (R14)'
AdaptorName: 'winvideo'
DeviceIDs: {[1]}
DeviceInfo: [1x1 struct]
>> win_info.DeviceIDs
ans =
[1]
>> dev_win_info=win_info.DeviceInfo
dev_win_info =
DefaultFormat: 'YUY2_640x480'
DeviceFileSupported: 0
DeviceName: 'Vimicro USB2.0 UVC PC Camera'
DeviceID: 1
ObjectConstructor: 'videoinput('winvideo', 1)'
SupportedFormats: {1x5 cell}
>> dev_win_info.SupportedFormats%
ans =
Columns 1 through 4
'YUY2_640x480' 'YUY2_352x288' 'YUY2_320x240' 'YUY2_176x144'
Column 5
'YUY2_160x120'
>> obj = videoinput('winvideo',1,'YUY2_320x240')%
Summary of Video Input Object Using 'Vimicro USB2.0 UVC PC Camera'.
Acquisition Source(s): input1 is available.
Acquisition Parameters: 'input1' is the current selected source.
10 frames per trigger using the selected source.
'YUY2_320x240' video data to be logged upon START.
Grabbing first of every 1 frame(s).
Log data to 'memory' on trigger.
Trigger Parameters: 1 'immediate' trigger(s) on START.
Status: Waiting for START.
0 frames acquired since starting.
0 frames available for GETDATA.
>> vidRes = get(obj, 'VideoResolution');
nBands = get(obj, 'NumberOfBands');
figure()%
axes()%
hImage = image( zeros(vidRes(2), vidRes(1), nBands) );
preview(obj, hImage);
??? Error using ==> imaqdevice.preview
Too many input arguments.
>> 咋么办?