imstream (Scripts) Publisher's description
from Oliver Woodford
If you work with streams of images which can come from either a video or a sequence of image files
If you work with streams of images which can come from either a video or a sequence of image files, then you can use this wrapper so that your code doesn't care which type of stream you are using. The syntax is similar to MATLAB's VideoReader class, with a few minor differences:
- The read method can only read in a frame at a time.
- Subscript referencing can also be used to access frames.
- The last N frames used can be cached, to improve access speeds for certain applications. N is defined by the user (default: 1).
Here is an example which processes 3 frames at a time:
ims = imstream('input.000.png', 3); % Cache last 3 frames used
n = get(ims, 'NumberOfFrames');
for a = 2:n-1
A = cat(4, ims(a-1), ims(a), ims(a+1));
% Process the frame triplet
System Requirements:MATLAB 7.13 (2011b)
Program Release Status: New Release
Program Install Support: Install and Uninstall