How can I extract video frames without consuming a large amount of PC memory
1 view (last 30 days)
Show older comments
what is the best way to process video frames without consuming a large amount of PC memory, because I had tried to do it once the memory is full and the PC freeze.
0 Comments
Accepted Answer
Walter Roberson
on 25 May 2015
The Computer Vision System Toolkit offers tools for processing video in ways that tend to avoid filling up memory.
Beyond that, we would need to look at your code.
One thing to avoid: do not read the entire video in at the same time if you can reasonably avoid doing so. Read one frame at a time, when you need the frame, keeping only a limited number of previous frames in memory.
Another thing: if you are displaying plots as you go, make sure you delete the old graphics objects instead of just allowing them to accumulate in memory. Use calls such as cla() to clear the axes; use delete() on plot objects when you finish with them. Avoid plotting one point at a time; if you are drawing a lot of disconnected points, gather them in a scatter() object and update the 'XData' and 'YData' properties to add more points or move the existing points.
3 Comments
Walter Roberson
on 25 May 2015
I do not have any video datasets, so I would be searching Google if I needed one.
More Answers (0)
See Also
Categories
Find more on Tracking and Motion Estimation in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!