Newsgroups: comp.soft-sys.matlab
Subject: Re: Loading video frame gets slower and slower
Date: Wed, 1 Feb 2012 17:01:02 +0000 (UTC)
Organization: The MathWorks, Inc., Natick, MA 01760
Lines: 12
Message-ID: <jgbr4e$i2o$>
References: <jgblcu$r7q$>
X-Trace: 1328115662 18520 (1 Feb 2012 17:01:02 GMT)
NNTP-Posting-Date: Wed, 1 Feb 2012 17:01:02 +0000 (UTC)
User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/2.6.32-5-amd64 (x86_64))
Xref: comp.soft-sys.matlab:756415

Hi Peter,

vision.VideoFileReader might work for you. It's designed specifically to sequentially load one frame at a time.  It's part of the Computer
Vision System Toolbox.


Peter Bone <> wrote:
> I have a for loop and I'm loading and displaying a video frame from a video file each frame using mmread. I'm not pre-loading all the frames because it runs out of memory.
> The time it takes to load the frame steadily increases as it runs. It starts out at around 1s and steadily goes up to around 2s after 100 frames.
> Why is this happening? It's not related to the frame number in the video because if I start the frame loop at frame 100 then it starts from 1s loading time again. The loops doing the same thing each frame and overwriting the previous frame so I can't see why it slows down. Any ideas?
> Is there an alternative that will let me load video into Matlab quickly without running out of memory?