close all;clc ;
ng=31;
for jj=2:22
ind0=sprintf('%d',jj-1);
I = imread(['plot' ind0 '.' 'png']);
se = strel('diamond',1);
disp(ind0);
[X,Map] = rgb2ind(I,256);
if jj==1
imwrite(X, Map, 'd:\test.gif', 'GIF', 'WriteMode', 'overwrite',
'DelayTime',2, 'LoopCount',inf );
else
end
I = imerode(I,se);
[X,Map] = rgb2ind(I,256);
imwrite(X,Map,'d:\test.gif','GIF','WriteMode','append','DelayTime',0.1);
end
disp('done');
一开始我使用一堆png档图,但是不过是重换了图,仍同是png,却无法执行
恳请点出我的盲点,谢谢~~~