Prev: Quick way to determine filetype on imread?
Next: execute script line by line in the matlab editor
From: Diego on 17 Feb 2010 19:32 Here You go, dude! .....Construct a multimedia reader object associated with file xylophone.mpg with the user tag property set to 'myreader1'. readerobj = mmreader('xylophone.mpg', 'tag', 'myreader1'); Read in all the video frames. vidFrames = read(readerobj); Find out how many frames there are. numFrames = get(readerobj, 'numberOfFrames'); Create a MATLAB movie structure from the video frames. for k = 1 : numFrames mov(k).cdata = vidFrames(:,:,:,k); mov(k).colormap = []; end Play back the movie once at the video's frame rate. movie(mov, 1, readerobj.FrameRate); There is no need to close an mmreader object, but when you are finished with it you can clear it from the workspace. clear(readerobj)...... Matlab Help
|
Pages: 1 Prev: Quick way to determine filetype on imread? Next: execute script line by line in the matlab editor |