% clc
% clear all
% close all
i=1;
obj=videoinput('winvideo',
1,'YUY2_320x240');
set(obj,
'SelectedSourceName', 'input1','ReturnedColorSpace','rgb')
src_obj =
getselectedsource(obj);
get(src_obj)
preview(obj);
% while i<5
pause(3)
frame = getsnapshot(obj);
imwrite(frame,strcat('input',num2str(i),'.jpg'));
%
imwrite(frame,'input1.jpg')
%
figure,imshow(frame)
i=i+1;
% end
% image(frame);
delete(obj);
No comments:
Post a Comment