MATLAB: Does MOVIE invert the image when playing back a movie containing indexed images generated by IMMOVIE in MATLAB 7.0.1 (R14SP1)

flipimageImage Processing Toolboximmovieinvertmovier14sp1

In MATLAB 7.0.1 (R14SP1), all movie frames created manually from indexed images (by assigning directly to the cdata and colormap fields) or created using IM2FRAME are inverted when played back.
The following example shows how to reproduce this problem. The example loads an indexed image and uses IMMOVIE to generate a movie. When displayed, using MOVIE, the images are flipped.
load cape;
figure;
mov=immovie(X, map);
movie(mov,10);
The same procedure worked fine in MATLAB 7.0 (R14).

Best Answer

This has been verified as a bug in MATLAB 7.0.1 (R14SP1).This issue has been forwarded to our development team, and is currently being investigated.
As a workaround, use FLIPUD on the indexed image before making the movie, as shown in the following example.
load cape;
X2 = flipud (X);
figure;mov=immovie(X2, map);
movie(mov,10);