MATLAB keeps running out of memory during video processing (Stereo vision)

조회 수: 5 (최근 30일)
Swapnil Sayan Saha
Swapnil Sayan Saha 2019년 10월 22일
답변: Sai Bhargav Avula 2019년 10월 25일
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."

답변 (1개)

Sai Bhargav Avula
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 !

카테고리

Help CenterFile Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by