Using a camera I took snapshots and stored them into array. Code for this is:
vid1 = videoinput('winvideo',1,'RGB24_640x480');
vid2 = videoinput('winvideo',2,'RGB24_640x480');
start(vid1);
start(vid2);
preview(vid1);
preview(vid2);
pics1 = cell(1,10)
pics2 = cell(1,10)
for i = 1: 10
pause(5);
pics1{i} = getsnapshot(vid1);
pics2{i} = getsnapshot(vid1);
end
closepreview(vid1);
closepreview(vid2);
clear ('vid1');
clear ('vid2');
Now arrays are stored in pics1 and pics2 but I want to watch them as .png image and store them as .png only in other folder. how can I do that.
imwrite. - mikkola