From: Benjamin on
"Mike " <michaelzenhill(a)hotmail.com> wrote in message <ffqhcq$i9u$1(a)fred.mathworks.com>...
> "Marc Ettlinger" <marce(a)berkeley.edu> wrote in message
> <f8l8p5$23f$1(a)fred.mathworks.com>...
> > "Marc Ettlinger" <marce(a)berkeley.edu> wrote in message
> <f8k8lf$cu$1(a)fred.mathworks.com>...
> > > I'm trying to convert a MATLAB movie to an AVI file and
> I'm getting some very odd errors.
> > >
> > > When I use the following code:
> > >
> > > for cycle_count=1:sParm.cycles
> > >
> > > fTalk;
> > > fAge;
> > >
> > > if (mod(cycle_count,plot_cycle) == 0)
> > > fPlot;
> > > end
> > > F(cycle_count) = getframe;
> > > end
> > > movie2avi(F, 'test1');
> > > end
> > >
> > > I get a movie that has a weird color problem with the
> moving bar graphs in the movie ending up black (when they
> should be color) and random diagonal streaks of color
> throughout the movie.
> > >
> > > When I change "getframe" to "getframe(gcf);" if there
> are few enough cycles, everything works fine but when I
> increase the number of cycles to what I need, I get this error:
> > >
> > > "The minimum frame size for the Indeo compressor is 32x32"
> > >
> > > I can include more code if need be - but the plot
> function is a tad messy - or I can even send the movie which
> is quite a sight.
> > >
> > > Any help is appreciated.
> > > Thanks in advance
> > >
> >
> > A slight update:
> > There's a difference in the results depending on whether I
> either have the get frame inside or outside the plot loop.
> >
> > This works:
> >
> > if (mod(cycle_count,plot_cycle) == 0)
> > fPlot;
> > end
> > F(cycle_count) = getframe(gcf);
> >
> > This doesn't:
> > if (mod(cycle_count,plot_cycle) == 0)
> > fPlot;
> > F(cycle_count) = getframe(gcf);
> > end
> >
> > but I don't understand why and unfortunately, having the
> getframe in the loop makes it crash for the number of
> cycles I need.
> >
>
> I am getting the indeo compressor problem as well, using the
> m(i) = getframe(gcf)
>
> Anyone with some help on this would be appreciated. It's an
> issue only when I try subplot frames instead of single plot
> frames.
>
> Mike
>

Mike,
I too have this problem with subplots, but even deleting the subplots and plotting a single frame still leaves me with diagonal streaks of color over the .avi file
 | 
Pages: 1
Prev: Matlab source code
Next: Hough Transform