Prev: make the image background transparent
Next: How to construct a closed B-spline curve approximation
From: Lledó Esquerra Ortells on 21 Jun 2010 21:01 I am working on Motion Detection. In order to load the mpg file I use the mmreader function and then when I try to display it, it looks like the images are plotted three times in each frame. I do not know the reason, maybe I'm wrongly using the function or maybe it's because I've to use another function in order to load the mpg files. Can anyone suggest me how to proceed? Here is my code: obj=mmreader(video); nFrames=obj.NumberOfFrames vidHeight=obj.Height vidWidth=obj.Width mov(1:nFrames)=struct('cdata', zeros(vidHeight,vidWidth, 3, 'uint8'), 'colormap', []); for k=1:nFrames mov(k).cdata=read(obj,k); mov(k).colormap=[]; end movie(mov,1,obj.FrameRate) %imshow(mov(1).cdata) thank you
|
Pages: 1 Prev: make the image background transparent Next: How to construct a closed B-spline curve approximation |