Why am I getting 'Out of Memory' error?

2 次查看(过去 30 天)
I am using MATLAB R2016b.
My laptop is a 64-bit 8 GB RAM machine.
I am trying to rectify 2 RGB images. (Size: 400x300x3)
The following is my code:
%Load stereo parameters
load('params.mat');
%Read the images
I1 = imread('gLeft.jpg');
I2 = imread('gRight.jpg');
%Convert to grayscale
I1=rgb2gray(I1);
I2=rgb2gray(I2);
%Rectify stereo images
[J1, J2] = rectifyStereoImages(I1, I2, stereoParams);
The error I obtain is:
Error using horzcat
Out of memory. Type HELP MEMORY for your options.
When I type memory in the command window, I obtain:
Maximum possible array: 9234 MB (9.682e+09 bytes) *
Memory available for all arrays: 9234 MB (9.682e+09 bytes) *
Memory used by MATLAB: 1228 MB (1.288e+09 bytes)
Physical Memory (RAM): 7914 MB (8.299e+09 bytes)
  3 个评论
Walter Roberson
Walter Roberson 2017-2-28
You have not said anything about how big the images are.
Trishia Chemaly
Trishia Chemaly 2017-2-28
-The images are originally RGB 400x300x3. I am converting them to grayscale so the size would be 400x300. -'params.mat' contains the stereo parameters of the 2 cameras

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Camera Calibration 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by