I am trying to save frames from live stream after each 5 seconds duration and save the frames as an image into the folder. Kindly tell me how to define the n number of frames of live stream cam here?
Please help me to solve this problem.
Folder = 'OUTPUT\';
vid = videoinput('winvideo', 1);
for iframe = 1
frames = getsnapshot(vid);
imwrite(frames, fullfile(Folder, sprintf('%06d.jpg', iframe)));