Will someone help me with a script I am writing to create a video from multiple pictures
이전 댓글 표시
I am trying to make a code which will make a video from multiple pictures. I heard of Matlab about a month ago, and this is my third day in (im a noobie). I am using windows. This is what I have so far:
- vidObj = VideoWriter ('MeatLabVideoFrankenstein.mj2');
- vidObj.FrameRate = 5;
- open (vidObj);
- files = dir ('*jpg');
- for k = 1:numel(files);
- rgb = imread(files(k).name);
- currFrame = getframe (gcf);
- image (1424,2144,3);
- cmap = colormap;
- writeVideo (vidObj,currFrame);
- end
- close (vidObj);
The size of the photos I am attempting to process are 1424 pix by 2144 pix and i am trying to set this script up to process various files rather than just one file. I have no idea where I am going wrong. If anyone has any suggestions on how to get this script up and running that would be nice. If I just need to scrap my currnet approach please let me know, pref. with a suggestion of a new direction.
댓글 수: 4
Image Analyst
2013년 4월 13일
Don't number your lines and double space them. It makes it hard to copy and paste your code into MATLAB. Learn how to properly format your code here: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Curtis
2013년 4월 15일
Matt Kindig
2013년 4월 15일
Did you see my response below? Have you tried it?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Video Formats and Interfaces에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!