フィルターのクリア

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 Center および File ExchangeFiles and Folders についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by