I am running the following code in Matlab
myVid = VideoReader('Video_0127_2014.mov');
nFrames = myVid.NumberOfFrames;
height = myVid.height;
width = myVid.width;
mov(1:nFrames) = struct ('cdata', zeros(height, width, 3, 'uint8'), 'colormap', []);
% for k = 1 : nFrames
% mov(k).cdata = read(myVid, k);
% end;
mov(1).cdata = read(myVid, 1); //trying to diagnose the problem
myGraphic = figure;
set(myGraphic, 'position', [150 150 width height]);
movie(myGraphic, mov, 1, myVid.FrameRate);
and am getting the error
Error using movie (line 41)
Java exception occurred:
java.lang.OutOfMemoryError: Java heap space
Heres the thing though. I have increased my heap to the maximum level (around 2gb) and the video I am loading is around 120mb. As I see it there is no way that I am maxing out the heap. I have copied my code nearly verbatim from here. Is the approach that I am taking just not right? I need to be able to load this video into matlab so that I can go through it frame by frame (preferably by manipulating the frame rate).
Thanks in advance