필터 지우기
필터 지우기

Out of memory problem

조회 수: 1 (최근 30일)
Pan
Pan 2012년 2월 12일
clear all
mov = aviread('book.avi');
xy=zeros(size(mov(1).cdata));
for i=1:196
figure(10)
xy(:,:,:,i)=mov(i).cdata;
imshow(uint8(xy(:,:,:,i)));
end
save book xy
when I read the file code,matlab will show this message
??? Out of memory. Type HELP MEMORY for your options.
Error in ==> framebook at 9
xy(:,:,:,i)=mov(i).cdata;

채택된 답변

Walter Roberson
Walter Roberson 2012년 2월 12일
You can try using
xy=zeros([size(mov(1).cdata),length(mov)], 'uint8');
and change your imshow line to
imshow(xy(:,:,:,i));
Do not be surprised if this runs out of memory. Not matter how much memory you have, there will always be a movie large enough that you cannot make two fully-decompressed copies of it in memory.
What is it that you are going to do with your xy array? Is it certain that you cannot do the processing on the mov structure instead ?
  댓글 수: 1
Pan
Pan 2012년 2월 13일
Thank!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Files and Folders에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by