フィルターのクリア

how to create avi from a sequence of .tif uint16

5 ビュー (過去 30 日間)
Tossawon Ngamnet
Tossawon Ngamnet 2018 年 5 月 28 日
回答済み: Image Analyst 2018 年 5 月 28 日
Im newbie for matlab, please suggest: code below
files = dir('*.tif') ; N = length(files) ; % create the video writer with 1 fps writerObj = VideoWriter('myVideo.avi'); writerObj.FrameRate = 30; % open the video writer open(writerObj); for i = 1:N S = load(files(i).name) ; % let A be the data stored in .mat file imshow(S) drawnow % write the frames to the video F = getframe(gcf) ; writeVideo(writerObj, F); end % close the writer object close(writerObj); fprintf('Sucessfully generated the video\n')

回答 (1 件)

Image Analyst
Image Analyst 2018 年 5 月 28 日
I'd probably do
fullFileName = fullfile(files(i).folder, files(i).name)
rgbImage = uint8(imread(fullFilename));
But the rest might work. If it doesn't, see my attached demo.

製品

Community Treasure Hunt

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

Start Hunting!

Translated by