Skip to content
Snippets Groups Projects
Commit d0cbfa54 authored by ac's avatar ac
Browse files

avi2mp4

parent aa2f6d38
No related branches found
No related tags found
No related merge requests found
target = 'metricEmbeddings.tif';
outfile = ['RSF.mp4'];
set(figure(1),'units','normalized','outerposition',[0 0 1 1])
nFrames = length(imfinfo(target));
sliceThickness = 100;
v = VideoWriter(outfile,"MPEG-4");
v.Quality=100;
v.open()
for Z = 1:nFrames
im = imread(target,Z);
clf
imagesc(im)
hold on;set(gca,'XTick',[],'YTick',[]);axis equal
xlim([1,size(im,2)])
ylim([1,size(im,1)])
text(10,10,['Z = ' num2str(Z) ':' num2str(Z+2*sliceThickness)],'FontSize',10,'Color','w')
text(200-5,10,['denoised input'],'FontSize',10,'Color','w','HorizontalAlignment','right')
text(400-5,10,['bright blob (5\mum)'],'FontSize',10,'Color','w','HorizontalAlignment','right')
text(600-5,10,['dark tube maxima'],'FontSize',10,'Color','w','HorizontalAlignment','right')
text(200-5,210,['input image'],'FontSize',10,'Color','w','HorizontalAlignment','right')
text(400-5,210,['dark blob (5\mum)'],'FontSize',10,'Color','w','HorizontalAlignment','right')
text(600-5,210,['dark tube'],'FontSize',10,'Color','w','HorizontalAlignment','right')
drawnow
f = getframe(gca);
v.writeVideo(f)
end
close(v)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment