MATLAB: Does the axis background color appear gray instead of white in the generated AVI file in MATLAB 7.2 (R2006a)

avibackgroundcolorcompressionMATLAB

I am using the AVIFILE function to generate an AVI file using GETFRAME/ ADDFRAME commands. When the MATLAB figure window pops up, the axis background appears to be white as expected but the same turns gray in the generated AVI file.

Best Answer

The change in the axis background color occurs due to the compression codec setting used in the AVI file generation. For the AVIFILE function, the default compression codec setting used is 'Indeo5' for Windows and 'None' for UNIX.
To change the appearance of the axis background color in the generated AVI file, change the compression code setting to 'Indeo3' or 'None' for Windows.
This can be done be changing the 'compression' parameter value using the following syntax for calling AVIFILE
aviobj = avifile(filename, 'Param1', Val1, 'Param2', Val2,...)