% function camera
vid = videoinput('winvideo',1, 'YUY2_1920x1080');
set(vid,'ReturnedColorSpace','rgb');
preview(vid);
tic;
i = 1;
while 1
frame = getsnapshot(vid);
imshow(frame);
imwrite(frame,strcat(num2str(i),'.jpg'),'jpg');
i = i+1;
if i >= 101
break;
end
end
toc;
matlab调用摄像头并保存成帧的形式
最新推荐文章于 2021-03-17 14:49:57 发布