1
我在运行MATLAB这个代码,但它返回一个青色帧getsnapshot返回青色屏幕
obj = videoinput('winvideo', 1);
% Select the source to use for acquisition.
set(obj, 'SelectedSourceName', 'input1')
% View the properties for the selected video source object.
src_obj = getselectedsource(obj);
get(src_obj)
% Acquire and display a single image frame.
frame = getsnapshot(obj);
image(frame);
% Remove video input object from memory.
delete(obj);
但预览视频效果很好。
'ans = uint8 ans = 136 ans = 18' – Maysam 2012-02-20 19:51:32