Graphics    

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. The 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].


  Other 8-Bit and 16-Bit Array Support Reading, Writing, and Querying Graphics Image Files