Graphics |
Additional Techniques for Fast Image Updating
To increase the rate at which MATLAB can update the CData
property of an image object you can optimize CData
and set some related figure and axes properties:
uint8
datatype for your image will be faster than using a double
datatype.
CData
property includes copying the matrix for the image's use. The overall size of the matrix is dependent on the size of its individual elements. Using smaller individual elements (i.e., a smaller datatype) decreases matrix size,and reduces the amount of time needed to copy the matrix.
CData
matrix.
When the size of your CData
exactly equals [width height]
, each element of the array corresponds directly to a pixel. Otherwise, MATLAB must interpolate the values in the "CData" array, so it will fit the axes at their current size.
XLimMode
and YLimMode
) of your axes to manual
.
auto
, then every time an object (such as an image, line, patch, etc.) changes some aspect of its data, the axes must recalculate its related properties. For example, if you specify
image(firstimage); set(gca, 'xlimmode','manual',... 'ylimmode','manual',... 'zlimmode','manual',... 'climmode','manual',... 'alimmode','manual');
the axes will not recalculate any of the limit values before redrawing the image.
DoubleBuffer
property on
for to obtain flicker-free animation. However, to maximize rendering speed, set DoubleBuffer
to off
.
movie
object if the main point of your task is to simply display a series of images onscreen.
movie
object utilizes underlying system graphics resources directly, instead of gexecuting MATLAB object code. This is faster than repeatedly setting an image's CData
property, as outlined above.
EraseMode | Printing Images |
© 1994-2005 The MathWorks, Inc.