From: queen f on
Yaroslav Bulatov <yaroslavvb(a)gmail.com> wrote in message <e4a98e21-a364-4ace-8520-7470215f2aa5(a)u20g2000prg.googlegroups.com>...
> On Aug 18, 1:16 pm, Robbie Plankenhorn <rplankenh...(a)gmail.com> wrote:
> > I am trying to read in a wmv file or an avi file, then perform image
> > analysis on each frame and output the result to an avi file.  I have
> > successfully read in the wmv file using mmreader and then redirected
> > the output to an avi file.  I have not been able to convert the frames
> > to a workable image file.
> >
> > Here is what I have so far:
> >
> > aviobj = avifile('Test.avi','fps',30,'compression','Cinepak');
> > vidObj = mmreader('Untitled_0000.wmv');
> > vidFrames = read(vidObj, [1 1000]);
> > for k=1:1000
> > mov.cdata = vidFrames(:,:,:,k);
> > img = image(mov.cdata);  //Doesn't work correctly
> > mov.cdata = image(tImg,'CDataMapping');
> > mov.colormap = [];
> > aviobj = addframe(aviobj,tImg);
> > end
> > aviobj = close(aviobj);
> >
> > When I call image(mov.cdata), the image is a lot smaller than the
> > actual size of the video.  Is there a better way to convert the video
> > frames to images so that I can do thresholding and k means processing
> > on these images?
> >
> > Thanks,
> > Robbie
>
> I had a similar problem, ended up using mplayer on Ubuntu to split the
> file --
> mplayer -vo jpeg ../DSC_2133.AVI


Hi, I am doing same project, please if you got the correct code,
paste it for me here
thank you