Image Processing Toolbox™ supports binary, indexed, grayscale, and truecolor image types. In each image type, pixels are stored in different formats. For example, truecolor images represent a pixel as a triplet of red, green, and blue values, whereas grayscale images represent a pixel as a single intensity value.
Pixel values of the different image types can be stored in floating-point, signed and unsigned integers, or logical data types. Toolbox functions enable you to convert between the image types and data types.
Image types determine how MATLAB® interprets data matrix elements as pixel intensity values. The toolbox supports many image types including binary, grayscale, truecolor, multispectral, and label images.
Certain image processing operations support only a subset of the image types. You can convert images between the image types to suit the operation.
Convert Image Data Between Classes
You can convert image data between classes using functions that automatically rescale and offset the original data.