Graphics Previous page   Next Page

Summary of Image Types and Numeric Classes

This table summarizes the way MATLAB interprets data matrix elements as pixel colors, depending on the image type and data class.

Image Type
double Data
uint8 or uint16 Data
Indexed
Image is an m-by-n array of integers in the range [1, p].
Colormap is a p-by-3 array of floating-point values in the range [0, 1].
Image is an m-by-n array of integers in the range
[0,  - 1].
Colormap is a p-by-3 array of floating-point values in the range [0, 1].
Intensity
Image is an m-by-n array of floating-point values that are linearly scaled by MATLAB to produce colormap indices. Typical range of values is [0, 1].
Colormap is a p-by-3 array of floating-point values in the range [0, 1] and is typically grayscale.
Image is an m-by-n array of integers that are linearly scaled by MATLAB to produce colormap indices. The typical range of values is [0, 255] or [0, 65535].
Colormap is a p-by-3 array of floating-point values in the range [0, 1] and is typically grayscale.
RGB (Truecolor)
Image is an m-by-n-by-3 array of floating-point values in the range [0, 1].
Image is an m-by-n-by-3 array of integers in the range [0, 255] or [0, 65535].


Previous page  Converting an 8-Bit RGB Image to Grayscale Reading, Writing, and Querying Graphics Image Files Next page

© 1994-2005 The MathWorks, Inc.