필터 지우기
필터 지우기

How can I change this line?

조회 수: 2 (최근 30일)
GeonWoo Jeon
GeonWoo Jeon 2017년 9월 4일
댓글: GeonWoo Jeon 2017년 9월 4일
%%displaying
load(['result\' dataName '_DECOLOR.mat'],'dataName','Mask','LowRank','tau');
moviename = ['result\' dataName,'_DECOLOR.avi']; fps = 12;
mov = avifile(moviename,'fps',fps,'compression','none');
for i = 1:size(ImData,3)
figure(1); clf;
subplot(2,2,1);
imshow(ImData(:,:,i)), axis off, colormap gray; axis off;
title('Original image','fontsize',12);
subplot(2,2,2);
imshow(LowRank(:,:,i)), axis off,colormap gray; axis off;
title('Low Rank','fontsize',12);
subplot(2,2,3);
imshow(ImData(:,:,i)), axis off,colormap gray; axis off;
hold on; contour(Mask(:,:,i),[0 0],'y','linewidth',5);
title('Segmentation','fontsize',12);
subplot(2,2,4);
imshow(ImData(:,:,i).*uint8(Mask(:,:,i))), axis off, colormap gray; axis off;
title('Foreground','fontsize',12);
mov = addframe(mov,getframe(1));
end
How can I change the line ??
mov = avifile(moviename,'fps',fps,'compression','none');
  댓글 수: 1
KSSV
KSSV 2017년 9월 4일
Change to what?

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

채택된 답변

Guillaume
Guillaume 2017년 9월 4일
avifile was deprecated in R2012a and removed in R2014b. Use VideoWriter instead. That line can probably be replaced by:
writer = VideoWriter(moviename, 'Uncompressed AVI');
writer.FrameRate = fps;
writer.open;
and the addframe line by:
writer.writeVideo(getframe(1));
once all frames are written don't forget to close the file with:
writer.close;
  댓글 수: 1
GeonWoo Jeon
GeonWoo Jeon 2017년 9월 4일
Thanks for your help!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Purple에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!