function playMovie(filename)
obj = mmreader(filename);
vidFrames = read(obj);
numFrames = get(obj, 'numberOfFrames');
% reading each frame
for k=1:numFrames
img(k).cdata = vidFrames(:,:,:,k);
img(k).colormap = [];
end
% Playing the movie
movie(img, obj.FrameRate);
% displying a move frame
%f = fix(numFrames/2);
%imagesc(img(f).cdata);
for m=1:numFrames
z=img(m).cdata-img(m+1).cdata;
z(numFrames)
end
end
Hello guys, this code hopefully will subtract the image from the previous one. This code gives an error at the very beginning, while the function suppose the ask me a video file it gives an error. I could not understand why.Thank you for help
Edited by WingedPanther, 30 March 2009 - 03:12 AM.
add code tags (the # button)


Sign In
Create Account

Back to top









