Skip to content

Instantly share code, notes, and snippets.

@drhirsch
Created September 2, 2016 05:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drhirsch/5c18b975f60b739274cc4a54d39df469 to your computer and use it in GitHub Desktop.
Save drhirsch/5c18b975f60b739274cc4a54d39df469 to your computer and use it in GitHub Desktop.
make a lossless motion jpeg 2000 video with matlab
v = VideoWriter('test.mj2','Motion JPEG 2000');
v.LosslessCompression = true; v.FrameRate=5;
open(v)
f=figure; title('line'), ylabel('amplitude'),xlabel('index')
pause(0.2) %let plot wake up
for i=1:.05:3;
line(0:.01:1,(0:.01:1).^i)
im = getframe(f);
writeVideo(v,im)
end
close(v)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment