|
From: | Jeff Miller |
Subject: | Re: Displaying an animation / "movie" |
Date: | Thu, 4 May 2006 21:59:50 -0400 |
If it's just for visualizing,
>> for i=1:100;x=shift(x,1);gsplot x;endfor;
see what you get.
As I said, you can rotate the matrix with your mouse and
get "best" viewing.
- Robert -
On Thu, 4 May 2006 07:29:34 -0400
"Jeff Miller" <address@hidden> wrote:
> Robert,
> When I do imshow on a matrix, it displays an image where
> each number in the
> matrix corresponds to the intensity (or color) of the
> pixel in the image
> with the corresponding indices (e.g. (0,0), (0,1), ...).
> So, this would
> display a square:
>
> x = [0 0 0 0 0
> 0 1 1 1 0
> 0 1 0 1 0
> 0 1 1 1 0
> 0 0 0 0 0];
> imshow(x);
>
> What I'd like to do is take a series of such matrices
> that represent moving
> objects and display them sequentially like a movie. For
> example, this would
> show that square moving downward (looping around the
> edges):
>
> for i=1:100
> x = shift(x, 1);
> imshow(x);
> end
>
>
> This works in Matlab, but I can't seem to make it work in
> Octave. I could
> probably use the approach that the other Robert mentioned
> (saving all images
> to files, making a movie from the files, then displaying
> the movie) but I'm
> hoping there's a simpler way.
>
> (By the way, I'm using this for computer vision stuff, so
> I can visualize
> what's going on...)
>
> Thanks for your help,
> Jeff
>
[Prev in Thread] | Current Thread | [Next in Thread] |