Thread Subject: Creating a video help

Subject: Creating a video help

From: Jimmy

Date: 13 Mar, 2010 18:50:22

Message: 1 of 2

    Hi everyone,
I'm trying to create a video from a set of images. I've tried different codes but it doesn't seem that any of them is working very well. Has anyone already done that and can help me? Here is the last code that I use, it is creating a video but after that it doesn't run smooth, I mean it jumps over the images at a certain points and I don't what it is related to. Here it is:

fileFolder = fullfile('C:\Users\Dimitar\Documents\MATLAB\Plot');
path=fullfile(fileFolder,'data*.tif');
dirOutput = dir(path);
fileNames ={dirOutput.name};
numFrames = numel(fileNames);
I = imread(fullfile(fileFolder,fileNames{+1}));
rmax=size(I,1);
cmax=size(I,2);


sequence = zeros([size(I,1) size(I,2) 3 numFrames], class(I));

% load in array

for p = 1:numFrames
  sequence(:,:,:,p) = imread(fullfile(fileFolder,fileNames{p}));
end


mov = avifile('test.avi','Compression','None','fps',8);

for j=1:size(sequence,4)
    imshow(sequence(:,:,:,j));
    f=getframe;
    mov = addframe(mov, f);
end

mov = close(mov);
close all;

 Please let me know if any of you has already solved that.
 
       Thank you
        Jimmy

Subject: Creating a video help

From: Jimmy

Date: 14 Mar, 2010 12:34:05

Message: 2 of 2

   Has any of you done this before?

       Thank you

        Jimmy

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com