|
Nathan,
Since the files are so large I would recommend changing your algorithm
to work on single frames or a set of frames. You can then use
mmreader's read function in a loop:
readerobj = mmreader('cam1.avi');
for ii=1:readerobj.NumberOfFrames
% read in a single frame
currentFrame = read(readerobj, ii);
% Insert algorithm here
end
-Nick
Nathan wrote:
> Hello. I need to extract all of the fames from a very large AVI file in order to do analysis. The largest video is 8 GB. I have been unable to extract the frames because the computer runs out of memory. I have been able to do 1 GB videos, however. I use
> the mmreader function and create an array of the entire video as shown below. Is there a better way to do this?
>
> This is the beginning of my program, I then use vidFrames and take each image array from it one by one.
>
> readerobj = mmreader('cam1.avi');
> % Read in all video frames.
> vidFrames = read(readerobj);
>
> % Get the number of frames.
> numFrames = get(readerobj, 'numberOfFrames');
|