I get a new picture from my camera every 100ms. I want to store some frames to understand what happens before and after an event.
How can I implement a buffer that continuously saves the last 30 pictures?
The last lines of code shows what I want to do.
Any help with the saving of frames after the trigger event is also appreciated, but I think I can do it.
I = videoinput('winvideo', 2, 'YUY2_1280x720');
I.ReturnedColorspace = 'rgb';
I = getsnapshot(I);
vid.ROIPosition = [585 400 648 313];
I = imresize(I,frameSize);
I = imadjust(I,[low high]);