Image Processing Toolbox    

Displaying RGB Images

RGB images, also called truecolor images, represent color values directly, rather than through a colormap.

To display an RGB image, the most basic syntax is

RGB is m-by-n-by-3 array. For each pixel (r,c) in RGB, imshow displays the color represented by the triplet (r,c,1:3).

Systems that use 24 bits per screen pixel can display truecolor images directly, because they allocate 8 bits (256 levels) each to the red, green, and blue color planes. On systems with fewer colors, MATLAB displays the image using a combination of color approximation and dithering. See Working with Different Screen Bit Depths for more information.

The Image and Axes Properties of an RGB Image

When you display an RGB image, imshow sets the Handle Graphics properties that control how colors display, as follows:


  Displaying Binary Images Displaying Images Directly from Disk