Image Processing Toolbox User's Guide |
Displaying Truecolor Images
Truecolor images, also called RGB images, represent color values directly, rather than through a colormap. A truecolor image is an m-by-n-by-3 array. For each pixel (r,c
) in the image, the color is represented by the triplet (r,c,1:3
).
To display a truecolor image, using either imshow
or imtool
, specify the image matrix as an argument. For example, this code reads a truecolor image into the MATLAB workspace and then displays the image. This documentation uses the variable name RGB
to represent a truecolor image in the workspace
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, imshow
displays the image using a combination of color approximation and dithering. See Working with Different Screen Bit Depths for more information.
Note If you display a color image and it appears in black and white, check if the image is an indexed image. With indexed images, you must specify the colormap associated with the image. For more information, see Displaying Indexed Images. |
Displaying Binary Images | Special Display Techniques |
© 1994-2005 The MathWorks, Inc.