MATLAB keeps running out of memory during video processing (Stereo vision)
2 次查看(过去 30 天)
显示 更早的评论
I am trying to do depth estimation from stereo video.
I have two stereo videos (each of size 6 MB only and in mp4 format).
When I run the code (very similar to the depth estimation code provided by MATLAB in this tutorial: https://www.mathworks.com/help/vision/examples/depth-estimation-from-stereo-video.html), MATLAB runs out of memory (I have 16 GB of RAM and MATLAB uses almost 100% of it).
Also I get the following error: "The rectified images do not have enough common rectangle region. Switch to 'full' output view instead."
0 个评论
回答(1 个)
Sai Bhargav Avula
2019-10-25
Hi,
By default, MATLAB can use up to 100% of the RAM (not including virtual memory) of your computer to allocate memory for arrays, and if an array would exceed that threshold, then MATLAB returns an error.
You can follow the below link to resolve "Out of Memory" Errors.
Coming to the rectified image error,
By default, rectifyStereoImages crops the output images to only contain the overlap between the two frames. In this case the overlap is very small compared to the disparity.
You can try the following to resolve the issue.
[frameLeftRect, frameRightRect] = rectifyStereoImages(frameLeft, frameRight, stereoParams, 'OutputView', 'Full');
Hope this helps !
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!